Skip to content

Commit

Permalink
Add support for PI.
Browse files Browse the repository at this point in the history
  • Loading branch information
jsirois committed Oct 22, 2024
1 parent 5eda728 commit c17a768
Show file tree
Hide file tree
Showing 7 changed files with 102 additions and 93 deletions.
43 changes: 22 additions & 21 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,14 @@ jobs:
org-check:
name: Check GitHub Organization
if: ${{ github.repository_owner == 'jsirois' }}
runs-on: ubuntu-22.04
runs-on: ubuntu-24.04
steps:
- name: Noop
run: "true"
checks:
name: TOXENV=${{ matrix.tox-env }}
needs: org-check
runs-on: ubuntu-22.04
runs-on: ubuntu-24.04
strategy:
matrix:
include:
Expand All @@ -20,7 +20,7 @@ jobs:
tox-env: lint
- check-name: Types
python-version: 3.9
tox-env: typecheck
tox-env: check
steps:
- name: Checkout
uses: actions/checkout@v4
Expand All @@ -40,13 +40,17 @@ jobs:
matrix:
include:
- python-version: [2, 7, 18]
os: ubuntu-22.04
os: ubuntu-24.04
- python-version: [3, 5, 10]
os: ubuntu-22.04
os: ubuntu-24.04
- python-version: [3, 6, 15]
os: ubuntu-22.04
os: ubuntu-24.04
- python-version: [3, 7, 17]
os: ubuntu-24.04
- python-version: [3, 8, 18]
os: ubuntu-24.04
- python-version: [2, 7, 18]
os: macos-12
os: macos-13
steps:
- name: Checkout
uses: actions/checkout@v4
Expand All @@ -71,24 +75,21 @@ jobs:
strategy:
matrix:
include:
- os: ubuntu-22.04
python-version: [3, 7]
- os: ubuntu-22.04
python-version: [3, 8]
- os: ubuntu-22.04
python-version: [3, 9]
- os: ubuntu-22.04
- os: ubuntu-24.04
python-version: [3, 10]
- os: ubuntu-22.04
- os: ubuntu-24.04
python-version: [3, 11]
- os: ubuntu-22.04
- os: ubuntu-24.04
python-version: [3, 12]
- os: ubuntu-22.04
python-version: [3, 13, "0-alpha.2"]
- os: macos-12
python-version: [3, 12]
- os: macos-12
python-version: [3, 13, "0-alpha.2"]
- os: ubuntu-24.04
python-version: [3, 13]
- os: ubuntu-24.04
python-version: [3, 14, "0-alpha.1"]
- os: macos-13
python-version: [3, 13]
- os: macos-13
python-version: [3, 14, "0-alpha.1"]
steps:
- name: Checkout
uses: actions/checkout@v4
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,14 @@ on:
jobs:
org_check:
if: ${{ github.repository_owner == 'jsirois' }}
runs-on: ubuntu-22.04
runs-on: ubuntu-24.04
steps:
- name: Noop
run: "true"
determine-tag:
name: Determine the release tag to operate against.
needs: org_check
runs-on: ubuntu-22.04
runs-on: ubuntu-24.04
outputs:
release-tag: ${{ steps.determine-tag.outputs.release-tag }}
release-version: ${{ steps.determine-tag.outputs.release-version }}
Expand All @@ -41,7 +41,7 @@ jobs:
pypi:
name: Publish sdist and wheel to PyPI
needs: [org_check, determine-tag]
runs-on: ubuntu-22.04
runs-on: ubuntu-24.04
environment: Release
permissions:
id-token: write
Expand Down
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,7 @@
/*.iml
/.idea/
/.tox/
/build/
/conscript.egg-info/
/dist/
__pycache__/
2 changes: 2 additions & 0 deletions MANIFEST.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
include CHANGES.md

7 changes: 1 addition & 6 deletions conscript/__init__.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,3 @@
"""Conscript console scripts in your own Swiss Army Knife.
A Python BusyBox console script.
""" # N.B.: Flit uses this as our distribution description.

from __future__ import absolute_import

__version__ = "0.1.7" # N.B.: Flit uses this as out distribution version.
__version__ = "0.1.7" # N.B.: Setuptools is configured to use this as our distribution version.
72 changes: 38 additions & 34 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,48 +1,52 @@
[build-system]
requires = ["flit_core>=2,<4"]
build-backend = "flit_core.buildapi"
requires = ["setuptools"]
build-backend = "setuptools.build_meta"

[tool.flit.metadata]
module = "conscript"
author = "John Sirois"
author-email = "[email protected]"
home-page = "https://github.com/jsirois/conscript"
description-file = "README.md"
[project]
name = "conscript"
authors = [
{name = "John Sirois", email = "[email protected]"},
]
description = "Conscript console scripts in your own Swiss Army Knife."
readme = "README.md"
classifiers = [
"Development Status :: 4 - Beta",
"Intended Audience :: Developers",
"License :: OSI Approved :: Apache Software License",
"Programming Language :: Python",
"Programming Language :: Python :: 2",
"Programming Language :: Python :: 2.7",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.5",
"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",
"Programming Language :: Python :: 3.13",
"Topic :: Utilities",
"Development Status :: 4 - Beta",
"Intended Audience :: Developers",
"License :: OSI Approved :: Apache Software License",
"Programming Language :: Python",
"Programming Language :: Python :: 2",
"Programming Language :: Python :: 2.7",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.5",
"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",
"Programming Language :: Python :: 3.13",
"Programming Language :: Python :: 3.14",
"Topic :: Utilities",
]
requires-python = ">=2.7,<3.14,!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*,!=3.4.*"
requires = [
"setuptools; python_version <= '3.5'",
"importlib-metadata; python_version == '3.6' or python_version == '3.7'",
requires-python = ">=2.7,<3.15,!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*,!=3.4.*"
dependencies = [
"setuptools; python_version <= '3.5'",
"importlib-metadata; python_version == '3.6' or python_version == '3.7'",
]
dynamic = ["version"]

[tool.flit.scripts]
[project.scripts]
conscript = "conscript.main:main"

[tool.flit.sdist]
include = ["CHANGES.md"]

[tool.flit.metadata.urls]
[project.urls]
Homepage = "https://github.com/jsirois/conscript"
Changelog = "https://github.com/jsirois/conscript/blob/main/CHANGES.md"
Documentation = "https://github.com/jsirois/conscript/blob/main/README.md"

[tool.setuptools.dynamic]
version = {attr = "conscript.__version__"}

[tool.black]
line-length = 100
target-version = ["py27"]
Expand Down
63 changes: 34 additions & 29 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ skip_missing_interpreters = true
envlist =
fmt
lint
typecheck
check
py27
py35
py36
Expand All @@ -17,17 +17,19 @@ envlist =
py311
py312
py313
py314

[testenv]
deps =
pex==2.1.156; python_version < "3.13"

# The fix for shiv under Python 3.123 is off for review in https://github.com/linkedin/shiv/pull/249
shiv==1.0.4; python_version >= "3.6" and python_version < "3.13"
git+https://github.com/jsirois/shiv@0c8b3e83238327e51955d66ba4fee28c4fc7107f#egg=shiv; python_version >= "3.13"
download = true

deps =
pex==2.20.3; python_version < "3.14"
shiv==1.0.7
pytest==4.6.11; python_version < "3.6"
pytest==6.2.5; python_version >= "3.6"
pytest==6.2.5; python_version == "3.6"
pytest==7.4.4; python_version == "3.7"
pytest==8.3.3; python_version >= "3.8"

commands =
pytest {posargs:-vvs}

Expand Down Expand Up @@ -57,39 +59,42 @@ commands =
black --check .
isort --check-only .

[testenv:typecheck]
[testenv:check]
basepython = python3
deps =
# N.B.: We need a version of pytest that works with Python 2.7 through 3.11 for the purposes of
# N.B.: We need a version of pytest that works with Python 2.7 through 3.14 for the purposes of
# type checking.
pytest==4.6.11

# Likewise, we need a version of setuptools that works with Python 2.7 through 3.14 for the
# purposes of type checking.
setuptools==44.0.0
# The following stubs are pinned at the last version that does not use positional-only parameter
# syntax (/) not available to `--python-version 2.7` type checks.
types-setuptools==69.1.0.20240302

mypy[python2]==0.931
typing-extensions==4.2.0
commands =
mypy --python-version 2.7 .
mypy --python-version 3.5 .
mypy --python-version 3.6 .
mypy --python-version 3.7 .
mypy --python-version 3.8 .
mypy --python-version 3.9 .
mypy --python-version 3.10 .
mypy --python-version 3.11 .
mypy --python-version 3.12 .
mypy --python-version 3.13 .

[_flit]
basepython = python3
deps =
flit==3.2.0
Pygments==2.9.0
commands =
mypy --python-version 2.7 conscript
mypy --python-version 3.5 conscript
mypy --python-version 3.6 conscript
mypy --python-version 3.7 conscript
mypy --python-version 3.8 conscript
mypy --python-version 3.9 conscript
mypy --python-version 3.10 conscript
mypy --python-version 3.11 conscript
mypy --python-version 3.12 conscript
mypy --python-version 3.13 conscript
mypy --python-version 3.14 conscript

[testenv:package]
basepython = {[_flit]basepython}
skip_install = true
deps =
{[_flit]deps}
build
commands =
flit build
pyproject-build

[testenv:changelog]
basepython = python3
Expand Down

0 comments on commit c17a768

Please sign in to comment.