Skip to content
Snippets Groups Projects
Select Git revision
  • f40ecaa03a60806b13ee9feb316ddc626fced99f
  • main default protected
  • add-pre-commit-improve-tox-setup
  • source-documentation-demo
  • fix-code-coverage-percentage-badge
  • ci-base-image
6 results

python-binary-wheel-package

  • Open with
  • Download source code
  • Your workspaces

      A workspace is a virtual sandbox environment for your code in GitLab.

      No agents available to create workspaces. Please consult Workspaces documentation for troubleshooting.

  • Dantali0n's avatar
    CWG-75: Secure jobs with secrets and raise awareness
    Corné Lukken authored and lukken committed
    f40ecaa0
    History

    Example Python Binary Extension Wheel Package

    Build status Test coverage

    An example repository of an CI/CD pipeline for building, testing and publishing a python package that uses binary extensions compiled as wheels.

    If you find some missing functionality with regards to CI/CD, testing, linting or something else, feel free to make a merge request with the proposed changes.

    Features:

    • Compile C / C++11 and bind with Python
    • Automatic versioning using semantic version tags (git tag vX.X.X)
      • Versions from setuptools-scm in Python are bound and forwarded to the C / C++ extension using the DynamicVersion git submodule.
    • Run any task performed by CI/CD locally such as:
      • linting (tox -e black, tox -e pylint, tox -e pep8)
        • automatically format code (tox -e format)
      • unit tests (tox -e py37)
      • code coverage (tox -e coverage)
      • building & packaging (tox -e build-local, tox -e build-ci-linux)
    • Automatically publish new releases to the gitlab package repository
    • CI/CD uses docker base image to speed up pipeline

    How to apply this template

    This templates uses cookiecutter which can be installed easily:

    pip install --user cookiecutter

    Then you can create an instance of your template with:

    cookiecutter https://git.astron.nl/templates/python-binary-wheel-package.git
    # Next follow a set of prompts (such as the name and description of the package)

    Gitlab security, secrets and role configuration

    When using these templates for a repository on git.astron.nl please read the following pages to configure Gitlab appropriately:

    1. Gitlab Repository Configuration
    2. Continuous delivery guideline

    License

    This project is licensed under the Apache License Version 2.0