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

Have Python wheel #1326

Closed
brenthuisman opened this issue Jan 25, 2021 · 3 comments · Fixed by #1399
Closed

Have Python wheel #1326

brenthuisman opened this issue Jan 25, 2021 · 3 comments · Fixed by #1399
Assignees
Labels
enhancement packaging Installation from source and production of distro packages, python packages. python

Comments

@brenthuisman
Copy link
Contributor

brenthuisman commented Jan 25, 2021

Having a Python wheel would speed up installation and remove the requirement for users to have a compilation pipeline set up.

Currently, if you pip install arbor, you will see output like:

Building wheels for collected packages: arbor
  Building wheel for arbor (setup.py) ... done
  Created wheel for arbor: filename=arbor-0.5-cp38-cp38-linux_x86_64.whl size=1322418 sha256=83fc9fe7d03f7afc73f69210bb9ea4373b08ee5d4c66180b9cfbb52c1aad35ac
  Stored in directory: /p/home/jusers/huisman1/jusuf/.cache/pip/wheels/09/18/68/ceac2887642e9c2e49a20630e3e5a94572bec0a994058e82dc
Successfully built arbor

If you take that wheel, it's perfectly installable in other envs/machines right now (just tested), as long as you match the platform. Turning that into manylinux (most recent version is 2014, see PEP 599) seems like it shouldn't be so difficult (famous last words, I know).

@brenthuisman brenthuisman added enhancement python packaging Installation from source and production of distro packages, python packages. labels Jan 25, 2021
@brenthuisman brenthuisman self-assigned this Jan 25, 2021
@brenthuisman
Copy link
Contributor Author

brenthuisman commented Feb 5, 2021

@brenthuisman
Copy link
Contributor Author

brenthuisman commented Feb 23, 2021

Manylinux wheels are not supposed to link against libpython, hence the problem building Arbor on the various manylinux images. Running auditwheel on a locally built Arbor bdist_wheel confirms:

auditwheel: error: cannot repair "dist/arbor-0.5.1.dev0-cp39-cp39-linux_x86_64.whl" to "manylinux1_x86_64" ABI because of the presence of too-recent versioned symbols. You'll need to compile the wheel on an older toolchain.

Of course, it wasn't built on any of the manylinux images. So, I understand why both my local wheels can't work and why compiling Arbor in the manylinux image doesn't either. I should solve the latter to actually have the wheels we want.

Similar struggles:

Pybind hint: use Development.Module and not Development when configging CMake. Confirmed: this makes Arbor compile in the PyPA manylinux image. auditwheel can make manylinux wheels succesfully. Creating a GA workflow that uploads to testpypi.

@brenthuisman
Copy link
Contributor Author

brenthuisman commented Feb 24, 2021

Binary wheel production is now working for Linux and Macos. Todo/to decide:

  • Make sdist for other envs (python setup.py sdist)
  • Get token for arbor project on TestPyPI
    • Generate version numbers?
  • Run tests on the wheels?
  • Upload version tags to PyPI automatically?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement packaging Installation from source and production of distro packages, python packages. python
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant