From e210a4aabebb5b0fd847e2a4b0a9ac34310959f6 Mon Sep 17 00:00:00 2001 From: Nyako Shigure Date: Mon, 28 Sep 2026 23:47:21 +0800 Subject: [PATCH 1/4] =?UTF-8?q?=E2=9C=A8=20feat:=20require=20Python=203.11?= =?UTF-8?q?=20and=20test=20Python=203.15=20packages?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/test.yml | 27 +++++++++++++++++++ README.md | 4 +++ pyproject.toml | 7 ++++- tests/python-package.sh | 55 ++++++++++++++++++++++++++++++++++++++ 4 files changed, 92 insertions(+), 1 deletion(-) create mode 100644 tests/python-package.sh diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 4a9a434..bfe04d3 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -47,3 +47,30 @@ jobs: meowda deactivate EOF cargo uninstall meowda + + python-package: + name: Python package (${{ matrix.python-version }}) + runs-on: ubuntu-latest + strategy: + fail-fast: false + matrix: + python-version: ["3.11", "3.12", "3.13", "3.14", "3.15", "3.15t"] + steps: + - name: Checkout + uses: actions/checkout@v7 + - name: Install uv and Python + uses: astral-sh/setup-uv@v10.2.0 + with: + python-version: ${{ matrix.python-version }} + - name: Build sdist and wheel + # With no format flags, uv builds the wheel from the sdist via PEP 517. + # bindings = "bin" produces a py3-none platform wheel, not a PyO3 module. + run: uv build --out-dir dist + - name: Install wheel + run: | + uv venv .venv + uv pip install --python .venv/bin/python dist/*.whl + - name: Test installed package and managed environments + run: | + export PATH="$PWD/.venv/bin:$PATH" + bash tests/python-package.sh '${{ matrix.python-version }}' diff --git a/README.md b/README.md index 901c8d1..1222c8f 100644 --- a/README.md +++ b/README.md @@ -17,6 +17,10 @@ Make sure you have [uv](https://docs.astral.sh/uv/) installed. See the [official installation guide](https://docs.astral.sh/uv/getting-started/installation/) for detailed instructions. +Installing the Python package requires Python 3.11 or newer. Package CI builds and installs it on Python 3.11–3.15, including free-threaded Python 3.15 (`3.15t`), and tests creating and forking environments with those interpreters. Python 3.15 is currently tested with prerelease interpreters. + +Meowda is a standalone Rust executable, packaged by maturin with `bindings = "bin"`; its platform wheels use the `py3-none` tag, not a CPython/PyO3 extension ABI. The package's minimum Python version does not restrict the versions of environments Meowda can manage through uv. `meowda create` still defaults to Python 3.14; use `-p 3.15` or `-p 3.15t` to opt into those versions. + ### Install Meowda #### Using uv (Recommended) diff --git a/pyproject.toml b/pyproject.toml index 2619659..d9a68f9 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -6,13 +6,18 @@ build-backend = "maturin" name = "meowda" description = "Meowda 🐱 —— 「喵哒」 Manage multiple Python virtual environments with ease" readme = "README.md" -requires-python = ">=3.10" +requires-python = ">=3.11" authors = [{ name = "Nyakku Shigure", email = "sigure.qaq@gmail.com" }] keywords = ["meowda", "cli", "uv", "environment", "conda-like"] license = "MIT" license-files = ["LICENSE"] classifiers = [ "Programming Language :: Rust", + "Programming Language :: Python :: 3.11", + "Programming Language :: Python :: 3.12", + "Programming Language :: Python :: 3.13", + "Programming Language :: Python :: 3.14", + "Programming Language :: Python :: 3.15", "Programming Language :: Python :: Implementation :: CPython", "Programming Language :: Python :: Implementation :: PyPy", ] diff --git a/tests/python-package.sh b/tests/python-package.sh new file mode 100644 index 0000000..f314a4c --- /dev/null +++ b/tests/python-package.sh @@ -0,0 +1,55 @@ +#!/usr/bin/env bash +# Run with the wheel installed in the Python environment on PATH. +set -euxo pipefail + +python_version=${1:?Usage: bash tests/python-package.sh } +test_dir=$(mktemp -d) +trap 'rm -rf "$test_dir"' EXIT +export MEOWDA_GLOBAL_VENV_DIR="$test_dir/venvs" + +check_python() { + python - "$python_version" "${1:-}" <<'PY' +import sys +import sysconfig + +if sys.argv[2] == "requests": + import requests + print(requests.__version__) + +requested = sys.argv[1] +assert sys.version_info[:2] == tuple(map(int, requested.rstrip("t").split("."))) +assert bool(sysconfig.get_config_var("Py_GIL_DISABLED")) == requested.endswith("t") +if requested.endswith("t"): + assert not sys._is_gil_enabled() +print(sys.version) +PY +} + +check_python +python - <<'PY' +from importlib.metadata import distribution + +package = distribution("meowda") +assert package.metadata["Requires-Python"] == ">=3.11" +# Maturin packages a standalone executable, not a CPython extension module. +assert "Tag: py3-none-" in package.read_text("WHEEL") +PY +meowda --version +meowda --help +meowda init "$test_dir/init.sh" +# shellcheck source=/dev/null +source "$test_dir/init.sh" +meowda create test-venv -p "$python_version" +meowda activate test-venv +check_python +meowda install requests +check_python requests +meowda fork forked-venv --from test-venv +meowda deactivate +meowda activate forked-venv +check_python requests +meowda deactivate +meowda remove forked-venv +meowda remove test-venv +test ! -d "$MEOWDA_GLOBAL_VENV_DIR/test-venv" +test ! -d "$MEOWDA_GLOBAL_VENV_DIR/forked-venv" From 7edd7ba17f996bfb15a0dfc5b3d56f3d6a58f01c Mon Sep 17 00:00:00 2001 From: Nyako Shigure Date: Tue, 29 Sep 2026 00:23:12 +0800 Subject: [PATCH 2/4] =?UTF-8?q?=E2=99=BB=EF=B8=8F=20refactor:=20reuse=20ex?= =?UTF-8?q?isting=20E2E=20workflow=20for=20Python=20matrix?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/test.yml | 42 +++++++++-------------------- README.md | 4 +-- tests/python-package.sh | 55 -------------------------------------- 3 files changed, 13 insertions(+), 88 deletions(-) delete mode 100644 tests/python-package.sh diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index bfe04d3..3376a34 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -13,6 +13,10 @@ env: jobs: run-test: runs-on: ubuntu-latest + strategy: + fail-fast: false + matrix: + python-version: ["3.11", "3.12", "3.13", "3.14", "3.15", "3.15t"] steps: - name: Checkout uses: actions/checkout@v7 @@ -30,6 +34,8 @@ jobs: key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }} - name: Install uv uses: astral-sh/setup-uv@v10.2.0 + with: + python-version: ${{ matrix.python-version }} - name: Build if: steps.cargo-cache.outputs.cache-hit != 'true' run: cargo build --release --verbose @@ -37,40 +43,16 @@ jobs: run: cargo test --release --verbose - name: E2E test run: | - cargo install --path . + uv build + uv venv .venv + uv pip install --python .venv/bin/python dist/*.whl + export PATH="$PWD/.venv/bin:$PATH" bash -euxo pipefail <<'EOF' meowda init init.sh source init.sh - meowda create test-venv -p 3.14 + meowda create test-venv -p '${{ matrix.python-version }}' meowda activate test-venv meowda install requests + python -c 'import requests, sys; assert not ("${{ matrix.python-version }}".endswith("t") and sys._is_gil_enabled())' meowda deactivate EOF - cargo uninstall meowda - - python-package: - name: Python package (${{ matrix.python-version }}) - runs-on: ubuntu-latest - strategy: - fail-fast: false - matrix: - python-version: ["3.11", "3.12", "3.13", "3.14", "3.15", "3.15t"] - steps: - - name: Checkout - uses: actions/checkout@v7 - - name: Install uv and Python - uses: astral-sh/setup-uv@v10.2.0 - with: - python-version: ${{ matrix.python-version }} - - name: Build sdist and wheel - # With no format flags, uv builds the wheel from the sdist via PEP 517. - # bindings = "bin" produces a py3-none platform wheel, not a PyO3 module. - run: uv build --out-dir dist - - name: Install wheel - run: | - uv venv .venv - uv pip install --python .venv/bin/python dist/*.whl - - name: Test installed package and managed environments - run: | - export PATH="$PWD/.venv/bin:$PATH" - bash tests/python-package.sh '${{ matrix.python-version }}' diff --git a/README.md b/README.md index 1222c8f..f3c572a 100644 --- a/README.md +++ b/README.md @@ -17,9 +17,7 @@ Make sure you have [uv](https://docs.astral.sh/uv/) installed. See the [official installation guide](https://docs.astral.sh/uv/getting-started/installation/) for detailed instructions. -Installing the Python package requires Python 3.11 or newer. Package CI builds and installs it on Python 3.11–3.15, including free-threaded Python 3.15 (`3.15t`), and tests creating and forking environments with those interpreters. Python 3.15 is currently tested with prerelease interpreters. - -Meowda is a standalone Rust executable, packaged by maturin with `bindings = "bin"`; its platform wheels use the `py3-none` tag, not a CPython/PyO3 extension ABI. The package's minimum Python version does not restrict the versions of environments Meowda can manage through uv. `meowda create` still defaults to Python 3.14; use `-p 3.15` or `-p 3.15t` to opt into those versions. +The Python package requires Python 3.11+ and is tested through Python 3.15 (currently prerelease), including `3.15t`. This installation minimum does not restrict the Python versions managed through uv. ### Install Meowda diff --git a/tests/python-package.sh b/tests/python-package.sh deleted file mode 100644 index f314a4c..0000000 --- a/tests/python-package.sh +++ /dev/null @@ -1,55 +0,0 @@ -#!/usr/bin/env bash -# Run with the wheel installed in the Python environment on PATH. -set -euxo pipefail - -python_version=${1:?Usage: bash tests/python-package.sh } -test_dir=$(mktemp -d) -trap 'rm -rf "$test_dir"' EXIT -export MEOWDA_GLOBAL_VENV_DIR="$test_dir/venvs" - -check_python() { - python - "$python_version" "${1:-}" <<'PY' -import sys -import sysconfig - -if sys.argv[2] == "requests": - import requests - print(requests.__version__) - -requested = sys.argv[1] -assert sys.version_info[:2] == tuple(map(int, requested.rstrip("t").split("."))) -assert bool(sysconfig.get_config_var("Py_GIL_DISABLED")) == requested.endswith("t") -if requested.endswith("t"): - assert not sys._is_gil_enabled() -print(sys.version) -PY -} - -check_python -python - <<'PY' -from importlib.metadata import distribution - -package = distribution("meowda") -assert package.metadata["Requires-Python"] == ">=3.11" -# Maturin packages a standalone executable, not a CPython extension module. -assert "Tag: py3-none-" in package.read_text("WHEEL") -PY -meowda --version -meowda --help -meowda init "$test_dir/init.sh" -# shellcheck source=/dev/null -source "$test_dir/init.sh" -meowda create test-venv -p "$python_version" -meowda activate test-venv -check_python -meowda install requests -check_python requests -meowda fork forked-venv --from test-venv -meowda deactivate -meowda activate forked-venv -check_python requests -meowda deactivate -meowda remove forked-venv -meowda remove test-venv -test ! -d "$MEOWDA_GLOBAL_VENV_DIR/test-venv" -test ! -d "$MEOWDA_GLOBAL_VENV_DIR/forked-venv" From 3e653ad97f586d893a037d82db55a1064fe7d111 Mon Sep 17 00:00:00 2001 From: Nyako Shigure Date: Tue, 29 Sep 2026 00:56:56 +0800 Subject: [PATCH 3/4] =?UTF-8?q?=E2=99=BB=EF=B8=8F=20refactor:=20limit=20Py?= =?UTF-8?q?thon=20upgrade=20to=20package=20floor=20and=20existing=20CI?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/test.yml | 3 +-- README.md | 2 -- pyproject.toml | 5 ----- 3 files changed, 1 insertion(+), 9 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 3376a34..e000b89 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -14,9 +14,8 @@ jobs: run-test: runs-on: ubuntu-latest strategy: - fail-fast: false matrix: - python-version: ["3.11", "3.12", "3.13", "3.14", "3.15", "3.15t"] + python-version: ["3.11", "3.14", "3.15", "3.15t"] steps: - name: Checkout uses: actions/checkout@v7 diff --git a/README.md b/README.md index f3c572a..901c8d1 100644 --- a/README.md +++ b/README.md @@ -17,8 +17,6 @@ Make sure you have [uv](https://docs.astral.sh/uv/) installed. See the [official installation guide](https://docs.astral.sh/uv/getting-started/installation/) for detailed instructions. -The Python package requires Python 3.11+ and is tested through Python 3.15 (currently prerelease), including `3.15t`. This installation minimum does not restrict the Python versions managed through uv. - ### Install Meowda #### Using uv (Recommended) diff --git a/pyproject.toml b/pyproject.toml index d9a68f9..a98e62a 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -13,11 +13,6 @@ license = "MIT" license-files = ["LICENSE"] classifiers = [ "Programming Language :: Rust", - "Programming Language :: Python :: 3.11", - "Programming Language :: Python :: 3.12", - "Programming Language :: Python :: 3.13", - "Programming Language :: Python :: 3.14", - "Programming Language :: Python :: 3.15", "Programming Language :: Python :: Implementation :: CPython", "Programming Language :: Python :: Implementation :: PyPy", ] From 6dab6d464c9538f2f4c975fbd29cee53e49cce1c Mon Sep 17 00:00:00 2001 From: Nyako Shigure Date: Tue, 29 Sep 2026 02:19:29 +0800 Subject: [PATCH 4/4] =?UTF-8?q?=E2=99=BB=EF=B8=8F=20refactor:=20restore=20?= =?UTF-8?q?cargo=20E2E=20and=20use=20one-line=20package=20smoke?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/test.yml | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index e000b89..e0f6660 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -42,16 +42,14 @@ jobs: run: cargo test --release --verbose - name: E2E test run: | - uv build - uv venv .venv - uv pip install --python .venv/bin/python dist/*.whl - export PATH="$PWD/.venv/bin:$PATH" + uvx --from . meowda --version + cargo install --path . bash -euxo pipefail <<'EOF' meowda init init.sh source init.sh meowda create test-venv -p '${{ matrix.python-version }}' meowda activate test-venv meowda install requests - python -c 'import requests, sys; assert not ("${{ matrix.python-version }}".endswith("t") and sys._is_gil_enabled())' meowda deactivate EOF + cargo uninstall meowda