Skip to content

Commit 776c91a

Browse files
authored
Merge branch 'main' into main
2 parents f86b4d0 + 6c792a1 commit 776c91a

25 files changed

+1733
-180
lines changed

.github/workflows/zizmor.yml

Lines changed: 38 additions & 0 deletions
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

requirements.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
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

source/conf.py

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,11 @@
6262
html_title = "Python Packaging User Guide"
6363
html_theme = "furo"
6464

65+
html_theme_options = {
66+
"source_edit_link": "https://github.com/pypa/packaging.python.org/edit/main/source/{filename}",
67+
"source_view_link": "https://github.com/pypa/packaging.python.org/blob/main/source/{filename}?plain=true",
68+
}
69+
6570
html_favicon = "assets/py.png"
6671
html_last_updated_fmt = ""
6772

@@ -136,11 +141,13 @@
136141
"https://anaconda.org",
137142
]
138143
linkcheck_retries = 5
139-
# Ignore anchors for links to GitHub project pages -- GitHub adds anchors from
140-
# README.md headings through JavaScript, so Sphinx's linkcheck can't find them
141-
# in the HTML.
144+
# Ignore anchors for common targets when we know they likely won't be found
142145
linkcheck_anchors_ignore_for_url = [
146+
# GitHub synthesises anchors in JavaScript, so Sphinx can't find them in the HTML
143147
r"https://github\.com/",
148+
# While PyPI has its botscraping defenses active, Sphinx can't resolve the anchors
149+
# https://github.com/pypa/packaging.python.org/issues/1744
150+
r"https://pypi\.org/",
144151
]
145152

146153
# -- Options for extlinks ----------------------------------------------------------

source/discussions/downstream-packaging.rst

Lines changed: 481 additions & 0 deletions
Large diffs are not rendered by default.

source/discussions/index.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,3 +17,4 @@ specific topic. If you're just trying to get stuff done, see
1717
src-layout-vs-flat-layout
1818
setup-py-deprecated
1919
single-source-version
20+
downstream-packaging

source/discussions/setup-py-deprecated.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -210,6 +210,6 @@ has now been reduced to the role of a build backend.
210210
Where to read more about this?
211211
==============================
212212

213-
* https://blog.ganssle.io/articles/2021/10/setup-py-deprecated.html
213+
* `Why you shouldn't invoke setup.py directly <https://blog.ganssle.io/articles/2021/10/setup-py-deprecated.html>`__ by Paul Ganssle
214214

215215
* :doc:`setuptools:deprecated/commands`

source/glossary.rst

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -147,6 +147,40 @@ Glossary
147147
multiple individual distributions.
148148

149149

150+
License Classifier
151+
152+
A PyPI Trove classifier
153+
(as :ref:`described <core-metadata-classifier>`
154+
in the :term:`Core Metadata` specification)
155+
which begins with ``License ::``.
156+
157+
158+
License Expression
159+
SPDX Expression
160+
161+
A string with valid SPDX license expression syntax,
162+
including one or more SPDX :term:`License Identifier`\(s),
163+
which describes a :term:`Project`'s license(s)
164+
and how they inter-relate.
165+
Examples:
166+
``GPL-3.0-or-later``,
167+
``MIT AND (Apache-2.0 OR BSD-2-Clause)``
168+
169+
170+
License Identifier
171+
SPDX Identifier
172+
173+
A valid SPDX short-form license identifier,
174+
originally specified in :pep:`639`.
175+
This includes all valid SPDX identifiers and
176+
the custom ``LicenseRef-[idstring]`` strings conforming to the
177+
SPDX specification.
178+
Examples:
179+
``MIT``,
180+
``GPL-3.0-only``,
181+
``LicenseRef-My-Custom-License``
182+
183+
150184
Module
151185

152186
The basic unit of code reusability in Python, existing in one of two
@@ -313,6 +347,23 @@ Glossary
313347
docs on :ref:`pip:Requirements Files`.
314348

315349

350+
Root License Directory
351+
License Directory
352+
353+
The directory under which license files are stored in a
354+
:term:`Project Source Tree`, :term:`Distribution Archive`
355+
or :term:`Installed Project`.
356+
For a :term:`Project Source Tree` or
357+
:term:`Source Distribution (or "sdist")`, this is the
358+
:term:`Project Root Directory`.
359+
For a :term:`Built Distribution` or :term:`Installed Project`,
360+
this is the :file:`.dist-info/licenses/` directory of
361+
the wheel archive or project folder respectively.
362+
Also, the root directory that paths
363+
recorded in the ``License-File``
364+
:term:`Core Metadata Field` are relative to.
365+
366+
316367
setup.py
317368
setup.cfg
318369

source/guides/github-actions-ci-cd-sample/publish-to-test-pypi.yml

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@ jobs:
99

1010
steps:
1111
- uses: actions/checkout@v4
12+
with:
13+
persist-credentials: false
1214
- name: Set up Python
1315
uses: actions/setup-python@v5
1416
with:
@@ -78,8 +80,8 @@ jobs:
7880
GITHUB_TOKEN: ${{ github.token }}
7981
run: >-
8082
gh release create
81-
'${{ github.ref_name }}'
82-
--repo '${{ github.repository }}'
83+
"$GITHUB_REF_NAME"
84+
--repo "$GITHUB_REPOSITORY"
8385
--notes ""
8486
- name: Upload artifact signatures to GitHub Release
8587
env:
@@ -89,8 +91,8 @@ jobs:
8991
# sigstore-produced signatures and certificates.
9092
run: >-
9193
gh release upload
92-
'${{ github.ref_name }}' dist/**
93-
--repo '${{ github.repository }}'
94+
"$GITHUB_REF_NAME" dist/**
95+
--repo "$GITHUB_REPOSITORY"
9496
9597
publish-to-testpypi:
9698
name: Publish Python 🐍 distribution 📦 to TestPyPI

source/guides/installing-scientific-packages.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ SciPy distributions
8989
-------------------
9090

9191
The SciPy site lists `several distributions
92-
<https://scipy.org/install/#distributions>`_
92+
<https://scipy.org/install/>`_
9393
that provide the full SciPy stack to
9494
end users in an easy to use and update format.
9595

0 commit comments

Comments
 (0)