Skip to content

Commit e4015b2

Browse files
authored
Merge branch 'main' into fix-1635
2 parents 77d04bf + 9b27cc0 commit e4015b2

Some content is hidden

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

43 files changed

+2831
-289
lines changed

.github/CODEOWNERS

+4
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,6 @@
11
source/guides/github-actions-ci-cd-sample/* @webknjaz
22
source/guides/publishing-package-distribution-releases-using-github-actions-ci-cd-workflows.rst @webknjaz
3+
4+
# build-details.json
5+
source/specifications/build-details/ @FFY00
6+
source/specifications/specs/build-details-*.json @FFY00

.github/ISSUE_TEMPLATE/config.yml

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
blank_issues_enabled: false
2+
contact_links:
3+
- name: "Community Guidelines"
4+
url: "https://github.com/pypa/.github/blob/main/CODE_OF_CONDUCT.md"
5+
about: "Please make sure to follow the PSF Code of Conduct when participating in this repository."

.github/ISSUE_TEMPLATE/general.yml

+37
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
name: General Issue
2+
description: Please fill out the form below to submit an issue.
3+
labels: []
4+
assignees: []
5+
6+
body:
7+
- type: markdown
8+
attributes:
9+
value: |
10+
**Thanks for taking a minute to file an issue!**
11+
12+
Read the [PSF Code of Conduct][CoC] first.
13+
14+
15+
Verify first that your issue is not [already reported on
16+
GitHub][issue search].
17+
18+
_Please fill out the form below with as many precise
19+
details as possible._
20+
21+
[CoC]: https://github.com/pypa/.github/blob/main/CODE_OF_CONDUCT.md
22+
[issue search]: ../search?q=is%3Aissue&type=issues
23+
24+
- type: textarea
25+
attributes:
26+
label: Issue Description
27+
description: Please provide a detailed description of your issue.
28+
placeholder: Describe your issue here...
29+
validations:
30+
required: true
31+
32+
- type: checkboxes
33+
attributes:
34+
label: Code of Conduct
35+
options:
36+
- label: I am aware that participants in this repository must follow the PSF Code of Conduct.
37+
required: true

.github/workflows/zizmor.yml

+38
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
# From https://woodruffw.github.io/zizmor/usage/#use-in-github-actions
2+
3+
name: GitHub Actions Security Analysis with zizmor 🌈
4+
5+
on:
6+
push:
7+
branches: ["main"]
8+
pull_request:
9+
branches: ["**"]
10+
11+
jobs:
12+
zizmor:
13+
name: zizmor latest via PyPI
14+
runs-on: ubuntu-latest
15+
permissions:
16+
security-events: write
17+
# required for workflows in private repositories
18+
contents: read
19+
actions: read
20+
steps:
21+
- name: Checkout repository
22+
uses: actions/checkout@v4
23+
with:
24+
persist-credentials: false
25+
26+
- name: Install the latest version of uv
27+
uses: astral-sh/setup-uv@v5
28+
29+
- name: Run zizmor 🌈
30+
run: uvx zizmor --format sarif source/guides/github-actions-ci-cd-sample/* > results.sarif
31+
env:
32+
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
33+
34+
- name: Upload SARIF file
35+
uses: github/codeql-action/upload-sarif@v3
36+
with:
37+
sarif_file: results.sarif
38+
category: zizmor

.pre-commit-config.yaml

+3
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
ci:
2+
autoupdate_schedule: quarterly
3+
14
repos:
25
- repo: https://github.com/pre-commit/pre-commit-hooks
36
rev: v5.0.0
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,261 @@
1+
{
2+
"$schema": "https://json-schema.org/draft/2020-12/schema",
3+
"$id": "https://packaging.python.org/en/latest/specifications/schemas/build-details-v1.0.schema.json",
4+
"type": "object",
5+
"title": "build-details.json — a static description file with build details of Python installations",
6+
"required": [
7+
"schema_version",
8+
"base_prefix",
9+
"platform",
10+
"language",
11+
"implementation"
12+
],
13+
"additionalProperties": false,
14+
"properties": {
15+
"schema_version": {
16+
"type": "string",
17+
"description": "Schema version.\n\nThis is a string following the format ``<MAJOR>.<MINOR>``, where ``<MAJOR>`` and ``<MINOR>`` are unpaded numbers and represent the **major** and **minor** components of the version. Versions may be arithmetically compared by intrepreting the version string as a decimal number.\n\nFor this specification version, this value is constant and **MUST** be ``1.0``.\n\nFuture versions of this schema **MUST** use a higher version number. Future versions of this schema **MUST NOT** use the same **major** version component as other schema version unless its specification is deemed backwards-compatible with them — it can't change, or extend, any parts of the current specification in such a way as the semantics of the interpreted data differ, or that data valid under the new specification is invalid under the older specification, with the exception of additional properties (errors caused by ``additionalProperties``).",
18+
"const": "1.0"
19+
},
20+
"base_prefix": {
21+
"type": "string",
22+
"description": "Base prefix of the Python installation.\n\nEither an absolute path, or a path relative to directory where this file is contained.",
23+
"examples": [
24+
"/usr",
25+
"../.."
26+
]
27+
},
28+
"base_interpreter": {
29+
"type": "string",
30+
"description": "The path to the Python interprer of the base installation.\n\nEither an absolute path, or a path relative to ``base_prefix``.\n\nThis field **MUST** be present if the installation provides an interpreter executable.",
31+
"examples": [
32+
"/usr/bin/python",
33+
"bin/python"
34+
]
35+
},
36+
"platform": {
37+
"type": "string",
38+
"description": "System platform string.\n\nThis field **SHOULD** be equivalent to ``sysconfig.get_platform()``.",
39+
"examples": [
40+
"linux-x86_64"
41+
]
42+
},
43+
"language": {
44+
"type": "object",
45+
"description": "Object containing details related to the Python language specification.",
46+
"required": [
47+
"version"
48+
],
49+
"additionalProperties": false,
50+
"properties": {
51+
"version": {
52+
"type": "string",
53+
"description": "String representation the Python language version — a version string consisting only of the *major* and *minor* components.\n\nThis field **SHOULD** be equivalent to ``sysconfig.get_python_version()``.",
54+
"examples": ["3.14"]
55+
},
56+
"version_info": {
57+
"type": "object",
58+
"description": "Object in the format of :py:data:`sys.version_info`.\n\nThis section **SHOULD** be equivalent to :py:data:`sys.version_info`.",
59+
"required": ["major", "minor", "micro", "releaselevel", "serial"],
60+
"additionalProperties": false,
61+
"examples": [
62+
{
63+
"major": 3,
64+
"minor": 14,
65+
"micro": 1,
66+
"releaselevel": "final",
67+
"serial": 0
68+
}
69+
],
70+
"properties": {
71+
"major": {
72+
"type": "number"
73+
},
74+
"minor": {
75+
"type": "number"
76+
},
77+
"micro": {
78+
"type": "number"
79+
},
80+
"releaselevel": {
81+
"type": "string",
82+
"enum": ["alpha", "beta", "candidate", "final"]
83+
},
84+
"serial": {
85+
"type": "number"
86+
}
87+
}
88+
}
89+
}
90+
},
91+
"implementation": {
92+
"type": "object",
93+
"description": "Object containing details related to Python implementation.\n\nThis section **SHOULD** be equivalent to :py:data:`sys.implementation`. It follows specification defined in PEP 421, meaning that on top of the required keys, implementation-specific keys can also exist, but must be prefixed with an underscore.",
94+
"required": [
95+
"name",
96+
"version",
97+
"hexversion",
98+
"cache_tag"
99+
],
100+
"additionalProperties": true,
101+
"properties": {
102+
"name": {
103+
"type": "string",
104+
"description": "Lower-case name of the Python implementation.",
105+
"examples": ["cpython", "pypy"]
106+
},
107+
"version": {
108+
"type": "object",
109+
"description": "Object in the format of :py:data:`sys.version_info`, containing the implementation version.",
110+
"required": ["major", "minor", "micro", "releaselevel", "serial"],
111+
"additionalProperties": false,
112+
"examples": [
113+
{
114+
"major": 3,
115+
"minor": 14,
116+
"micro": 1,
117+
"releaselevel": "final",
118+
"serial": 0
119+
},
120+
{
121+
"major": 7,
122+
"minor": 3,
123+
"micro": 16,
124+
"releaselevel": "final",
125+
"serial": 0
126+
}
127+
],
128+
"properties": {
129+
"major": {
130+
"type": "number"
131+
},
132+
"minor": {
133+
"type": "number"
134+
},
135+
"micro": {
136+
"type": "number"
137+
},
138+
"releaselevel": {
139+
"type": "string",
140+
"enum": ["alpha", "beta", "candidate", "final"]
141+
},
142+
"serial": {
143+
"type": "number"
144+
}
145+
}
146+
}
147+
}
148+
},
149+
"abi": {
150+
"type": "object",
151+
"description": "Object containing details related to ABI.",
152+
"required": [
153+
"flags"
154+
],
155+
"additionalProperties": false,
156+
"properties": {
157+
"flags": {
158+
"type": "array",
159+
"description": "Build configuration flags, used to calculate the extension suffix.\n\nThe flags **MUST** be defined in the order they appear on the extension suffix.",
160+
"additionalProperties": true,
161+
"examples": [
162+
["t", "d"]
163+
]
164+
},
165+
"extension_suffix": {
166+
"type": "string",
167+
"description": "Suffix used for extensions built against the current implementation version.\n\nThis field **MUST** be present if the Python implementation supports extensions, otherwise this entry will be missing.",
168+
"examples": [
169+
".cpython-314-x86_64-linux-gnu.so"
170+
]
171+
},
172+
"stable_abi_suffix": {
173+
"type": "string",
174+
"description": "Suffix used for extensions built against the stable ABI.\n\nThis field **MUST** be present if the Python implementation has a stable ABI extension suffix, otherwise this entry will be missing.",
175+
"examples": [
176+
".abi3.so"
177+
]
178+
}
179+
}
180+
},
181+
"suffixes": {
182+
"type": "object",
183+
"description": "Valid module suffixes grouped by type.\n\nThis section **MUST** be present if the Python installation supports importing external files, and it **SHOULD** be equivalent to the ``importlib.machinery.*_SUFFIXES`` attributes.\n\nAdditionally, if a Python implementation provides extension kinds other than the ones listed on ``importlib.machinery`` module, they **MAY** add a sub-section for them.",
184+
"examples": [
185+
{
186+
"source": [".py"],
187+
"bytecode": [".pyc"],
188+
"optimized_bytecode": [".pyc"],
189+
"debug_bytecode": [".pyc"],
190+
"extensions": [".cpython-313-x86_64-linux-gnu.so", ".abi3.so", ".so"]
191+
}
192+
]
193+
},
194+
"libpython": {
195+
"type": "object",
196+
"description": "Object containing details related to the ``libpython`` library.\n\nThis section **MUST** by present if Python installation provides a ``libpython`` library, otherwise this section will be missing.",
197+
"additionalProperties": false,
198+
"properties": {
199+
"dynamic": {
200+
"type": "string",
201+
"description": "The path to the dynamic ``libpython`` library.\n\nEither an absolute path, or a path relative to ``base_prefix``.\n\nThis field **MUST** be present if the Python installation provides a dynamic ``libpython`` library, otherwise this entry will be missing.",
202+
"examples": [
203+
"/usr/lib/libpython3.14.so.1.0",
204+
"lib/libpython3.14.so.1.0"
205+
]
206+
},
207+
"dynamic_stableabi": {
208+
"type": "string",
209+
"description": "The path to the dynamic ``libpython`` library for the stable ABI.\n\nEither an absolute path, or a path relative to ``base_prefix``.\n\nThis field **MUST** be present if the Python installation provides a dynamic ``libpython`` library targeting the Stable ABI, otherwise this entry will be missing.\n\nIf this key is present ``dynamic`` **MUST** also be set.",
210+
"examples": [
211+
"/usr/lib/libpython3.so",
212+
"lib/libpython3.so"
213+
]
214+
},
215+
"static": {
216+
"type": "string",
217+
"description": "The path to the static ``libpython`` library.\n\nEither an absolute path, or a path relative to ``base_prefix``.\n\nThis field **MUST** be present if the Python installation provides a static ``libpython`` library, otherwise this entry will be missing.",
218+
"examples": [
219+
"/usr/lib/python3.14/config-3.14-x86_64-linux-gnu/libpython3.14.a",
220+
"lib/python3.14/config-3.14-x86_64-linux-gnu/libpython3.14.a"
221+
]
222+
},
223+
"link_extensions": {
224+
"type": "boolean",
225+
"description": "Should extensions built against a dynamic ``libpython`` link to it?\n\nThis field **MUST** be present if the Python installation provides a dynamic ``libpython`` library, otherwise this entry will be missing."
226+
}
227+
}
228+
},
229+
"c_api": {
230+
"type": "object",
231+
"description": "Object containing details related to the Python C API.\n\nThis section **MUST** be present if the Python implementation provides a C API, otherwise this section will be missing.",
232+
"required": [
233+
"headers"
234+
],
235+
"additionalProperties": false,
236+
"properties": {
237+
"headers": {
238+
"type": "string",
239+
"description": "The path to the C API headers.\n\nEither an absolute path, or a path relative to ``base_prefix``.",
240+
"examples": [
241+
"/usr/include/python3.14",
242+
"include/python3.14"
243+
]
244+
},
245+
"pkgconfig_path": {
246+
"type": "string",
247+
"description": "The path to the pkg-config definition files.\n\nEither an absolute path, or a path relative to ``base_prefix``.\n\nThis field **MUST** be present if the Python implementation provides pkg-config definition files, otherwise this section will be missing.",
248+
"examples": [
249+
"/usr/lib/pkgconfig",
250+
"lib/pkgconfig"
251+
]
252+
}
253+
}
254+
},
255+
"arbitrary_data": {
256+
"type": "object",
257+
"description": "Object containing extra arbitrary data.\n\nThis is meant to be used as an escape-hatch, to include any relevant data that is not covered by this specification. Implementations may choose what data to provide in this section.",
258+
"additionalProperties": true
259+
}
260+
}
261+
}

requirements.txt

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
1-
furo==2023.9.10
1+
furo==2024.8.6
22
sphinx==7.2.6
33
sphinx-autobuild==2021.3.14
44
sphinx-inline-tabs==2023.4.21
55
sphinx-copybutton==0.5.2
66
sphinx-toolbox==3.5.0
7+
sphinx-jsonschema==1.19.1

0 commit comments

Comments
 (0)