Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 31 additions & 0 deletions .github/workflows/actions.lock
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
# This file is machine-generated by `gh actions-lock`.
# Do not edit by hand; run `gh actions-lock` to update.
# Docs: https://gh.io/actions-lockfile
version: 'v0.0.3'
workflows:
'.github/workflows/ci.yml':
- 'actions/checkout@v7.0.1'
- 'actions/setup-python@v7.0.0'
- 'pantsbuild/actions@main'
- 'pex-tool/pyenv-action@main'
dependencies:
'actions/checkout@v7.0.1':
ref: 'v7.0.1'
commit: 'sha1-3d3c42e5aac5ba805825da76410c181273ba90b1'
owner_id: 44036562
repo_id: 197814629
'actions/setup-python@v7.0.0':
ref: 'v7.0.0'
commit: 'sha1-5fda3b95a4ea91299a34e894583c3862153e4b97'
owner_id: 44036562
repo_id: 192625525
'pantsbuild/actions@main':
ref: 'main'
commit: 'sha1-b16b9cf47cd566acfe217b1dafc5b452e27e6fd7'
owner_id: 3065172
repo_id: 349238734
'pex-tool/pyenv-action@main':
ref: 'main'
commit: 'sha1-dcccfcc2bb18b008eca1ee92bbb05425e7126ead'
owner_id: 159246247
repo_id: 759510979
89 changes: 48 additions & 41 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,13 +33,13 @@ jobs:
tox-env: check
steps:
- name: Checkout
uses: actions/checkout@v5
uses: actions/checkout@v7.0.1
- name: Setup Python ${{ matrix.python-version }}
uses: actions/setup-python@v6
uses: actions/setup-python@v7.0.0
with:
python-version: "${{ matrix.python-version }}"
- name: Check ${{ matrix.check-name }}
uses: pantsbuild/actions/run-tox@b16b9cf47cd566acfe217b1dafc5b452e27e6fd7
uses: pantsbuild/actions/run-tox@main
with:
tox-env: ${{ matrix.tox-env }}
unit-tests-legacy:
Expand All @@ -59,54 +59,63 @@ jobs:
os: ubuntu-24.04
- python-version: [3, 8, 18]
os: ubuntu-24.04
- python-version: [3, 16, "0a1"]
os: ubuntu-24.04
- python-version: [2, 7, 18]
os: macos-15
- python-version: [3, 16, "0a1"]
os: macos-15
steps:
- name: Checkout
uses: actions/checkout@v5
uses: actions/checkout@v7.0.1
- name: Install Python Build Deps
if: matrix.os == 'ubuntu-24.04'
run: |
sudo apt update &&
sudo apt install -y \
sudo apt update
DEBIAN_FRONTEND=noninteractive sudo apt install -y \
build-essential \
libssl-dev \
zlib1g-dev \
libbz2-dev \
libreadline-dev \
libsqlite3-dev \
curl \
git \
libbz2-dev \
libffi-dev \
liblzma-dev \
libncursesw5-dev \
xz-utils \
tk-dev \
libreadline-dev \
libsqlite3-dev \
libssl-dev \
libxml2-dev \
libxmlsec1-dev \
libffi-dev \
liblzma-dev
libzstd-dev \
make \
tk-dev \
xz-utils \
zlib1g-dev
- name: Install Pyenv
run: |
cd "${RUNNER_TOOL_CACHE}"
git clone https://github.com/pyenv/pyenv
(
cd pyenv
src/configure
make -C src
)
export PYENV_ROOT="$PWD/pyenv"
echo "PYENV_ROOT=${PYENV_ROOT}" >> "${GITHUB_ENV}"
echo "${PYENV_ROOT}/bin" >> "${GITHUB_PATH}"
- name: Setup Python ${{ join(matrix.python-version, '.') }}
id: pyenv
# Upgrade node16 -> node20: Out for review here:
# https://github.com/gabrielfalcao/pyenv-action/pull/444
uses: pex-tool/pyenv-action@baec18679698d2f80064cc04eb9ad0c8dc5ca8f8
run: |
pyenv install ${{ join(matrix.python-version, '.') }}
echo "${PYENV_ROOT}/versions/${{ join(matrix.python-version, '.') }}/bin" >> "${GITHUB_PATH}"
- name: Setup Tox Python
uses: actions/setup-python@v7.0.0
with:
default: "${{ join(matrix.python-version, '.') }}"
python-version: 3.11
- name: Run Unit Tests
run: |
alias python="${{ steps.pyenv.outputs.pyenv_root }}/versions/${{ join(matrix.python-version, '.') }}/bin/python"
python -V

pyver="${{ matrix.python-version[0] }}.${{ matrix.python-version[1] }}"
if [[ "3.8" == "${pyver}" ]]; then
python -mensurepip
else
curl -fLO https://bootstrap.pypa.io/pip/${pyver}/get-pip.py
python get-pip.py
rm get-pip.py
fi
python -mpip install -U pip
python -mpip install -U tox
python -mtox -epy${{ matrix.python-version[0] }}${{ matrix.python-version[1] }} -- -vvs
python3.11 -V
python3.11 -mpip install -U pip
python3.11 -mpip install -U tox
python3.11 -mtox -epy${{ matrix.python-version[0] }}${{ matrix.python-version[1] }} -- -vvs
unit-tests:
name: (${{ matrix.os }}) TOXENV=py${{ matrix.python-version[0] }}${{ matrix.python-version[1] }}
needs: org-check
Expand All @@ -127,20 +136,18 @@ jobs:
- os: ubuntu-24.04
python-version: [3, 14]
- os: ubuntu-24.04
python-version: [3, 15, "0-alpha.1"]
- os: macos-15
python-version: [3, 14]
python-version: [3, 15]
- os: macos-15
python-version: [3, 15, "0-alpha.1"]
python-version: [3, 15]
steps:
- name: Checkout
uses: actions/checkout@v5
uses: actions/checkout@v7.0.1
- name: Setup Python ${{ join(matrix.python-version, '.') }}
uses: actions/setup-python@v6
uses: actions/setup-python@v7.0.0
with:
python-version: "${{ join(matrix.python-version, '.') }}"
- name: Setup Tox Python
uses: actions/setup-python@v6
uses: actions/setup-python@v7.0.0
with:
python-version: 3.11
- name: Run Unit Tests
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,11 +47,11 @@ jobs:
id-token: write
steps:
- name: Checkout ${{ needs.determine-tag.outputs.release-tag }}
uses: actions/checkout@v5
uses: actions/checkout@v7
with:
ref: ${{ needs.determine-tag.outputs.release-tag }}
- name: Setup Python 3.9
uses: actions/setup-python@v6
uses: actions/setup-python@v7
with:
python-version: 3.9
- name: Package ${{ needs.determine-tag.outputs.release-tag }}
Expand Down
3 changes: 2 additions & 1 deletion setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -31,13 +31,14 @@ classifiers =
Programming Language :: Python :: 3.13
Programming Language :: Python :: 3.14
Programming Language :: Python :: 3.15
Programming Language :: Python :: 3.16
Topic :: Utilities

[options]
packages =
conscript

python_requires = >=2.7,<3.16,!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*,!=3.4.*
python_requires = >=2.7,<3.17,!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*,!=3.4.*

install_requires =
setuptools; python_version <= '3.5'
Expand Down
11 changes: 4 additions & 7 deletions tests/test_main.py
Original file line number Diff line number Diff line change
Expand Up @@ -116,16 +116,13 @@ def test_conscript(foo_bar_conscript):
assert output.startswith(
(
"usage: {argv0} [-h] [PROGRAM]\n"
"{argv0}: error: argument PROGRAM: invalid choice: 'baz' (choose from {programs}"
"{argv0}: error: argument PROGRAM: invalid choice: 'baz'{suggestion} "
"(choose from {programs}"
).format(
argv0=os.path.basename(foo_bar_conscript),
suggestion=", maybe you meant 'bar'?" if sys.version_info >= (3, 15) else "",
programs=", ".join(
(
repr(program)
if sys.version_info[:2] < (3, 12)
# N.B.: Python 3.14 dropped wrapping the choices in ''.
else program
)
(program if sys.version_info[:2] == (3, 12) else repr(program))
for program in EXPECTED_PROGRAMS
),
)
Expand Down
5 changes: 5 additions & 0 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ envlist =
py313
py314
py315
py316

[testenv]
# We need newer Pip to operate under Python 3.14.
Expand All @@ -36,6 +37,9 @@ deps =
pytest==7.4.4; python_version == "3.7"
pytest==8.3.3; python_version >= "3.8"

passenv =
HOME

commands =
pytest {posargs:-vvs}

Expand Down Expand Up @@ -95,6 +99,7 @@ commands =
mypy --python-version 3.13 conscript
mypy --python-version 3.14 conscript
mypy --python-version 3.15 conscript
mypy --python-version 3.16 conscript

[testenv:package]
skip_install = true
Expand Down
Loading