diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 25eca8d..c4dd87c 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -144,38 +144,6 @@ jobs: name: dist path: dist - postfix: - name: Fix up wheels - needs: [build_sdist, build_macos, build_windows, build_linux ] - runs-on: ubuntu-latest - - steps: - - uses: actions/checkout@v2 - with: - submodules: recursive - - - name: Set up Python - uses: actions/setup-python@v2 - with: - python-version: "3.x" - - - uses: actions/download-artifact@v2 - with: - name: dist - path: dist - - # https://github.com/PyO3/maturin/issues/829 - - name: Add license text file to wheels - run: | - pip install -r requirements.txt - python add_license_file_to_wheels.py dist/*.whl - - - name: Upload wheels - uses: actions/upload-artifact@v2 - with: - name: dist - path: dist - release: name: Release on tags if: startsWith(github.ref, 'refs/tags/v') diff --git a/add_license_file_to_wheels.py b/add_license_file_to_wheels.py deleted file mode 100755 index 852f31b..0000000 --- a/add_license_file_to_wheels.py +++ /dev/null @@ -1,26 +0,0 @@ -#!/usr/bin/env python3 - -import sys -from pathlib import Path -import shutil -from wheeltools import InWheel - - -root_dir = Path(__file__).parent.resolve() -crate_dir = root_dir / "pngquant" -license = crate_dir / "COPYRIGHT" - - -def main(): - # maturin has problems adding the license text to the wheel archive yet so we - # have to do it ourselves: cf. https://github.com/PyO3/maturin/issues/829 - for wheel_file in sys.argv[1:]: - print(f"Adding '{license.name}' to '{wheel_file}'") - with InWheel(in_wheel=wheel_file, out_wheel=wheel_file) as tmpdir: - distinfo = next(Path(tmpdir).glob("*.dist-info")) - assert distinfo.is_dir() - shutil.copyfile(license, distinfo / "LICENSE") - - -if __name__ == "__main__": - sys.exit(main()) diff --git a/pyproject.toml b/pyproject.toml index 7868487..8ab8979 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,5 +1,5 @@ [build-system] -requires = ["maturin>=0.12,<0.13"] +requires = ["maturin>=0.12.10,<0.13"] build-backend = "maturin" [tool.maturin] @@ -13,9 +13,10 @@ bindings = "bin" [project] name = "pngquant-cli" # by default, use the same 'version' as Cargo.toml, but can override if needed -version = "2.17.0.post5" +version = "2.17.0.post6" description = "Precompiled binaries for pngquant, the lossy PNG compressor based on libimagequant." maintainers = [{name = "Cosimo Lupo", email = "cosimo@anthrotype.com"}] +license = {file = "COPYRIGHT"} [project.urls] repository = "https://github.com/anthrotype/pngquant-wheels" diff --git a/requirements.txt b/requirements.txt index 9b77ee3..0423f19 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,5 +1,4 @@ -maturin +maturin>=0.12.10,<0.13 tomli tomli-w twine -wheeltools