Python libraries are often distributed via pypi.org, where users are used to just typing pip install xyz
to obtain a library. On pypi libraries are often packaged as wheels
, which are archives with name specifiers which say what platform/python version they are built for. For CFML to be more widely used, it is important that it is compatible with this install method. As it contains Fortran code, this has turned out to be non trivial.
This pull request introduces the setup.py
file for python packaging and changes to Cmake to make it more universal. To build the library, simply call python setup.py bdist_wheel
. Currently:
Scripts/buildwheel.sh
should be considered as the resulting package is linux distribution agnostic. The resulting wheel does not depend on python 3.x versiondelocate
should be used to add the necessary libraries to the wheel.delvewheel
should be used to add the necessary libraries to the wheel.Example wheels and workflow can be found at https://github.com/easyScience/CFML_builder/actions/runs/1054660703 (Available 90 days from 22/07/2021)