Roundup Tracker - Issues

Message5420

Author jerrykan
Recipients ThomasAH, ber, jerrykan, tonich
Date 2016-01-07.06:54:16
Message-id <1452149658.02.0.940143450604.issue2550898@psf.upfronthosting.co.za>
In-reply-to
So after digging into this a bit...


roundup defines its own 'build_script' located in:

  roundup/dist/command/build_scripts.py

The 'copy_scripts()' method takes a list of script file names via the
'scripts' keyword argument for 'setup()'. These file names are
essentially the desired names of the scripts to be installed (ie.
original script name with underscores replaced with hyphens and the
'.py' suffix dropped). The 'copy_scripts()' method performs some lookups
to find the original scripts located in:

  roundup/scripts/

manipulates the contents of the script and bit and then outputs it to
the 'bin/' directory.


All this works fine using either setuptools or distutils when runnning:

  python setup.py install


The issue arises when running 'pip install' with the '-e' option, ie:

  pip install -e .  # while in the project root dir

this invokes a 'develop' command that is only supported by setuptools,
so the same issue can be triggered by running:

  python setup.py develop

assuming the 'setup()' method in 'setup.py' is imported from
'setuptools' instead of 'distutils.core'

The 'develop' command invokes a different code path to install the
scripts which doesn't use the custom 'build_script' so it all falls in a
heap because setuptools doesn't know where to find the original scripts.



There are a couple of possible solutions:

1. perform a check in setup.py to see if 'develop' appears in
sys.argv[1:] and pass the 'entry_points' keyword argument into
'setup()', otherwise pass in 'scripts'.

This is a bit hacky but should work.


2. Rename the scripts in 'roundup/scripts/' to drop the '.py' suffix and
replace underscores with hyphens, and pass in the script names
(including the path) to 'setup()' in the 'scripts' keyword argument.
History
Date User Action Args
2016-01-07 06:54:18jerrykansetmessageid: <1452149658.02.0.940143450604.issue2550898@psf.upfronthosting.co.za>
2016-01-07 06:54:18jerrykansetrecipients: + jerrykan, ber, ThomasAH, tonich
2016-01-07 06:54:17jerrykanlinkissue2550898 messages
2016-01-07 06:54:16jerrykancreate