[Distutils] Re: setup.py not included in source distribution

Thomas Heller theller@python.net
Thu Nov 7 07:42:01 2002


> > Should absolute path names in MANIFEST be allowed or not?
> 
> I think that would not be very useful... files in MANIFEST
> should always be relative to the source distribution directory
> which is usually the location of the setup.py file.

In this case I suggest this patch:

Index: core.py
===================================================================
RCS file: /cvsroot/python/distutils/distutils/core.py,v
retrieving revision 1.52
diff -c -r1.52 core.py
*** core.py	4 Nov 2002 13:45:15 -0000	1.52
--- core.py	7 Nov 2002 12:31:33 -0000
***************
*** 87,93 ****
          klass = Distribution
  
      if not attrs.has_key('script_name'):
!         attrs['script_name'] = sys.argv[0]
      if not attrs.has_key('script_args'):
          attrs['script_args'] = sys.argv[1:]
  
--- 87,93 ----
          klass = Distribution
  
      if not attrs.has_key('script_name'):
!         attrs['script_name'] = os.path.basename(sys.argv[0])
      if not attrs.has_key('script_args'):
          attrs['script_args'] = sys.argv[1:]