Skip to content

Commit f3b334b

Browse files
committed
Rollback cdfb1a3 - support "pip install --editable ." (issue2550866)
cdfb1a3 uses setuptools entry_points key which is not available in standard distutils. The proper fix is to modify �roundup.distutils.build_scripts so that it doesn't fail with pip.
1 parent 106e1a9 commit f3b334b

File tree

1 file changed

+6
-10
lines changed

1 file changed

+6
-10
lines changed

setup.py

Lines changed: 6 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -52,15 +52,13 @@ def include(d, e):
5252

5353
return (d, [f for f in glob('%s/%s'%(d, e)) if os.path.isfile(f)])
5454

55-
56-
def mapscript(path):
55+
def scriptname(path):
5756
""" Helper for building a list of script names from a list of
5857
module files.
5958
"""
60-
module = os.path.splitext(os.path.basename(path))[0]
61-
script = module.replace('_', '-')
62-
return '%s = roundup.scripts.%s:run' % (script, module)
63-
59+
script = os.path.splitext(os.path.basename(path))[0]
60+
script = script.replace('_', '-')
61+
return script
6462

6563
def main():
6664
# template munching
@@ -76,7 +74,7 @@ def main():
7674
]
7775

7876
# build list of scripts from their implementation modules
79-
scripts = [mapscript(f) for f in glob('roundup/scripts/[!_]*.py')]
77+
scripts = [scriptname(f) for f in glob('roundup/scripts/[!_]*.py')]
8078

8179
data_files = [
8280
('share/roundup/cgi-bin', ['frontends/roundup.cgi']),
@@ -157,9 +155,7 @@ def main():
157155
'install_lib': install_lib,
158156
},
159157
packages=packages,
160-
entry_points={
161-
'console_scripts': scripts
162-
},
158+
scripts=scripts,
163159
data_files=data_files)
164160

165161
if __name__ == '__main__':

0 commit comments

Comments
 (0)