Re: Notes on experimenting with making wheels

Peter Cock <[email protected]>
Newsgroups gmane.comp.python.bio.devel
Message-ID <CAKVJ-_4paVOYh+K8makRveCm0unEfke5FmajV_OWEnbqtYYFnQ@mail.gmail.com>
On Thu, Jun 23, 2016 at 5:10 PM, Peter Cock <[email protected]> wrote:
> On Thu, Jun 23, 2016 at 4:14 PM, Peter Cock <[email protected]> wrote:
>> Using my elderly 32 bit Windows XP machine,
>>
>> 1) Clean install of python-2.7.11.msi (for all users), which
>> is currently the latest version - and comes with pip.
>>
>> 2) Upgrade pip
>>
>> C:\Python27\Scripts\pip install --upgrade pip
>>
>> (Ignored scary error about being unable to delete a temp
>> folder using os.unlink via shutil.py)
>>
>> 3) Install setuptools and wheel
>>
>> C:\Python27\Scripts\pip install --upgrade wheel setuptools
>>
>> 4) Install binary wheel of numpy, got numpy 1.11.0
>>
>> C:\Python27\Scripts\pip install --only-binary numpy numpy
>>
>> 4) Get clean checkout of Biopython from git,
>>
>> 5) Build the wheel,
>>
>> C:\Python27\python setup.py bdist_wheel
>>
>> (Ignored warning about config variables Py_DEBUG and
>> WITH_PYMALLOC being unset and that the Python ABI
>> tag may be incorrect.)
>>
>> Giving:
>>
>> dist/biopython-1.67_-cp27-cp27m-win32.whl (1917KB)
>
> Those warnings appear to be harmless based on this issue:
>
> https://github.com/pypa/pip/issues/3383
>
> Peter

On wider reading there could be a glitch here also
dependent on the version of pip used on the developer's
machine to build the wheel, and on the version of pip
used to install it:

https://github.com/pypa/pip/issues/3383
https://bitbucket.org/pypa/wheel/issues/169/incompatible-wheels-on-windows-depending

Note if we build the wheels on a machine without numpy,
then setup.py will leave out the numpy specific bits (at
least, those needing the numpy C code which it will skip
compiling).

We may need to explicitly add the numpy dependency
to setup.py, with a pinned NumPy version to ensure the
binary ABI matches. I think we'll need to consult with
the NumPy developers on this - hopefully we're not the
first downstream package using NumPy at the C level
trying to use the binary wheel format.

Peter
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.