Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Windows: Add wheel and appveyor support #217

Merged
merged 6 commits into from Oct 10, 2016
Merged

Conversation

matham
Copy link
Member

@matham matham commented Oct 7, 2016

Regarding wheels, this works by getting the most recent nix (currently the version is set using NIX_VERSION in appveyor) binaries and including them in the wheel. It adds them under share/nixio/bin in your python installation folder. Then at runtime that folder, if it exists, is added to the PATH.

This is how we do it at kivy and is similarly how numpy does it (although a bit differently). This makes it easy to install and uninstall since you just need to do pip install wheel_name, provided you have the numpy and h5py dependencies installed of course. If it's uploaded to pypi, then they just do pip install nixio.

When packaging and building a end user exe using e.g. pyinstaller, for projects that use nixio, this is also super easy, as the project just specifies that pyinstaller include the contents of that folder which includes al the binaries.

Currently, it works with 64 and 32 bit versions of py 2.7, 3.4, and 3.5. The wheels are found under the artifacts tab for each build.

For you to make it work, you'd need to merge this PR and then in appveyor you'd import the nixpy project in your account and in the settings tell it it to build all the branches, but only the branches that include an appveyor.yml file. The settings that run the builds will then be provided by the appveyor.yml file included in the PR (most of the setting in the general tab in appveyor control panel cannot be controlled from the appveyor.yml file so you have to set them there).

Finally, the docs need to be updated, but that can be done after we're sure it works. Also, I tried to set up the tests to run on appveyor for each build, however, the h5py and numpy wheels, when using vanilla python, must be downloaded from www.lfd.uci.edu/~gohlke/pythonlibs/ which cannot be done from the command line. So I couldn't run it. We could download manually and then upload those wheels somewhere if you have a server, in which case it should be easy to setup the tests to run automatically. Finally, appveyor runs and generates wheels for every commit, PR, and git tag. So automatic tests would be useful there.

@matham
Copy link
Member Author

matham commented Oct 7, 2016

Just noticed that it's failing on py3.5. That's because the compiler for 3.5 changed (and now uses ucrt), but we're still using compiler version 12 so the arguments passed by python is wrong. We could try using the proper compiler for python 3.5+ since it's > v12 which seems to be the minimum visual c version required for nix.

@achilleas-k
Copy link
Member

I've set up nixpy on Appveyor and I've been trying to get it to run the build for this PR but it seems like it's not possible to just trigger a build on an existing PR without any action.

I'm going to merge this and fix any build issues in master.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants