netcdf4-python icon indicating copy to clipboard operation
netcdf4-python copied to clipboard

OSX wheel-building repo for netcdf4-python

Open matthew-brett opened this issue 9 years ago • 23 comments

This just a marker to say - I have set up a repository to do automated builds of OSX wheels:

https://github.com/MacPython/netcdf4-python-wheels

The last build using current master succeeded:

https://travis-ci.org/MacPython/netcdf4-python-wheels

The travis run uploads the built wheel to the scikit-learn Rackspace container:

http://wheels.scipy.org

Here is me installing netcdf4-python into an OSX virtualenv:

(test)$ pip install -f http://wheels.scipy.org --pre netCDF4
Collecting netCDF4
  This repository located at wheels.scipy.org is not a trusted host, if this repository is available via HTTPS it is recommend to use HTTPS instead, otherwise you may silence this warning with '--trusted-host wheels.scipy.org'.
  DEPRECATION: Implicitly allowing locations which are not hosted at a secure origin is deprecated and will require the use of --trusted-host in the future.
  Downloading http://wheels.scipy.org/netCDF4-1.1.8-cp27-none-macosx_10_6_intel.macosx_10_9_intel.macosx_10_9_x86_64.macosx_10_10_intel.macosx_10_10_x86_64.whl (4.3MB)
    100% |████████████████████████████████| 4.3MB 1.6MB/s 
Collecting numpy>=1.7 (from netCDF4)
  This repository located at wheels.scipy.org is not a trusted host, if this repository is available via HTTPS it is recommend to use HTTPS instead, otherwise you may silence this warning with '--trusted-host wheels.scipy.org'.
  Downloading numpy-1.9.2-cp27-none-macosx_10_6_intel.macosx_10_9_intel.macosx_10_9_x86_64.macosx_10_10_intel.macosx_10_10_x86_64.whl (3.7MB)
    100% |████████████████████████████████| 3.7MB 98kB/s 
Installing collected packages: numpy, netCDF4
Successfully installed netCDF4-1.1.8 numpy-1.9.2
(test)$ python -c 'import netCDF4'
(test)$

I added @jswhit to the owners for the wheel-building repo - should I add anyone else? Jeff - you are an owner and can add people.

matthew-brett avatar May 09 '15 21:05 matthew-brett

Do you have to have the netcdf and hdf5 libs built already - or are the libs statically linked in the wheel?

jswhit avatar May 14 '15 14:05 jswhit

The repository travis-ci job builds the dynamic libraries from scratch, and the post-processing of the wheel copies the dynamic libs into the wheel and relinks them:

https://pypi.python.org/pypi/delocate/0.6.2

matthew-brett avatar May 14 '15 17:05 matthew-brett

OK, this is more impressive than I thought. Nice work @matthew-brett !

shoyer avatar May 14 '15 17:05 shoyer

No problem, glad to help.

matthew-brett avatar May 14 '15 17:05 matthew-brett

Hi - would you consider adding me as a maintainer on pypi so I can upload the wheels to pypi? I do this for numpy, scipy, matplotlib, and quite a few others.

Is there a good place to add instructions on how to do the build / upload step for the wheels?

matthew-brett avatar Jul 11 '15 14:07 matthew-brett

what's your pypi user name?

you could add a README.wheels file to the repo

jswhit avatar Jul 15 '15 13:07 jswhit

My pypi user name is 'matthew.brett'. I will add the README.wheels...

matthew-brett avatar Jul 15 '15 13:07 matthew-brett

Added you as a pypi maintainer. Thanks again for providing this service to the community.

jswhit avatar Jul 15 '15 13:07 jswhit

No problem - I hope the README will make me unnecessary in due course :)

matthew-brett avatar Jul 15 '15 13:07 matthew-brett

@matthew-brett - I tried to initiate a new build by pushing an empty commit to netcdf4-python-wheels, but I guess I need write access to do that. I'm getting

error: The requested URL returned error: 403 while accessing https://github.com/MacPython/netcdf4-  python-wheels/info/refs
fatal: HTTP request failed

jswhit avatar Aug 01 '15 21:08 jswhit

Oops - I somehow failed to add the new team to the collaborators for the repository - I have done that now. Github records you (@jswhit) as having a pending invitation to that team. Did you get an email a long time ago inviting you? Do you want me to resend the invitation?

matthew-brett avatar Aug 01 '15 23:08 matthew-brett

I canceled the last invite and sent you a new one - did you get it?

matthew-brett avatar Aug 03 '15 08:08 matthew-brett

Yes, I got it and joined - thanks.

jswhit avatar Aug 03 '15 12:08 jswhit

Hi Jeff - I just noticed that I missed a release for uploading the wheels - sorry about that. What's the best way of keeping in the loop about releases?

matthew-brett avatar Jan 15 '16 19:01 matthew-brett

@jswhit @matthew-brett Our project depends on NetCDF, and OSX wheels being available. It would be great if you could try to upload new source tar-balls and wheels simultaneously, otherwise our builds go crazy!

Perhaps now that Travis-CI supports OSX builders & Linux builders run simultaneously, we can automatically build & upload OSX wheels whenever a new tag is released?

stefanv avatar Apr 14 '16 23:04 stefanv

@matthew-brett - I created a new release (tag v1.2.4rel) today, and pushed an empty commit to the netcdf4-python-wheels repo. Hopefully that will be enough to generate a new build. I agree with @stefanv that it would be nice to automate this.

jswhit avatar Apr 15 '16 18:04 jswhit

Sorry, I had disabled the tests to build 1.2.3 - I've enabled them now, and rebuilt the wheels:

http://wheels.scipy.org/

I can upload these - but the ideal would be if I or you could build and upload these before uploading the sdist to pypi. I'm happy to do that - but I've also put the instructions in the updated README for the wheel-building repo:

https://github.com/MacPython/netcdf4-python-wheels

Do you think that could work?

matthew-brett avatar Apr 15 '16 22:04 matthew-brett

wheels uploaded, thanks. I'll try to remember to uploading them before the sdist next time.

jswhit avatar Apr 16 '16 13:04 jswhit

Please let me know if I can help at all.

Do you have a how-to-release document somewhere? Would it be worth adding some notes there?

matthew-brett avatar Apr 16 '16 16:04 matthew-brett

Matthew, should we move the netcdf build recipe from manylinux to the netcdf4 test repo, so that Linux wheels are available the same time as OSX ones?

stefanv avatar Apr 16 '16 18:04 stefanv

I just created a 'README.release' file. Comments welcome.

jswhit avatar Apr 19 '16 15:04 jswhit

Does https://github.com/Unidata/netcdf4-python/blob/master/README.release#L17 automatically upload the manylinux wheels? It's important to have all wheels up before making a source upload, otherwise things may start to break, if I'm not mistaken @matthew-brett ?

stefanv avatar May 23 '16 22:05 stefanv

No, there is no automatic uploading of wheels to pypi, if that's what you mean. Has to be done manually. Would be a nice feature to have though.

jswhit avatar May 24 '16 12:05 jswhit