[Distutils] Handling the binary dependency management problem
Thomas Heller
theller at ctypes.org
Wed Dec 4 13:13:04 CET 2013
Am 04.12.2013 11:41, schrieb Oscar Benjamin:
> On 4 December 2013 07:40, Ralf Gommers <ralf.gommers at gmail.com> wrote:
>> How do I package those three builds into wheels and get the right one
>> installed by ``pip install numpy``?
>
> This was discussed previously on this list:
> https://mail.python.org/pipermail/distutils-sig/2013-August/022362.html
>
> Essentially the current wheel format and specification does not
> provide a way to do this directly. There are several different
> possible approaches.
>
> One possibility is that the wheel spec can be updated to include a
> post-install script (I believe this will happen eventually - someone
> correct me if I'm wrong). Then the numpy for Windows wheel can just do
> the same as the superpack installer: ship all variants, then
> delete/rename in a post-install script so that the correct variant is
> in place after install.
>
> Another possibility is that the pip/wheel/PyPI/metadata system can be
> changed to allow a "variant" field for wheels/sdists. This was also
> suggested in the same thread by Nick Coghlan:
> https://mail.python.org/pipermail/distutils-sig/2013-August/022432.html
>
> The variant field could be used to upload multiple variants e.g.
> numpy-1.7.1-cp27-cp22m-win32.whl
> numpy-1.7.1-cp27-cp22m-win32-sse.whl
> numpy-1.7.1-cp27-cp22m-win32-sse2.whl
> numpy-1.7.1-cp27-cp22m-win32-sse3.whl
> then if the user requests 'numpy:sse3' they will get the wheel with
> sse3 support.
Why does numpy not create a universal distribution, where the actual
extensions used are determined at runtime? This would simplify the
installation (all the stuff that you describe would not be required).
Another benefit would be for users that create and distribute 'frozen'
executables (py2exe, py2app, cx_freeze, pyinstaller), the exe would work
on any machine independend from the sse - level.
Thomas
More information about the Distutils-SIG
mailing list