-
Notifications
You must be signed in to change notification settings - Fork 60
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
pip / setuptools support #977
Conversation
So currently GPU backends, MPI & Vectorization would not be available from pip? I think at least MPI for parallelization if frequently used (especially by NEURON users) and might better be included as default |
They are available! See the docs: |
Ok, how would that work from PyPI? Or is the default one the only one that will be available as the python package? (I thought wheels could do all the building and compilation beforehand on a machine with similar architecture as the target) |
I don't understand exactly how all the "wheeling and dealing" works... however I think that for anything but the basic version (no extras), you wouldn't want to use a pre-compiled version. Even for the basic version, users probably want to build it each time. From PyPI it would look like # vanilla version (multithreading support only)
# this might use precompiled wheels.... but I don't know if that is a good idea
pip install arbor
# install with mpi+GPU
pip install --install-option="--mpi" --install-option="--gpu" arbor |
I have seen an alternative approach:
where you can provide optional dependencies (in this case mpi4py). |
MPI is not available on every user's system by default, and furthermore it is very hard to ensure that CMake called inside the My personal position is that it makes it much harder for a new user to get started without issues. |
Sometimes I get arbitrary errors when using pip related to the following issue: The errors don't stop pip from working: it goes ahead and builds and installs the package, but without making the wheel. |
Test results:
I can't use the Python package virtualenv (because pyenv shims it) or Python's venv, but it looks good. @bcumming I suppose this error is one of them?
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
pip install git+https://github.com/arbor/arbor.git
🎉 🎈
Add a
setup.py
for installing Arbor directly with pip/setuptools.Implement a setuptools extension for CMake in
setup.py
. To be honest, I don't understand entirely how it works, but setuptools is obtuse enough that I don't feel at all guilty about this.Define additional flags for optionally enabling GPUs, MPI, Vectorization and micro-architecture targets, for more adventurous users.
The documentation is updated with a "howto pip" for more casual users who don't want anything to do with CMake.
Fixes #958 .