Re: [Python-Dev] PEP 382: Namespace Packages

2009-04-02 Thread P.J. Eby
At 10:32 AM 4/2/2009 -0500, Martin v. Löwis wrote: I propose the following PEP for inclusion to Python 3.1. Please comment. An excellent idea. One thing I am not 100% clear on, is how to get additions to sys.path to work correctly with this. Currently, when pkg_resources adds a new egg to s

Re: [Python-Dev] PEP 382: Namespace Packages

2009-04-02 Thread P.J. Eby
At 10:33 PM 4/2/2009 +0200, M.-A. Lemburg wrote: That's going to slow down Python package detection a lot - you'd replace an O(1) test with an O(n) scan. I thought about this too, but it's pretty trivial considering that the only time it takes effect is when you have a directory name that mat

Re: [Python-Dev] PEP 382: Namespace Packages

2009-04-02 Thread P.J. Eby
At 03:21 AM 4/3/2009 +0200, Matthias Klose wrote: +1 speaking as a downstream packaging python for Debian/Ubuntu I welcome this approach. The current practice of shipping the very same file (__init__.py) in different packages leads to conflicts for the installation of these packages (this is n

Re: [Python-Dev] PEP 382: Namespace Packages

2009-04-03 Thread P.J. Eby
At 10:15 PM 4/3/2009 +0200, Martin v. Löwis wrote: I should make it clear that this is not the case. I envision it to work this way: import zope - searches sys.path, until finding either a directory zope, or a file zope.{py,pyc,pyd,...} - if it is a directory, it checks for .pkg files. If it fi

Re: [Python-Dev] PEP 382: Namespace Packages

2009-04-06 Thread P.J. Eby
At 02:00 PM 4/6/2009 +0100, Chris Withers wrote: Martin v. Löwis wrote: Chris Withers wrote: Would this support the following case: I have a package called mortar, which defines useful stuff: from mortar import content, ... I now want to distribute large optional chunks separately, but ideal

Re: [Python-Dev] PEP 382: Namespace Packages

2009-04-07 Thread P.J. Eby
At 02:30 PM 4/7/2009 +0200, M.-A. Lemburg wrote: >> Wouldn't it be better to stick with a simpler approach and look for >> "__pkg__.py" files to detect namespace packages using that O(1) check ? > > Again - this wouldn't be O(1). More importantly, it breaks system > packages, which now again have

Re: [Python-Dev] PEP 382: Namespace Packages

2009-04-07 Thread P.J. Eby
At 04:58 PM 4/7/2009 +0200, M.-A. Lemburg wrote: On 2009-04-07 16:05, P.J. Eby wrote: > At 02:30 PM 4/7/2009 +0200, M.-A. Lemburg wrote: >> >> Wouldn't it be better to stick with a simpler approach and look for >> >> "__pkg__.py" files to detect n

Re: [Python-Dev] PEP 382: Namespace Packages

2009-04-14 Thread P.J. Eby
At 05:02 PM 4/14/2009 +0200, M.-A. Lemburg wrote: I don't see the emphasis in the PEP on Linux distribution support and the remote possibility of them wanting to combine separate packages back into one package as good argument for adding yet another separate hierarchy of special files which Pytho

Re: [Python-Dev] PEP 382: Namespace Packages

2009-04-14 Thread P.J. Eby
At 10:59 PM 4/14/2009 +0200, M.-A. Lemburg wrote: You are missing the point: When breaking up a large package that lives in site-packages into smaller distribution bundles, you don't need namespace packages at all, so the PEP doesn't apply. The way this works is by having a base distribution bun

Re: [Python-Dev] PEP 382: Namespace Packages

2009-04-15 Thread P.J. Eby
At 09:51 AM 4/15/2009 +0200, M.-A. Lemburg wrote: On 2009-04-15 02:32, P.J. Eby wrote: > At 10:59 PM 4/14/2009 +0200, M.-A. Lemburg wrote: >> You are missing the point: When breaking up a large package that lives in >> site-packages into smaller distribution bundles, you don&#

Re: [Python-Dev] PEP 382: Namespace Packages

2009-04-15 Thread P.J. Eby
At 09:10 AM 4/15/2009 -0700, Aahz wrote: For the benefit of us bystanders, could you summarize your vote at this point? Given the PEP's intended goals, if you do not oppose the PEP, are there any changes you think should be made? I'm +1 on Martin's original version of the PEP, subject to the p

Re: [Python-Dev] PEP 382: Namespace Packages

2009-04-15 Thread P.J. Eby
At 06:15 PM 4/15/2009 +0200, M.-A. Lemburg wrote: The much more common use case is that of wanting to have a base package installation which optional add-ons that live in the same logical package namespace. Please see the large number of Zope and PEAK distributions on PyPI as minimal examples

Re: [Python-Dev] .pth files are evil

2009-05-09 Thread P.J. Eby
At 04:18 PM 5/9/2009 +0200, Martin v. Löwis wrote: Zooko O'Whielacronx wrote: > .pth files are why I can't easily use GNU stow with easy_install. > If installing a Python package involved writing new files into the > filesystem, but did not require reading, updating, and re-writing any > extant

Re: [Python-Dev] .pth files are evil

2009-05-09 Thread P.J. Eby
At 04:42 PM 5/9/2009 +0200, Martin v. Löwis wrote: >> If you always use --single-version-externally-managed with easy_install, >> it will stop editing .pth files on installation. > > It's --multi-version (-m) that does that. > --single-version-externally-managed is a "setup.py install" option. >

Re: how GNU stow is complementary rather than alternative to distutils

2009-05-10 Thread P.J. Eby
At 12:04 PM 5/10/2009 -0600, Zooko Wilcox-O'Hearn wrote: The thing that prevents this from working with setuptools is that setuptools creates a file named easy_install.pth during the "python ./ setup.py install --prefix=foo" if you build two different Python packages this way, they will each cr

Re: [Python-Dev] .pth files are evil

2009-05-11 Thread P.J. Eby
At 04:42 PM 5/9/2009 +0200, Martin v. Löwis wrote: >> If you always use --single-version-externally-managed with easy_install, >> it will stop editing .pth files on installation. > > It's --multi-version (-m) that does that. > --single-version-externally-managed is a "setup.py install" option. >

Re: [Distutils] uses for setup.cfg and extracting data from it

2009-09-09 Thread P.J. Eby
At 11:25 PM 9/9/2009 +1000, Ben Finney wrote: That's one of the pain points of the current distutils capability: there's no standard-library way to extract that information. If you're talking about setup.cfg (and all the other distutils .cfg files), all you need to do is create a Distribution

Re: [Distutils] uses for setup.cfg and extracting data from it

2009-09-11 Thread P.J. Eby
At 08:14 AM 9/12/2009 +1000, Ben Finney wrote: Specifically, I want to programmatically access the metadata that is held in the arguments to the ‘distutils.setup()’ call. Without, as you say, executing any Distutils command. I am not aware of any ‘distutils’ public functions that can do