[Python-Dev] PEP 376

Tarek Ziadé ziade.tarek at gmail.com
Thu Jul 2 16:50:51 CEST 2009


On Thu, Jul 2, 2009 at 4:35 PM, Paul Moore<p.f.moore at gmail.com> wrote:
> 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).

It will fail if your path starts with "/" and you are under win32
because there's
a converter that will raise an error in that case at installation time.

But you can use some code in your setup.py to provide the right directory
name when install is called. I don't see it as a problem.

I'm just afraid it's impossible to use efficiently under win32 because
of the drive
letter. But that's rather a bug.

>
> 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).
>

I'll try to see if I can collect that info out of PyPI with a script,
to list the real-world usages.
Maybe Martin you have a simple way to do this on PyPI ?

Tarek


More information about the Python-Dev mailing list