Skip to content

Commit a6cbdc1

Browse files
zsimicZoran Simic
andauthored
Ensure bootstrap venv is created with --clear (#55)
* Ensure bootstrap venv is created with --clear * Require py3.10 * Explicitly require pip for docs tox target (libs used are old and assume pip always present) --------- Co-authored-by: Zoran Simic <zsimic@netflix.com>
1 parent 4b41987 commit a6cbdc1

File tree

6 files changed

+24
-45
lines changed

6 files changed

+24
-45
lines changed

.github/workflows/release.yml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -14,14 +14,14 @@ jobs:
1414
id-token: write # mandatory for trusted publishing
1515

1616
steps:
17-
- uses: actions/checkout@v4
18-
- uses: actions/setup-python@v5
17+
- uses: actions/checkout@v5
18+
- uses: actions/setup-python@v6
1919
with:
2020
python-version: '3.11'
21-
22-
- run: pip install -U pip setuptools wheel tox
23-
- run: tox -e py,docs,style
24-
- run: python setup.py sdist bdist_wheel
25-
21+
- uses: astral-sh/setup-uv@v6
22+
- run: uv venv
23+
- run: uv pip install -U tox-uv
24+
- run: .venv/bin/tox -e py,docs,style
25+
- run: uv build
2626
- name: Publish to PyPI
2727
uses: pypa/gh-action-pypi-publish@release/v1

.github/workflows/tests.yml

Lines changed: 11 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -16,37 +16,15 @@ jobs:
1616
python-version: ['3.10', '3.11', '3.12', '3.13']
1717

1818
steps:
19-
- uses: actions/checkout@v4
20-
- uses: actions/setup-python@v5
19+
- uses: actions/checkout@v5
20+
- uses: actions/setup-python@v6
2121
with:
2222
python-version: ${{ matrix.python-version }}
23-
24-
- uses: astral-sh/setup-uv@v5
23+
- uses: astral-sh/setup-uv@v6
2524
- run: uv venv
2625
- run: uv pip install -U tox-uv
2726
- run: .venv/bin/tox -e py
28-
- uses: codecov/codecov-action@v4
29-
with:
30-
files: .tox/test-reports/coverage.xml
31-
32-
test-eol:
33-
# EOL-ed versions of python are exercised on older linux distros for a while longer
34-
# Testing against these versions will eventually be retired
35-
runs-on: ubuntu-20.04
36-
37-
strategy:
38-
matrix:
39-
python-version: ['3.6', '3.7', '3.8', '3.9']
40-
41-
steps:
42-
- uses: actions/checkout@v4
43-
- uses: actions/setup-python@v5
44-
with:
45-
python-version: ${{ matrix.python-version }}
46-
47-
- run: pip install -U pip tox
48-
- run: tox -e py
49-
- uses: codecov/codecov-action@v4
27+
- uses: codecov/codecov-action@v5
5028
with:
5129
files: .tox/test-reports/coverage.xml
5230

@@ -55,10 +33,11 @@ jobs:
5533
runs-on: ubuntu-latest
5634

5735
steps:
58-
- uses: actions/checkout@v4
59-
- uses: actions/setup-python@v5
36+
- uses: actions/checkout@v5
37+
- uses: actions/setup-python@v6
6038
with:
61-
python-version: '3.11'
62-
63-
- run: pip install -U pip tox
64-
- run: tox -e docs,style
39+
python-version: '3.13'
40+
- uses: astral-sh/setup-uv@v6
41+
- run: uv venv
42+
- run: uv pip install -U tox-uv
43+
- run: .venv/bin/tox -e docs,style

setup.py

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
versioning="dev",
77
author="Zoran Simic zoran@simicweb.com",
88
url="https://github.com/codrsquad/pickley",
9-
python_requires=">=3.6",
9+
python_requires=">=3.10",
1010
entry_points={
1111
"console_scripts": [
1212
"pickley = pickley.__main__:main",
@@ -21,10 +21,6 @@
2121
"Operating System :: Unix",
2222
"Programming Language :: Python",
2323
"Programming Language :: Python :: 3",
24-
"Programming Language :: Python :: 3.6",
25-
"Programming Language :: Python :: 3.7",
26-
"Programming Language :: Python :: 3.8",
27-
"Programming Language :: Python :: 3.9",
2824
"Programming Language :: Python :: 3.10",
2925
"Programming Language :: Python :: 3.11",
3026
"Programming Language :: Python :: 3.12",

src/pickley/bstrap.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@ def bootstrap_pickley_with_uv(self, venv_folder: Path, uv_path=None):
118118
uv_bootstrap.auto_bootstrap_uv()
119119
uv_path = uv_bootstrap.uv_path
120120

121-
run_program(uv_path, "venv", "-p", sys.executable, venv_folder)
121+
run_program(uv_path, "venv", "--clear", "-p", sys.executable, venv_folder)
122122
env = dict(os.environ)
123123
env["VIRTUAL_ENV"] = venv_folder
124124
args = []

tests/test_bootstrap.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,12 +65,14 @@ def test_bootstrap_script(cli, monkeypatch):
6565
assert cli.succeeded
6666
assert "Would seed .config/pip/pip.conf with http://localhost:12345" in cli.logged
6767
assert "Setting PIP_INDEX_URL and UV_INDEX_URL to http://localhost:12345" in cli.logged
68+
assert "uv venv --clear -p " in cli.logged
6869
assert cli.match("Would run: .../.local/bin/.pk/.cache/pickley-bootstrap-venv/bin/pickley -vv bootstrap")
6970

7071
cli.run("-n", cli.project_folder)
7172
assert cli.succeeded
7273
assert ".local/bin/.pk/.cache/pickley-bootstrap-venv/bin/pickley bootstrap " in cli.logged
7374
if bstrap.USE_UV:
75+
assert "uv venv --clear -p " in cli.logged
7476
assert runez.is_executable(uv_path) # Seeded by bootstrap command run above
7577
assert ".local/bin/uv -q pip install -e " in cli.logged
7678

tox.ini

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,8 @@ commands = coverage combine
2323
skip_install = True
2424
deps = check-manifest
2525
readme-renderer
26+
pip
27+
setuptools
2628
commands = check-manifest
2729
python setup.py check --strict --restructuredtext
2830

0 commit comments

Comments
 (0)