From 726d9b3272f8469f52399701bed83ed7565dceae Mon Sep 17 00:00:00 2001 From: bymoye <964907582@qq.com> Date: Sat, 28 Oct 2023 19:51:20 +0800 Subject: [PATCH] support python3.12 --- .github/workflows/python-publish.yml | 14 ++++++++------ nazo_rand/nazo_rand.hpp | 4 +++- pyproject.toml | 2 +- requirements.txt | 3 ++- setup.py | 3 ++- 5 files changed, 16 insertions(+), 10 deletions(-) diff --git a/.github/workflows/python-publish.yml b/.github/workflows/python-publish.yml index 714b8f7..992e6f6 100644 --- a/.github/workflows/python-publish.yml +++ b/.github/workflows/python-publish.yml @@ -26,7 +26,7 @@ jobs: strategy: fail-fast: false matrix: - python-version: [3.8, 3.9, "3.10", "3.11"] + python-version: [3.8, 3.9, "3.10", "3.11", "3.12"] runs-on: windows-latest if: github.event_name == 'pull_request' || github.event_name == 'push' @@ -40,7 +40,8 @@ jobs: - name: Install dependencies run: | - pip install cython==0.29.34 --config-setting no_cython_compile=True --no-cache-dir + pip install cython==3.0.4 --config-setting no_cython_compile=True --no-cache-dir + pip install setuptools - name: Compile Cython extensions run: | @@ -52,7 +53,7 @@ jobs: fail-fast: false matrix: os: [ubuntu-latest] - python-version: [3.8, 3.9, "3.10", "3.11"] + python-version: [3.8, 3.9, "3.10", "3.11", "3.12"] runs-on: ${{ matrix.os }} steps: @@ -68,7 +69,8 @@ jobs: - name: Install dependencies run: | - pip install cython==0.29.34 --config-setting no_cython_compile=True --no-cache-dir + pip install cython==3.0.4 --config-setting no_cython_compile=True --no-cache-dir + pip install setuptools - name: Compile Cython extensions run: | @@ -80,7 +82,7 @@ jobs: strategy: fail-fast: false matrix: - python-version: [3.8, 3.9, "3.10", "3.11"] + python-version: [3.8, 3.9, "3.10", "3.11", "3.12"] os: [ubuntu-latest, macos-latest, windows-latest] steps: @@ -95,7 +97,7 @@ jobs: - name: Install build dependencies run: | - pip install cython==0.29.34 --config-setting no_cython_compile=True --no-cache-dir + pip install cython==3.0.4 --config-setting no_cython_compile=True --no-cache-dir python -m pip install --upgrade setuptools pip wheel build - name: Compile Cython extensions diff --git a/nazo_rand/nazo_rand.hpp b/nazo_rand/nazo_rand.hpp index 3ada012..984da47 100644 --- a/nazo_rand/nazo_rand.hpp +++ b/nazo_rand/nazo_rand.hpp @@ -3,7 +3,9 @@ #include #include #include - +#include +#include +#include namespace Storm { using Integer = int64_t; diff --git a/pyproject.toml b/pyproject.toml index 869f415..ff00baa 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -9,7 +9,7 @@ build-backend = "setuptools.build_meta" [metadata] name = "nazo_rand" -version = "0.0.9" +version = "0.1.0" author = "bymoye" author_email = "s3moye@gmail.com" readme = "README.md" diff --git a/requirements.txt b/requirements.txt index f930574..173ab8b 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1 +1,2 @@ -Cython==0.29.34; \ No newline at end of file +setuptools +Cython==3.0.4 \ No newline at end of file diff --git a/setup.py b/setup.py index 46f1018..2589440 100644 --- a/setup.py +++ b/setup.py @@ -40,7 +40,7 @@ def readme(): ), author="bymoye", author_email="s3moye@gmail.com", - version="0.0.9", + version="0.1.0", description="A fast random number generator for python", long_description=readme(), long_description_content_type="text/markdown", @@ -60,6 +60,7 @@ def readme(): "Programming Language :: Python :: 3.9", "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.11", + "Programming Language :: Python :: 3.12", "Programming Language :: Cython", "Programming Language :: C++", "Operating System :: POSIX :: Linux",