This PR attempts to unify the build process such that a single python setup.py install builds and installs the whole library. Ditto for pip.
To accomplish this, libchord.so is now being compiled at the build_py step (for stupid, setuptools-related reasons) and then copied into the package.
The extension is compiled with the right rpath, $ORIGIN, and install_name settings so that things work. Getting this to work cost me a good chunk of my sanity and will probably leave me with setuptools related PTSD for the foreseeable future.
To summarise:
python setup.py install, pip install ., pip install git+https://github.com/tilmantroester/PolyChordLite.git@compile_stuff_for_pip#egg=pypolychord seem to work on both Linux and macOS for MPI.
A no-MPI install is also possible by setting the --no-mpi flag. Note that the flag position is after setup.py, e.g., python setup.py --no-mpi install, for stupid, setuptools-related reasons.
There's now a python setup.py clean command that runs make veryclean
This should probably be tested in more detail. At the moment it is based of the setup_pip branch but I think it could easily be rebased to master.
This PR attempts to unify the build process such that a single
python setup.py install
builds and installs the whole library. Ditto forpip
. To accomplish this,libchord.so
is now being compiled at thebuild_py
step (for stupid, setuptools-related reasons) and then copied into the package. The extension is compiled with the rightrpath
,$ORIGIN
, andinstall_name
settings so that things work. Getting this to work cost me a good chunk of my sanity and will probably leave me with setuptools related PTSD for the foreseeable future.To summarise:
python setup.py install
,pip install .
,pip install git+https://github.com/tilmantroester/PolyChordLite.git@compile_stuff_for_pip#egg=pypolychord
seem to work on both Linux and macOS for MPI.--no-mpi
flag. Note that the flag position is aftersetup.py
, e.g.,python setup.py --no-mpi install
, for stupid, setuptools-related reasons.python setup.py clean
command that runsmake veryclean
This should probably be tested in more detail. At the moment it is based of the
setup_pip
branch but I think it could easily be rebased to master.