Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
  • Sign in
  • C CrysFML
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 0
    • Issues 0
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 0
    • Merge requests 0
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages and registries
    • Packages and registries
    • Container Registry
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • Scientific Software
  • CrysFML
  • Merge requests
  • !17

Feature - Python_api wheels

  • Review changes

  • Download
  • Email patches
  • Plain diff
Merged Simon Ward requested to merge feature-python_api-build_wheels into master Jul 22, 2021
  • Overview 0
  • Commits 64
  • Pipelines 1
  • Changes 20

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:

  • On Linux, building can be performed on the users system, however the manylinux docker image and the script Scripts/buildwheel.sh should be considered as the resulting package is linux distribution agnostic. The resulting wheel does not depend on python 3.x version
  • On OSX, The resulting wheel does not depend on python 3.x version but the python package delocate should be used to add the necessary libraries to the wheel.
  • On Windows things are not as easy. A package has to be built for each python version and the python package 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)

Edited Jul 22, 2021 by Simon Ward
Assignee
Assign to
Reviewers
Request review from
Time tracking
Source branch: feature-python_api-build_wheels