diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index b4e9998..e1e46a5 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -14,14 +14,14 @@ jobs: id-token: write # mandatory for trusted publishing steps: - - uses: actions/checkout@v4 - - uses: actions/setup-python@v5 + - uses: actions/checkout@v5 + - uses: actions/setup-python@v6 with: python-version: '3.11' - - - run: pip install -U pip setuptools wheel tox - - run: tox -e py,docs,style - - run: python setup.py sdist bdist_wheel - + - uses: astral-sh/setup-uv@v6 + - run: uv venv + - run: uv pip install -U tox-uv + - run: .venv/bin/tox -e py,docs,style + - run: uv build - name: Publish to PyPI uses: pypa/gh-action-pypi-publish@release/v1 diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index a0b520d..b8c4d30 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -16,37 +16,15 @@ jobs: python-version: ['3.10', '3.11', '3.12', '3.13'] steps: - - uses: actions/checkout@v4 - - uses: actions/setup-python@v5 + - uses: actions/checkout@v5 + - uses: actions/setup-python@v6 with: python-version: ${{ matrix.python-version }} - - - uses: astral-sh/setup-uv@v5 + - uses: astral-sh/setup-uv@v6 - run: uv venv - run: uv pip install -U tox-uv - run: .venv/bin/tox -e py - - uses: codecov/codecov-action@v4 - with: - files: .tox/test-reports/coverage.xml - - test-eol: - # EOL-ed versions of python are exercised on older linux distros for a while longer - # Testing against these versions will eventually be retired - runs-on: ubuntu-20.04 - - strategy: - matrix: - python-version: ['3.6', '3.7', '3.8', '3.9'] - - steps: - - uses: actions/checkout@v4 - - uses: actions/setup-python@v5 - with: - python-version: ${{ matrix.python-version }} - - - run: pip install -U pip tox - - run: tox -e py - - uses: codecov/codecov-action@v4 + - uses: codecov/codecov-action@v5 with: files: .tox/test-reports/coverage.xml @@ -55,10 +33,11 @@ jobs: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v4 - - uses: actions/setup-python@v5 + - uses: actions/checkout@v5 + - uses: actions/setup-python@v6 with: - python-version: '3.11' - - - run: pip install -U pip tox - - run: tox -e docs,style + python-version: '3.13' + - uses: astral-sh/setup-uv@v6 + - run: uv venv + - run: uv pip install -U tox-uv + - run: .venv/bin/tox -e docs,style diff --git a/setup.py b/setup.py index d114ebc..a9777dd 100644 --- a/setup.py +++ b/setup.py @@ -6,7 +6,7 @@ versioning="dev", author="Zoran Simic zoran@simicweb.com", url="https://github.com/codrsquad/pickley", - python_requires=">=3.6", + python_requires=">=3.10", entry_points={ "console_scripts": [ "pickley = pickley.__main__:main", @@ -21,10 +21,6 @@ "Operating System :: Unix", "Programming Language :: Python", "Programming Language :: Python :: 3", - "Programming Language :: Python :: 3.6", - "Programming Language :: Python :: 3.7", - "Programming Language :: Python :: 3.8", - "Programming Language :: Python :: 3.9", "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.11", "Programming Language :: Python :: 3.12", diff --git a/src/pickley/bstrap.py b/src/pickley/bstrap.py index 759d72b..2b3b26d 100644 --- a/src/pickley/bstrap.py +++ b/src/pickley/bstrap.py @@ -118,7 +118,7 @@ def bootstrap_pickley_with_uv(self, venv_folder: Path, uv_path=None): uv_bootstrap.auto_bootstrap_uv() uv_path = uv_bootstrap.uv_path - run_program(uv_path, "venv", "-p", sys.executable, venv_folder) + run_program(uv_path, "venv", "--clear", "-p", sys.executable, venv_folder) env = dict(os.environ) env["VIRTUAL_ENV"] = venv_folder args = [] diff --git a/tests/test_bootstrap.py b/tests/test_bootstrap.py index 11f8258..397b4e7 100644 --- a/tests/test_bootstrap.py +++ b/tests/test_bootstrap.py @@ -65,12 +65,14 @@ def test_bootstrap_script(cli, monkeypatch): assert cli.succeeded assert "Would seed .config/pip/pip.conf with http://localhost:12345" in cli.logged assert "Setting PIP_INDEX_URL and UV_INDEX_URL to http://localhost:12345" in cli.logged + assert "uv venv --clear -p " in cli.logged assert cli.match("Would run: .../.local/bin/.pk/.cache/pickley-bootstrap-venv/bin/pickley -vv bootstrap") cli.run("-n", cli.project_folder) assert cli.succeeded assert ".local/bin/.pk/.cache/pickley-bootstrap-venv/bin/pickley bootstrap " in cli.logged if bstrap.USE_UV: + assert "uv venv --clear -p " in cli.logged assert runez.is_executable(uv_path) # Seeded by bootstrap command run above assert ".local/bin/uv -q pip install -e " in cli.logged diff --git a/tox.ini b/tox.ini index 6df5a46..c88d116 100644 --- a/tox.ini +++ b/tox.ini @@ -23,6 +23,8 @@ commands = coverage combine skip_install = True deps = check-manifest readme-renderer + pip + setuptools commands = check-manifest python setup.py check --strict --restructuredtext