From a575cee6256a949f68b71bb14e5126ae195a7cb9 Mon Sep 17 00:00:00 2001 From: Arie Bovenberg Date: Fri, 5 Jul 2024 12:24:15 +0200 Subject: [PATCH] Include third-party licenses in distribution --- .github/workflows/wheels.yml | 20 ++++++++++++-------- README.md | 6 ++++++ pyproject.toml | 1 - 3 files changed, 18 insertions(+), 9 deletions(-) diff --git a/.github/workflows/wheels.yml b/.github/workflows/wheels.yml index c854f65d..a5e89374 100644 --- a/.github/workflows/wheels.yml +++ b/.github/workflows/wheels.yml @@ -17,18 +17,18 @@ jobs: matrix: include: # manylinux targets + - os: linux + target: x86_64 - os: linux target: x86 - os: linux - target: x86_64 + target: aarch64 - os: linux target: armv7 - os: linux target: ppc64le - os: linux target: s390x - - os: linux - target: aarch64 # musllinux targets - os: linux @@ -64,11 +64,11 @@ jobs: with: python-version: '3.12' architecture: ${{ matrix.python-architecture || 'x64' }} - - run: | - pip install -U twine - sed -i ${{ (matrix.os == 'macos' && '""') || '' }} 's/build-backend = "setuptools.build_meta"/build-backend = "maturin"/' pyproject.toml - sed -i ${{ (matrix.os == 'macos' && '""') || '' }} 's/^requires = \["setuptools", .*]/requires = \["maturin>=1.0,<2.0"\]/' pyproject.toml - tail pyproject.toml + - run: pip install -U twine + - name: Generate third-party license information + run: | + cargo install cargo-3pl --version 0.1.3 + cargo 3pl > LICENSE-THIRD-PARTY - name: build wheels uses: PyO3/maturin-action@v1 with: @@ -88,6 +88,10 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 + - name: Generate third-party license information + run: | + cargo install cargo-3pl --version 0.1.3 + cargo 3pl > LICENSE-THIRD-PARTY - name: Build sdist run: | pip install build twine diff --git a/README.md b/README.md index 0c5d1722..2bdce7bd 100644 --- a/README.md +++ b/README.md @@ -202,6 +202,12 @@ will help you adjust to any API changes. > versions. After 1.0, backwards compatibility of pickles will be maintained > as much as possible. +## License + +**Whenever** is licensed under the MIT License. +The binary wheels contain Rust dependencies which are licensed under MIT or Apache 2.0. +These licenses are included in the wheels and source distributions. + ## Acknowledgements This project is inspired by the following projects. Check them out! diff --git a/pyproject.toml b/pyproject.toml index 0b6b350c..6edc7b8d 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -89,7 +89,6 @@ find = { where = ["pysrc"] } # extension from source distributions. # However, we also use maturin to build the binary distributions (wheels) # since it is *very* convenient for this purpose. -# During wheel building, we set build-backend to `maturin` [tool.maturin] python-source = "pysrc" module-name = "whenever._whenever"