From a08003d5b819ae7bdf7e9561c33fa83a6b0783f6 Mon Sep 17 00:00:00 2001 From: Shunsuke Shibayama Date: Sun, 10 Sep 2023 17:58:17 +0900 Subject: [PATCH] build: lower minimum version requirements --- .github/workflows/release.yml | 12 +----------- pyproject.toml | 2 +- setup.py | 6 +++--- 3 files changed, 5 insertions(+), 15 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 7692821..b08a0d0 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -30,12 +30,6 @@ jobs: strategy: matrix: include: - # - target: armv7-unknown-linux-gnueabihf - # os: ubuntu-latest - # - target: aarch64-unknown-linux-gnu - # os: ubuntu-latest - # - target: aarch64-apple-darwin - # os: macos-latest - target: x86_64-unknown-linux-gnu platform: linux os: ubuntu-latest @@ -45,8 +39,6 @@ jobs: - target: x86_64-pc-windows-msvc platform: windows os: windows-latest - # - target: i686-pc-windows-msvc - # os: windows-latest runs-on: ${{ matrix.os }} steps: - uses: actions/checkout@v3 @@ -56,12 +48,11 @@ jobs: - name: setup-tools run: | rustup update stable - pip3 install twine build cibuildwheel setuptools-rust + pip3 install twine build cibuildwheel setuptools-rust tomli rustup target add ${{ matrix.target }} - name: build run: cibuildwheel --output-dir dist --platform ${{ matrix.platform }} env: - # CIBW_BUILD: '${{ matrix.python-version }}-*' # rust doesn't seem to be available for musl linux on i686 CIBW_SKIP: '*-musllinux_i686' CIBW_ENVIRONMENT: 'PATH="$HOME/.cargo/bin:$PATH" CARGO_TERM_COLOR="always"' @@ -70,7 +61,6 @@ jobs: CIBW_BEFORE_BUILD_LINUX: > curl https://sh.rustup.rs -sSf | sh -s -- --default-toolchain=stable --profile=minimal -y && rustup show - # CIBW_TEST_SKIP: '*-macosx_arm64 *-macosx_universal2:arm64' # CIBW_BUILD_VERBOSITY: 1 - name: upload run: | diff --git a/pyproject.toml b/pyproject.toml index 923975f..4d92892 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,2 +1,2 @@ [build-system] -requires = ["setuptools", "setuptools-rust", "wheel"] +requires = ["setuptools", "setuptools-rust", "wheel", "tomli"] diff --git a/setup.py b/setup.py index 10b9785..3d11d05 100644 --- a/setup.py +++ b/setup.py @@ -2,11 +2,11 @@ import os import shlex from glob import glob -import tomllib import shutil from setuptools import setup, Command from setuptools_rust import RustBin +import tomli class Clean(Command): user_options = [] @@ -23,7 +23,7 @@ def run(self): long_description = fp.read() with open("Cargo.toml", "rb") as fp: - toml = tomllib.load(fp) + toml = tomli.load(fp) name = toml["package"]["name"] description = toml["package"]["description"] version = toml["workspace"]["package"]["version"] @@ -54,7 +54,7 @@ def run(self): long_description_content_type="text/markdown", version=version, license=license, - python_requires=">=3.11", + python_requires=">=3", rust_extensions=[ RustBin("pylyzer", args=cargo_args, cargo_manifest_args=["--locked"]) ],