[Python-checkins] CVS: distutils/distutils/command build_py.py,1.27,1.28 sdist.py,1.43,1.44
Greg Ward
python-dev@python.org
Mon, 28 Aug 2000 18:15:21 -0700
Update of /cvsroot/python/distutils/distutils/command
In directory slayer.i.sourceforge.net:/tmp/cvs-serv21957/command
Modified Files:
build_py.py sdist.py
Log Message:
Added 'script_name' and 'script_args' instance attributes to Distribution.
Changed 'core.setup()' so it sets them to reasonable defaults.
Tweaked how the "usage" string is generated: 'core' now provides
'gen_usage()', which is used instead of 'USAGE'.
Modified "build_py" and "sdist" commands to refer to
'self.distribution.script_name' rather than 'sys.argv[0]'.
Index: build_py.py
===================================================================
RCS file: /cvsroot/python/distutils/distutils/command/build_py.py,v
retrieving revision 1.27
retrieving revision 1.28
diff -C2 -r1.27 -r1.28
*** build_py.py 2000/08/15 13:01:25 1.27
--- build_py.py 2000/08/29 01:15:18 1.28
***************
*** 178,182 ****
module_files = glob (os.path.join (package_dir, "*.py"))
modules = []
! setup_script = os.path.abspath (sys.argv[0])
for f in module_files:
--- 178,182 ----
module_files = glob (os.path.join (package_dir, "*.py"))
modules = []
! setup_script = os.path.abspath(self.distribution.script_name)
for f in module_files:
***************
*** 185,188 ****
--- 185,190 ----
module = os.path.splitext (os.path.basename (f))[0]
modules.append ((package, module, f))
+ else:
+ self.debug_print("excluding %s" % setup_script)
return modules
Index: sdist.py
===================================================================
RCS file: /cvsroot/python/distutils/distutils/command/sdist.py,v
retrieving revision 1.43
retrieving revision 1.44
diff -C2 -r1.43 -r1.44
*** sdist.py 2000/08/22 01:49:41 1.43
--- sdist.py 2000/08/29 01:15:18 1.44
***************
*** 203,207 ****
# developer elects to generate a manifest some other way -- then we
# can't regenerate the manifest, so we don't.)
! setup_newer = dep_util.newer(sys.argv[0], self.manifest)
# cases:
--- 203,210 ----
# developer elects to generate a manifest some other way -- then we
# can't regenerate the manifest, so we don't.)
! self.debug_print("checking if %s newer than %s" %
! (self.distribution.script_name, self.manifest))
! setup_newer = dep_util.newer(self.distribution.script_name,
! self.manifest)
# cases: