-
-
Notifications
You must be signed in to change notification settings - Fork 65
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
Build and distribute pyosmium wheel #49
Comments
This would absolutely make sense but I don't currently have the resources to build and test this sufficiently. Leaving this issue open anyway, just in case somebody wants to pick it up. |
I'm giving this a look. After some preliminary testing it looks like manylinux / PEP513 is a way to go. Just simple move from one Ubuntu release to the other breaks standard wheel because of difference in version of boost library. The only drawback of using manylinux is that this is very conservative environment with gcc 4.8, boost 1.41 which are quite old. I still haven't tested how standard wheels behave on Windows and macOS, but looking at this ticket I fear that it might be not that easy with Windows. As for testing - I plan to use Travis /AppVeyor to build a wheel, and then run test suite in separate virtualenv, after, if possible, deinstallation of system-wide build packages (boost, boost-python etc.). |
PyOsmium uses libosmium which doesn't work with boost 1.41 and I am not sure it all works with GCC 4.8. |
Sorry, boost 1.48. At least it didn't complain during compilation, though I have problems during linking phase. Gcc 4.8 is used by travis builds so I assume, that’s what it works. Question is, how long we want to stick to it. OTOH I could just run auditwheel on Ubuntu trusty/xenial and see on how many platforms it will work |
I can test it on Mac provided the instructions. |
@wiktorn I'd suggest taking a look at https://github.com/matthew-brett/multibuild, I've used these tools to build OS X + manylinux wheels for a couple of packages w/ minimal effort. You might also take a look at the ray project which builds manylinux wheels that use boost. |
@bnaul Thank's a lot, that could help a lot. Just as I got manylinux wheels up & running on Debian / Ubuntu / Centos / Arch. |
Looks like I've got it working on Linux & macOS with Travis. On Linux I build manylinux binaries using Boost 1.67 compiled from source (as CentOS 5 has outdated Boost). Using Docker build is tested on:
It should be fairly easy to add additional distributions to test. Though they are only x64. On macOS builds use Boost provided by HomeBrew but I'm afraid that wheel will be pinned to specific Boost version and will fail to load if there is no specific version of Boost available on system. I'm not sure, if it's an improvement. @lonvia Travis CI doesn't store any build artifacts. I tried uploads to AWS S3 and as a GitHub release. Both has some drawbacks - AWS needs an account there, GitHub releases are created per job, so for one build - you get 6 releases. You can always use your own build infrastructure. Which way you plan to go with this? Next I plan to check Windows builds. Should I test any other distributions? Anything else that should be done? I've made also a separate repo using Matthew Brett Multibuild here: For now it still fails on macOS because of some Heisenbug I didn't yet manage to track. @lonvia which way do you prefer? |
* add boost prefix style used by CentOS (e.g. boost148) for includes * add BOOST_PREFIX to specify custom Boost installation * add PROTOZETO_PREFIX to specify path to Protozero See: osmcode#49
Waiting for @lonvia to finish replacing boost-python with pybind11 and then this will be far easier to build and distribute |
@wiktorn I was looking a bit through the different build options. Building locally is unfortunately out of the question because I cannot build for MacOS. This only leaves travis. My preference would be to have a separate build repo as you already started with pyosmium-wheel-build and then simply using Github Releases for the artefacts. If things work out find we could also consider pushing to PyPI directly later. |
@wiktorn What is the status on this? You said that you wanted to do some more testing. Given the rather large changes with pybind11 and the binary wheels, I'd like to roll out an exceptional pre-release, so that we can get a bit more feedback before the next full release. Also would help to test the whole workflow of wheel creation. |
Repository is moved to https://github.com/osmcode/pyosmium-wheel-build and you should have commit bit there (at least I gave it to you just before transferring it to osmcode organization). You can try now to update pyosmium, libosmium and other dependencies to desired versions and run the Travis build. As far as I can guess, Travis build still uses my API key to upload artefacts to GitHub (pyosmium-wheel-build) so it should work. Once you're satisfied with the build artefacts you can publish them wherever you want. Latest Travis failure looks like a temporary problem (performance / network access). And as for testing - I can help with testing pre-release version. |
I've did some tests installing binary wheel from this release: Success:
Failure:
But after thinking this through again it's natural that this wheels fail on Alpine Linux - it uses libmusl instead of glibc. |
Do binary wheels of other python packages work on Alpine Linux? |
As far as I've checked - no (officially). They may work if you install glibc on Alpine Linux and set your installation as manylinux compatibile (see pypa/pip#3969). So I guess it's not a showstopper. I guess that for Alpine it would be the best to provide apk binary package. |
The latest 2.15.0 release now ships with binary wheels. Many thanks to @wiktorn for pushing this forward. |
Do you think it makes sense to build and distribute a Python Wheel for PyOsmium? At the moment users need to install build-essentials, all libosmium native deps, and boost-python-dev.
Would it make sense to build a wheel and ship it, so that users can simply
and don't have to worry about dependency management?
(FYI: this is food for thought, not urgent or blocking - I noticed this while bundling a pyosmium program with Docker and was a bit surprised how much I have to pull in to get pyosmium to compile)
Here are some notes with refs to get started:
and it's a bit tricky with native deps as usual :)
The text was updated successfully, but these errors were encountered: