Hi all --
at long last, I have fixed two problems that a couple people noticed a
* I folded in Amos Latteier's NT patches almost verbatim -- just
changed an `os.path.sep == "/"' to `os.name == "posix"' and added
some comments bitching about the inadequacy of the current library
installation model (I think this is Python's fault, but for now
Distutils is slavishly aping the situation in Python 1.5.x)
* I fixed the problem whereby running "setup.py install" without
doing anything else caused a crash (because 'build' hadn't yet
been run). Now, the 'install' command automatically runs 'build'
before doing anything; to make this bearable, I added a 'have_run'
dictionary to the Distribution class to keep track of which commands
have been run. So now not only are command classes singletons,
but their 'run' method can only be invoked once -- both restrictions
enforced by Distribution.
The code is checked into CVS, or you can download a snapshot at
Hope someone (Amos?) can try the new version under NT. Any takers for
BTW, all parties involved in the Great "Where Do We Install Stuff?"
Debate should take a good, hard look at the 'set_final_options()' method
of the Install class in distutils/install.py; this is where all the
policy decisions about where to install files are made. Currently it
apes the Python 1.5 situation as closely as I could figure it out.
Obviously, this is subject to change -- I just don't know to *what* it
Greg Ward - software developer gward(a)cnri.reston.va.us
Corporation for National Research Initiatives
1895 Preston White Drive voice: +1-703-620-8990
Reston, Virginia, USA 20191-5434 fax: +1-703-620-0913
I've been aware that the distutils sig has been simmerring away, but
until recently it has not been directly relevant to what I do.
I like the look of the proposed api, but have one question. Will this
support an installed system that has multiple versions of the same
package installed simultaneously? If not, then this would seem to be a
significant limitation, especially when dependencies between packages
Assuming it does, then how will this be achieved? I am presently
managing this with a messy arrangement of symlinks. A package is
installed with its version number in it's name, and a separate
directory is created for an application with links from the
unversioned package name to the versioned one. Then I just set the
pythonpath to this directory.
A sample of what the directory looks like is shown below.
I'm sure there is a better solution that this, and I'm not sure that
this would work under windows anyway (does windows have symlinks?).
So, has this SIG considered such versioning issues yet?
Tim Docker timd(a)macquarie.com.au
Quantative Applications Division
qad16:qad $ ls -l lib/python/
drwxr-xr-x 2 mts mts 512 Nov 11 11:23 1.1
-r--r----- 1 root mts 45172 Sep 1 1998 cdrmodule_0_7_1.so
drwxr-xr-x 2 mts mts 512 Sep 1 1998 chart_1_1
drwxr-xr-x 3 mts mts 512 Sep 1 1998 Fnorb_0_7_1
dr-xr-x--- 3 mts mts 512 Nov 11 11:21 Fnorb_0_8
drwxr-xr-x 3 mts mts 1536 Mar 3 12:45 mts_1_1
dr-xr-x--- 7 mts mts 512 Nov 11 11:22 OpenGL_1_5_1
dr-xr-x--- 2 mts mts 1024 Nov 11 11:23 PIL_0_3
drwxr-xr-x 3 mts mts 512 Sep 1 1998 Pmw_0_7
dr-xr-x--- 2 mts mts 512 Nov 11 11:21 v3d_1_1
qad16:qad $ ls -l lib/python/1.1
lrwxrwxrwx 1 root other 29 Apr 10 10:43 _glumodule.so -> ../OpenGL_1_5_1/_glumodule.so
lrwxrwxrwx 1 root other 30 Apr 10 10:43 _glutmodule.so -> ../OpenGL_1_5_1/_glutmodule.so
lrwxrwxrwx 1 root other 22 Apr 10 10:43 _imaging.so -> ../PIL_0_3/_imaging.so
lrwxrwxrwx 1 root other 36 Apr 10 10:43 _opengl_nummodule.so -> ../OpenGL_1_5_1/_opengl_nummodule.so
lrwxrwxrwx 1 root other 27 Apr 10 10:43 _tkinter.so -> ../OpenGL_1_5_1/_tkinter.so
lrwxrwxrwx 1 mts mts 21 Apr 10 10:43 cdrmodule.so -> ../cdrmodule_0_7_1.so
lrwxrwxrwx 1 mts mts 12 Apr 10 10:43 chart -> ../chart_1_1
lrwxrwxrwx 1 root other 12 Apr 10 10:43 Fnorb -> ../Fnorb_0_8
lrwxrwxrwx 1 mts mts 12 Apr 10 10:43 mts -> ../mts_1_1
lrwxrwxrwx 1 root other 15 Apr 10 10:43 OpenGL -> ../OpenGL_1_5_1
lrwxrwxrwx 1 root other 33 Apr 10 10:43 opengltrmodule.so -> ../OpenGL_1_5_1/opengltrmodule.so
lrwxrwxrwx 1 root other 33 Apr 10 10:43 openglutil_num.so -> ../OpenGL_1_5_1/openglutil_num.so
lrwxrwxrwx 1 root other 10 Apr 10 10:43 PIL -> ../PIL_0_3
lrwxrwxrwx 1 mts mts 10 Apr 10 10:43 Pmw -> ../Pmw_0_7
lrwxrwxrwx 1 root other 10 Apr 10 10:43 v3d -> ../v3d_1_1
I'm wondering what the state of play is with the following branches:
What more needs to happen for these to get merged to trunk and a release
I'd like to be able to do:
...kinda like you can with templates in BFG, which I believe uses
pkg_tools to do the hard work.
What're the chances of that happening?
I have made a beta release of zc.buildout 1.5.0.
Among other changes, this release includes the ability to use zc.buildout with a system Python, if you use the new z3c.recipe.scripts instead of zc.recipe.egg for generating scripts.
In my experience, working with a system ("non-clean") Python can be fragile in many ways. However, this release addresses the problems I have encountered so far.
Your feedback is welcome. I hope to make a final release sometime next week.
So, there won't be any package management tool shipped with Python 2.7
and users will have to download and install `setuptools` manually as
"search" -> "download" -> "unzip" -> "cmd" -> "cd" -> "python
Therefore I still propose shipping bootstrap package that instruct
user how to download and install an actual package management tool
when users tries to use it. So far I know only one stable tool -
`easy_install` - a part of `setuptools` package.
The required behavior for very basic user friendliness:
1. user installs Python 2.7
2. user issues `python -m easy_install something`
3. user gets message
'easy_install' tool is not installed on this system. To make it
available, download and install `setuptools` package from
4. the screen is paused before exit (for windows systems)
Other design notes:
1. if package tries to import `easy_install` module used for
bootstrap, it gets the same ImportException as if there were no
`easy_install` at all
2. bootstrap module is overwritten by actual package when users installs it
So, do we need a PEP for that? How else can I know if consensus is
reached? Anybody is willing to elaborate on implementation?
P.S. Please be careful to reply to relevant lists
On Mon, Mar 29, 2010 at 9:37 AM, Tarek Ziadé <ziade.tarek(a)gmail.com> wrote:
> 2010/3/29 anatoly techtonik <techtonik(a)gmail.com>:
>> It is really hard to follow. You should at least change subjects when
>> switching topic.
> I was talking about the work going on and the decisions taken lately.
> I never change topics of threads mails when there's less than 100 mails,
> because I find it way more confusing :)
>> So, what is the verdict? Will there be a package management tool or
>> bootstrap package for it shipped with Python 2.7 or not?
> As I said in the mail you've quoted, all improvements are made in
> Distutils2. So the answer is no.
> Python 2.7b1 is due in less than a week anyways, so any new
> development on this topic will happen after.
> Basically Python 2.7 == Python 2.6 in term of packaging.
> Tarek Ziadé | http://ziade.org
I am moving the venue for this discussion on stdeb to the distutils-sig
(from http://bugs.python.org/issue1054967 ). I think this is better
On 4/29/10 10:16 PM, Éric Araujo wrote:
> Éric Araujo<merwok(a)netwok.org> added the comment:
> Andrew, I am uncomfortable with stdeb. (Trying to express respectful
> constructive critique, not just picking on your project.) The version in
> Debian testing, 0.5.1-1, still requires setuptools (actually only
> pkg_resources, which is split into another package in Debian, for space
> or politic reasons).
I see, thanks for pointing this out. I thought pkg_resources was in the
stdlib (or on that track). I will investigate.
> The py2dsc script seems to be obsoleted by the
> to-be “debian” command.
Can you refer me to the source code and/or documentation for that
command? I was not previously aware of it.
> The pypi-install script seems dangerous to me,
> because downloading unverified software and putting it into the system
> seems a rather bad idead (a.k.a. “sudo ./setup.py install considered
Yes, some might consider it dangerous, although it does of course
require root privileges before installing anything system-wide (and only
builds the .deb file with user privileges). Nevertheless, it is a useful
tool and safer than "sudo python ./setup.py install" because one can
always do "sudo dpkg --purge python-some-package" to remove that package
> python-debian provides useful support code for generating and reading
> debian formats. A quick read show the code would benefit from some 2.6
> modernizing (i.e. gain in simplicity and readability by using modern
> idioms and stdlib functions).
Yes, I'm not particularly proud of the code in stdeb -- please feel free
to hack away. Any and all improvements accepted, preferably in
bite-sized commits to a fork on github.
> Would using this package in stdeb /
> distutils2.command.debian instead of shelling out bring anything?
(Ah, I gather this is the debian command you refer to above?) Not
knowing that command, I'm not sure what would be gained. If the command
depends on debhelper (by shelling out to dh_make), it would remove that
dependency. It also brings all the options described in the README.rst file.
I want to ask you a question regarding something I want to do with my app.
The reason I'm asking here is because I understand that Distribute somehow
installs itself as "setuptools". (I've never looked into the details of it.)
And I want something similar, so maybe you can advise me how to do it.
I'm developing a package called `garlicsim`. The package is intended for
Python 2.X, but I am also offerring Python 3 support on a different fork
So both of these packages live side by side on PyPI, and Python 3 users
install `garlicsim_py3`, and Python 2 users install `garlicsim`.
The problem is: When third party modules want to use garlicsim, they should
have one package name to refer to, not two. Sure, they can do something like
import garlicsim_py3 as garlicsim
But I would prefer not to make the developers of these modules do this.
Is there a way that `garlicsim_py3` will install itself under the alias
`garlicsim`? What I want is for a Python 3 user to be able to `import
garlicsim` and refer to the module all the time as `garlicsim`, but that it
will really be `garlicsim_py3`.
(1) I've reached the decision to support Python 3 on a fork instead of in
the same code base; It's important for me that the code base will be clean,
and I would really not want to introduce compatibilty hacks.
2010/5/29 P.J. Eby <pje(a)telecommunity.com>:
> At 01:13 AM 5/29/2010 +0200, Tarek Ziadé wrote:
>> The problem I have with this approach is that we need to manage
>> somewhere at PyPI a list of potential installers,
>> and maybe deal with upgrades and replacements. Plus, I am not sure
>> that a user will really understand what to
>> do when he's asked to chose an installer. Sounds like something we
>> should only ask to power users, and
>> people that know what they are doing with p7g. So a bootstrap script
>> is useless for them.
> Actually, the way it would (presumably) work would be just a script like
> Guido's that downloads a source archive from PyPI and runs setup.py install.
> So, it's not really a matter of "choosing" an installer -- it'd just be,
> "download and install a package from source".
> If the package itself needs one of those other things in order to build
> itself or install dependencies, then the next stage of bootstrap is its
> problem (e.g. via ez_setup), not the stdlib's.
> So, I don't see the "power users only" objection making sense, at least if
> we drop back to what I believe was Guido's original proposal for a bootstrap
> script a few years ago.
I was not thinking about this proposal. If this what Guido proposed at
the summit, then I misunderstood. I was thiking about a bootstrap
process on the end-user side, to set up an installer once for all, on
a fresh Python.
The problem with the feature you describe (bootstrap embed in the
archive itself) is that we imply that the packager chooses himself an
installer and forces the end-user to use it when he installs the
software. This means that the end user might end up with several
installers installed for the same Python. It also implies that the
developer provides a smart setup.py script that embeds that bootstrap,
and runs some code.
I think separating the concerns and letting the end user pick/use
explicitly *one* installer globally is better because several
installers won't compete on the target system (even if we supposely
want them all to be compatible in the future). Of course, this is only
true for source distributions.
It will also allow distributions to be "dumb" envelopes with static
metadata that are the same all the time, no matter which tool created
them, and eventually remove setup.py in favor of statically described
metadata using PEP 345.
Today, for instance, if an installer wants to install a distribution
based on setuptools, it has to run the "egg_info" command to extract
the metadata, on the target system. Being able to get those metadata
without running any code would be better. For instance, installers
could list all dependencies for a project by querying PyPI with zero
download/execution. (thanks to PEP 345 environment markers)
What would make more sense I think, would be to have all installers an
identical archive for a given project, that doesn't need more code to
be run to get all the metadata.
So at the end, the end user would chose an installer that is
compatible with these archive, and know how to install them. In other
words, have ez_setup for example, run once for all at the Python
level, and be THE installer. Or run a pip_setup or whatever.
Tarek Ziadé | http://ziade.org