Skip to content

Commit d4310a4

Browse files
committed
Merge branch 'main' into patch-2
2 parents c009de8 + 5589d75 commit d4310a4

File tree

132 files changed

+4718
-12622
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

132 files changed

+4718
-12622
lines changed

.coveragerc

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@ disable_warnings =
1212
[report]
1313
show_missing = True
1414
exclude_also =
15-
# jaraco/skeleton#97
16-
@overload
15+
# Exclude common false positives per
16+
# https://coverage.readthedocs.io/en/latest/excluding.html#advanced-exclusion
17+
# Ref jaraco/skeleton#97 and jaraco/skeleton#135
18+
class .*\bProtocol\):
1719
if TYPE_CHECKING:

.github/dependabot.yml

Lines changed: 0 additions & 8 deletions
This file was deleted.

.github/workflows/main.yml

Lines changed: 47 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ on:
1010
# required if branches-ignore is supplied (jaraco/skeleton#103)
1111
- '**'
1212
pull_request:
13+
workflow_dispatch:
1314

1415
concurrency:
1516
group: >-
@@ -40,25 +41,34 @@ jobs:
4041
# https://blog.jaraco.com/efficient-use-of-ci-resources/
4142
matrix:
4243
python:
43-
- "3.8"
44-
- "3.12"
44+
- "3.9"
45+
- "3.13"
4546
platform:
4647
- ubuntu-latest
4748
- macos-latest
4849
- windows-latest
4950
include:
50-
- python: "3.9"
51-
platform: ubuntu-latest
5251
- python: "3.10"
5352
platform: ubuntu-latest
5453
- python: "3.11"
5554
platform: ubuntu-latest
55+
- python: "3.12"
56+
platform: ubuntu-latest
57+
- python: "3.14"
58+
platform: ubuntu-latest
5659
- python: pypy3.10
5760
platform: ubuntu-latest
5861
runs-on: ${{ matrix.platform }}
59-
continue-on-error: ${{ matrix.python == '3.13' }}
62+
continue-on-error: ${{ matrix.python == '3.14' }}
6063
steps:
6164
- uses: actions/checkout@v4
65+
- name: Install build dependencies
66+
# Install dependencies for building packages on pre-release Pythons
67+
# jaraco/skeleton#161
68+
if: matrix.python == '3.14' && matrix.platform == 'ubuntu-latest'
69+
run: |
70+
sudo apt update
71+
sudo apt install -y libxml2-dev libxslt-dev
6272
- name: Setup Python
6373
uses: actions/setup-python@v4
6474
with:
@@ -92,8 +102,6 @@ jobs:
92102
run: tox -e ${{ matrix.job }}
93103

94104
test_cygwin:
95-
# disabled due to lack of Rust support pypa/setuptools#3921
96-
if: ${{ false }}
97105
strategy:
98106
matrix:
99107
python:
@@ -111,15 +119,20 @@ jobs:
111119
python${{ matrix.python }},
112120
python${{ matrix.python }}-devel,
113121
python${{ matrix.python }}-pytest,
114-
python${{ matrix.python }}-tox,
122+
python${{ matrix.python }}-pip,
115123
gcc-core,
116124
gcc-g++,
117125
zlib-devel,
118126
ncompress
119127
git
128+
- name: Install tox using pip
129+
shell: C:\cygwin\bin\env.exe CYGWIN_NOWINPATH=1 CHERE_INVOKING=1 C:\cygwin\bin\bash.exe -leo pipefail -o igncr {0}
130+
run: |
131+
# Workaround for https://github.com/pypa/setuptools/issues/4831
132+
python -m pip install tox
120133
- name: Run tests
121134
shell: C:\cygwin\bin\env.exe CYGWIN_NOWINPATH=1 CHERE_INVOKING=1 C:\cygwin\bin\bash.exe -leo pipefail -o igncr {0}
122-
run: tox
135+
run: python -m tox
123136

124137
test_msys2_mingw:
125138
strategy:
@@ -144,6 +157,9 @@ jobs:
144157
git
145158
- name: Install Dependencies
146159
shell: msys2 {0}
160+
env:
161+
CC: ${{ matrix.cc }}
162+
CXX: ${{ matrix.cxx }}
147163
run: |
148164
export VIRTUALENV_NO_SETUPTOOLS=1
149165
@@ -163,6 +179,28 @@ jobs:
163179
source /tmp/venv/bin/activate
164180
pytest
165181
182+
test_msvc_python_mingw:
183+
runs-on: windows-latest
184+
steps:
185+
- uses: actions/checkout@v4
186+
- name: Setup Python
187+
uses: actions/setup-python@v4
188+
with:
189+
python-version: 3.12
190+
- name: Install tox
191+
run: python -m pip install tox
192+
- name: Install GCC
193+
uses: msys2/setup-msys2@v2
194+
with:
195+
msystem: ucrt64
196+
install: mingw-w64-ucrt-x86_64-cc
197+
- name: Run
198+
run: |
199+
$env:MSYS2_ROOT = msys2 -c 'cygpath -m /'
200+
$env:PATH = "$env:MSYS2_ROOT/ucrt64/bin;$env:PATH"
201+
$env:DISTUTILS_TEST_DEFAULT_COMPILER = "mingw32"
202+
tox
203+
166204
ci_setuptools:
167205
# Integration testing with setuptools
168206
strategy:

.pre-commit-config.yaml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
repos:
22
- repo: https://github.com/astral-sh/ruff-pre-commit
3-
rev: v0.1.8
3+
rev: v0.7.1
44
hooks:
55
- id: ruff
6+
args: [--fix, --unsafe-fixes]
67
- id: ruff-format

.readthedocs.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,9 @@ python:
55
extra_requirements:
66
- doc
77

8+
sphinx:
9+
configuration: docs/conf.py
10+
811
# required boilerplate readthedocs/readthedocs.org#10401
912
build:
1013
os: ubuntu-lts-latest

README.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
.. .. image:: https://readthedocs.org/projects/PROJECT_RTD/badge/?version=latest
1515
.. :target: https://PROJECT_RTD.readthedocs.io/en/latest/?badge=latest
1616
17-
.. image:: https://img.shields.io/badge/skeleton-2024-informational
17+
.. image:: https://img.shields.io/badge/skeleton-2025-informational
1818
:target: https://blog.jaraco.com/skeleton
1919

2020
Python Module Distribution Utilities extracted from the Python Standard Library

conftest.py

Lines changed: 21 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -7,19 +7,6 @@
77
import path
88
import pytest
99

10-
collect_ignore = []
11-
12-
13-
if platform.system() != 'Windows':
14-
collect_ignore.extend([
15-
'distutils/msvc9compiler.py',
16-
])
17-
18-
19-
collect_ignore_glob = [
20-
'distutils/_vendor/**/*',
21-
]
22-
2310

2411
@pytest.fixture
2512
def save_env():
@@ -61,7 +48,7 @@ def _save_cwd():
6148

6249
@pytest.fixture
6350
def distutils_managed_tempdir(request):
64-
from distutils.tests.compat import py38 as os_helper
51+
from distutils.tests.compat import py39 as os_helper
6552

6653
self = request.instance
6754
self.tempdirs = []
@@ -95,29 +82,6 @@ def temp_cwd(tmp_path):
9582
yield
9683

9784

98-
@pytest.fixture
99-
def pypirc(request, save_env, distutils_managed_tempdir):
100-
from distutils.core import Distribution, PyPIRCCommand
101-
102-
self = request.instance
103-
self.tmp_dir = self.mkdtemp()
104-
os.environ['HOME'] = self.tmp_dir
105-
os.environ['USERPROFILE'] = self.tmp_dir
106-
self.rc = os.path.join(self.tmp_dir, '.pypirc')
107-
self.dist = Distribution()
108-
109-
class command(PyPIRCCommand):
110-
def __init__(self, dist):
111-
super().__init__(dist)
112-
113-
def initialize_options(self):
114-
pass
115-
116-
finalize_options = initialize_options
117-
118-
self._cmd = command
119-
120-
12185
# from pytest-dev/pytest#363
12286
@pytest.fixture(scope="session")
12387
def monkeysession(request):
@@ -128,7 +92,7 @@ def monkeysession(request):
12892
mpatch.undo()
12993

13094

131-
@pytest.fixture(autouse=True, scope="session")
95+
@pytest.fixture(scope="module")
13296
def suppress_path_mangle(monkeysession):
13397
"""
13498
Disable the path mangling in CCompiler. Workaround for #169.
@@ -162,3 +126,22 @@ def disable_macos_customization(monkeypatch):
162126
from distutils import sysconfig
163127

164128
monkeypatch.setattr(sysconfig, '_customize_macos', lambda: None)
129+
130+
131+
@pytest.fixture(autouse=True, scope="session")
132+
def monkey_patch_get_default_compiler(monkeysession):
133+
"""
134+
Monkey patch distutils get_default_compiler to allow overriding the
135+
default compiler. Mainly to test mingw32 with a MSVC Python.
136+
"""
137+
from distutils import ccompiler
138+
139+
default_compiler = os.environ.get("DISTUTILS_TEST_DEFAULT_COMPILER")
140+
141+
if default_compiler is None:
142+
return
143+
144+
def patched_getter(*args, **kwargs):
145+
return default_compiler
146+
147+
monkeysession.setattr(ccompiler, 'get_default_compiler', patched_getter)

0 commit comments

Comments
 (0)