Skip to content

Commit 6b7f1f2

Browse files
committed
Merging reverted "pip develop" compatibility into default
2 parents 106e1a9 + c2bfe3e commit 6b7f1f2

File tree

2 files changed

+10
-18
lines changed

2 files changed

+10
-18
lines changed

roundup/dist/command/build_scripts.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
# For license terms see the file COPYING.txt.
55
#
66
from distutils.command.build_scripts import build_scripts as base
7+
from distutils import log
78
import sys, os, string
89

910
class build_scripts(base):
@@ -60,7 +61,7 @@ def finalize_options(self):
6061
else:
6162
# default to current platform
6263
target = sys.platform
63-
self.target_platfom = target
64+
self.target_platform = target
6465

6566
# for native builds, use current python executable path;
6667
# for cross-platform builds, use default executable name
@@ -106,7 +107,7 @@ def copy_scripts(self):
106107
# continue
107108

108109
if self.dry_run:
109-
self.announce("would create %s" % outfile)
110+
log.info("would create %s" % outfile)
110111
continue
111112

112113
module = os.path.splitext(os.path.basename(script))[0]
@@ -118,7 +119,7 @@ def copy_scripts(self):
118119
'prefix': self.script_preamble,
119120
}
120121

121-
self.announce("creating %s" % outfile)
122+
log.info("writing %s" % outfile)
122123
file = open(outfile, 'w')
123124

124125
try:

setup.py

Lines changed: 6 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -37,11 +37,6 @@
3737
import sys, os
3838
from glob import glob
3939

40-
# patch distutils if it can't cope with the "classifiers" keyword
41-
from distutils.dist import DistributionMetadata
42-
if not hasattr(DistributionMetadata, 'classifiers'):
43-
DistributionMetadata.classifiers = None
44-
DistributionMetadata.download_url = None
4540

4641
def include(d, e):
4742
"""Generate a pair of (directory, file-list) for installation.
@@ -52,15 +47,13 @@ def include(d, e):
5247

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

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

6558
def main():
6659
# template munching
@@ -76,7 +69,7 @@ def main():
7669
]
7770

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

8174
data_files = [
8275
('share/roundup/cgi-bin', ['frontends/roundup.cgi']),
@@ -157,9 +150,7 @@ def main():
157150
'install_lib': install_lib,
158151
},
159152
packages=packages,
160-
entry_points={
161-
'console_scripts': scripts
162-
},
153+
scripts=scripts,
163154
data_files=data_files)
164155

165156
if __name__ == '__main__':

0 commit comments

Comments
 (0)