Coder Social home page Coder Social logo

robtaylor / manylinux-wheels-action Goto Github PK

View Code? Open in Web Editor NEW

This project forked from tmtenbrink/maturin-manylinux-wheels-action

0.0 0.0 0.0 75 KB

Build manylinux wheels for a Python poetry project with Rust bindings with maturin as a build back-end.

License: Apache License 2.0

Shell 90.99% Dockerfile 9.01%

manylinux-wheels-action's Introduction

maturin-manylinux-wheels-action

Build manylinux wheels for a Python package with Rust bindings with maturin as a build back-end.

This action uses the manylinux Docker containers to build manylinux wheels for a Python package. The wheels are placed in a new directory <package-path>/dist and can be uploaded to PyPI in the next step of your workflow.

This is a quite specific use case, but feel free to fork and adapt to your own needs.

Usage

Requirements

  • Your project must have a pyproject.toml and use poetry for dependency management. You can define which Python packages need to be installed before build that way. poetry update is run on your package before compilation.
  • Your build back-end must be maturin, i.e. you have a Python project with Rust extensions.

Example

Minimal:

uses: tmtenbrink/[email protected]
with:
  python-versions: 'cp36-cp36m cp37-cp37m'

Using all arguments:

uses: tmtenbrink/[email protected]
with:
  py-version: '3.9'
  py-pep-425: 'cp39-cp39'
  system-packages: 'lrzip-devel zlib-devel'
  pre-build-command: 'sh pre-build-script.sh'
  package-path: 'my_project'

See test.yml for a complete example that uploads the finished wheels as an artifact. If you want to build for multiple versions of Python, you can use a matrix, for example look at wheels.yml.

Inputs

name description required default example(s)
py-version Python execution version required '3.9' 'cp36-cp36m cp37-cp37m'
py-pep-425 Python version tagsfor which to build (PEP 425 tags) wheels, as described in the manylinux image documentation required 'cp39-cp39' 'cp36-cp36m'
build-requirements Python (pip) packages required at build time, space-separated optional '' 'cython' or 'cython==0.29.14'
system-packages System (yum) packages required at build time, space-separated optional '' 'lrzip-devel zlib-devel'
pre-build-command Command to run before build, e.g. the execution of a script to perform additional build-environment setup optional '' 'sh pre-build-script.sh'
package-path Path to Python package to build (e.g. where pyproject.toml file is located), relative to repository root optional '' 'my_project'

Output

The action creates wheels, by default in the <package-path>/dist directory.

Using a different manylinux container

The manylinux2010_x86_64 container is used by default.

Contributing

Bugs, questions or suggestions? Feel free to post an issue in the issue tracker or to make a pull request!

manylinux-wheels-action's People

Contributors

ralfg avatar dries007 avatar exarkun avatar tmtenbrink avatar ahartikainen avatar legoktm avatar minrk avatar odidev avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.