Permalink
Browse files

Fixed script installation for windows and unix

* can't install 'peppy.py' as a script because python will find that before the peppy directory in site-packages
* setup now renames 'peppy.py' to 'peppy' when creating a source distribution

svn-revision: r1773
  • Loading branch information...
robmcmullen committed Dec 16, 2008
1 parent 8e320fc commit 6c8edaf5846eda033499306aa1397255f05787d8
Showing with 12 additions and 1 deletion.
  1. 0 { → scripts}/peppy.bat
  2. +12 −1 setup.py
File renamed without changes.
@@ -153,7 +153,18 @@ def addmodules(arg, dirname, names):
# Create the list of scripts to be installed in /usr/bin
scripts = ['peppy.py', 'peppy.bat']
if sys.platform.startswith('win'):
scripts = ['scripts/peppy.bat']
else:
# Can't include peppy.py at the root level of the distribution or as one
# of the scripts because python ends up trying to include peppy.py on an
# "import peppy" statement rather than looking for the peppy directory
# in site-packages. So, on unix it is installed as 'peppy' without an
# extension to work around this.
if os.path.exists('peppy.py') and not os.path.exists('scripts/peppy.py'):
import shutil
shutil.copy('peppy.py', 'scripts/peppy')
scripts = ['scripts/peppy']
# Create the data files for Editra's styling stuff

0 comments on commit 6c8edaf

Please sign in to comment.