[Distutils] setup.py not included in source distribution
M.-A. Lemburg
mal@lemburg.com
Thu Nov 7 07:19:02 2002
Thomas Heller wrote:
> I came across a strange bug on Win2k, that setup.py
> is not included in the distribution by default.
>
> This only occurrs, when the distribution is built by this command line
>
> setup.py sdist
>
> and not with
>
> python setup.py sdist
>
> The problem is that in the first case the MANIFEST file contains this line:
> C:\sf\distutils\setup.py
> and this line in the second case:
> setup.py
>
> The cause is that in the first case sys.argv[0] is set to
> the absolute path 'c:\\sf\\distutils\\setup.py', in the second
> case it is 'setup.py'.
> Finally, the sdist command copies it's file list in this way:
>
> dest = os.path.join(base_dir, file)
> self.copy_file(file, dest, link=link)
>
> and os.path.join(xxx, yyy) returns yyy when yyy is an absolute path.
>
> The workaround is simple:
> - either use the second form to start the setup script,
> - or insert 'setup.py' manually in the MANIFEST.in file.
>
> Sounds like a bug to me, but I'm not sure how to fix it.
> 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.
--
Marc-Andre Lemburg
CEO eGenix.com Software GmbH
_______________________________________________________________________
eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,...
Python Consulting: http://www.egenix.com/
Python Software: http://www.egenix.com/files/python/