[Python-Dev] PEP 376

Paul Moore p.f.moore at gmail.com
Thu Jul 2 16:35:18 CEST 2009


2009/7/2 Tarek Ziadé <ziade.tarek at gmail.com>:
> Try this setup.py file:
>
> """
> from distutils.core import setup
>
> setup(name='foo', version='1.0', data_files=[('/tmp', ['data'])])
> """
>
> with this MANIFEST.in file:
> ""
> include data
> """
>
> and add a 'data' file alongside

Ta. I'll give it a go tonight. But haven't you made the point yourself
by saying I'll need to change the directory? This will fail for me as
I don't have a "/tmp" directory. So I'd expect a bdist installer
(*any* bdist installer) to fail, as it's got no way to tell where to
put that file. I can only imagine this type of thing being done by
someone packaging for Unix, with no interest in cross-platform
portability (I suspect MAC OS directory names differ from Unix as
well).

So maybe absolute filenames should be banned in distutils? (OK, less
radically, maybe someone should ask where that functionality is used
in practice, and based on the answers come up with a more portable
approach).

Paul.


More information about the Python-Dev mailing list