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 am attempting to build statically linked distributions.
I am using docker containers to ensure the
deployment environment matches the build environment so there is no
Is there any way to force static linking so that wheels can be installed
into a virtual env without requiring specific packages on the host?
Starting a new thread with more explicit details at Richard’s request.
Essentially the tl;dr here is that we'll switch to using sha2 (specifically
Drop the #md5= from the PyPI hosted tarballs and replace it with #sha256, the
~60 or so externally hosted files which are using #md5 links will be fetched
(one time) verified, and have their #md5= hash replaced with a computed
- pip: Will work with no issues, pip has supported sha256 since 1.2, and
< 1.2 will install without a hash just fine.
- setuptools: Will work with no issues, setuptools has supported sha256 since
0.9 and < 0.9 will install without a hash just fine.
- distribute: Doesn't support sha256, will intall without a hash just fine.
- buildout: Uses setuptools/distribute to do the downloads I believe.
- z3c.pypimirror: Appears to use MD5 hashes, but appears it won't error out
if they do not exist.
JSON / XMLRPC API
Keep the md5_sum field, add an additional sha256_sum, suggest that applications
switch to using sha256 for verification.
- bandersnatch: bandersnatch will continue to use the md5_sum field from the
JSON (and previously XMLRPC) and should be updated to using
sha256 in the future.
Simply replace any use of MD5 with SHA256, no clients are expected to access
anything here so this should be perfectly fine.
- pep381client: Doesn't do anything special with the hash, will continue to
- devpi: ??? Unsure, I don't follow the code which fetches from PyPI so I
can't determine where it gets the md5sum from and what it will do if
it doesn't exist. It does have some handling of md5 though.
List of clients to look at taken from http://d.stufft.io/image/402r1s442m2r,
which is generated by looking at what is downloading the files from PyPI.
PGP: 7C6B 7C5D 5E2B 6356 A926 F04F 6E3C BCE9 3372 DCFA
It seems that according to the
it is more or less settled that the setuptools/pip/wheel is the way to
One of the problems though is that there is plenty of packages on Pypi
that are not there yet.
Is there any plan to create some incentives for package maintainers to
provide WHEEL files together with source archives?
May be Pypi could say that starting from such date it recommends to
supply the wheel with the source and then starting from such date it
will require it?
There is probably no better way to make the things move faster like
the central repository committing to the certain way of doing things.
Is that possible?
Same thing could be done with python3 - ask people to provide py3
versions along with py2, and then start requiring the packages to be
python3 or universal.
Any opinions? Does anybody know if there is already such initiative?
We've discussed the idea of changing the wheel file naming scheme to
deal with Linux previously, but never put together a concrete
The closest we've got is the idea of allowing the platform tag to be
customised in pip and perhaps bdist_wheel, and while that's good from
an "enabling experimentation" perspective, it may be overkill if the
primary goal is just to better support handling of Linux distros.
For starters, here's the current definition of the platform tag in PEP 425:
The platform tag is simply distutils.util.get_platform() with all
hyphens - and periods . replaced with underscore _ .
Here's my proposed change:
The default platform tag is distutils.util.get_platform() with all
hyphens - and periods . replaced with underscore _ . If
/etc/os-release [N] exists on the system, then the values in the 'ID'
and 'VERSION_ID' fields are read, all hyphens - and periods . replaced
with underscore _ , and the results appended to the default tag after
a separating underscore."
The [N] reference would then be a reference to
the definition of the format of os-release. (Note that while the
format originated with systemd, plenty of distros have also started
providing it regardless of which init system they use)
Now, this slightly overspecifies on the *consumer* side. A binary
wheel that works on "rhel_7_0" for example, should almost certainly
work on "rhel_7_1". However, that can be addressed on the tooling side
(e.g. permitting the specification of "additional compatible
platforms" when invoking pip), rather than needing to be in the
This also won't help with older Linux distros that don't offer
/etc/os-release, but I'm OK with that - those can just continue to
show up as "linux_x86_64", and PyPI can continue to disallow those
Nick Coghlan | ncoghlan(a)gmail.com | Brisbane, Australia
pymssql uses Cython and the FreeTDS C library to support connections to
Microsoft SQL Server. We would like to distribute binary packages to
ease installation for users. Our current build matrix looks like this:
However, we are trying to cut that down some since, by the time we
support 5 versions of python (2.6,2.7,3.2,3.3,3.4), we are having to
release 30 and now, since we are considering .msi files, maybe 40 files
I'm trying to figure out if there are any downsides to:
* replacing our .exe with .msi (lxml uses .exe, but we noticed Python
itself is shipping .msi files now)
* only shipping wheels and no longer shipping eggs
I would also appreciate any other thoughts regarding what kind of binary
formats a "responsible" package owner would ship.
Chief Executive Developer
Level 12 Technologies <https://www.level12.io/>
/Principled People | Technology that Works/
is there a way for python 2.7 to write something like:
from distutils.core import setup
and get on the cmdline:
python setup.py --name
in distutils2 this was possible. Has python 2.7 stdlib distutils similar
capabilities? May i use the [global] section? (as for now i only get
errors trying that.) Or should i use the [metadata] command to implement