Skip to content

Commit d7b783a

Browse files
committed
Merge branch 'main' into debt/remove-legacy-version
2 parents 5b75de0 + ce9ddd5 commit d7b783a

File tree

447 files changed

+24389
-4095
lines changed

Some content is hidden

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

447 files changed

+24389
-4095
lines changed

.bumpversion.cfg

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
[bumpversion]
2-
current_version = 59.0.1
2+
current_version = 60.8.2
33
commit = True
44
tag = True
55

.codecov.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,5 @@ comment: false
22
coverage:
33
status:
44
project:
5-
threshold: 0.5%
5+
default:
6+
threshold: 0.5%

.github/ISSUE_TEMPLATE/bug-report.yml

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -115,15 +115,4 @@ body:
115115
validations:
116116
required: true
117117

118-
119-
- type: checkboxes
120-
attributes:
121-
label: Code of Conduct
122-
description: |
123-
Read the [PSF Code of Conduct][CoC] first.
124-
125-
[CoC]: https://github.com/pypa/.github/blob/main/CODE_OF_CONDUCT.md
126-
options:
127-
- label: I agree to follow the PSF Code of Conduct
128-
required: true
129118
...

.github/ISSUE_TEMPLATE/config.yml

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
# Ref: https://help.github.com/en/github/building-a-strong-community/configuring-issue-templates-for-your-repository#configuring-the-template-chooser
2-
blank_issues_enabled: false # default: true
31
contact_links:
42
- name: 🤔 Have questions or need support?
53
url: https://github.com/pypa/setuptools/discussions
@@ -9,7 +7,6 @@ contact_links:
97
about: |
108
Please ask typical Q&A here: general ideas for Python packaging,
119
questions about structuring projects and so on
12-
- name: >-
13-
💬 IRC: #pypa @ Freenode
14-
url: https://webchat.freenode.net/#pypa
10+
- name: 💬 Discord (chat)
11+
url: https://discord.com/invite/pypa
1512
about: Chat with devs

.github/ISSUE_TEMPLATE/feature-request.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ body:
7373
Have you tried to workaround the problem using other tools? Or a
7474
different approach to solving this issue? Please elaborate here.
7575
placeholder: >-
76-
I tried doing X, Y and Z. But they are subobpimal because of P.
76+
I tried doing X, Y and Z. But they are suboptimal because of P.
7777
7878
- type: textarea
7979
attributes:

.github/pull_request_template.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<!-- First time contributors: Take a moment to review https://setuptools.readthedocs.io/en/latest/development/developer-guide.html! -->
1+
<!-- First time contributors: Take a moment to review https://setuptools.pypa.io/en/latest/development/developer-guide.html! -->
22
<!-- Remove sections if not applicable -->
33

44
## Summary of changes
@@ -15,4 +15,4 @@ Closes <!-- issue number here -->
1515

1616
[`changelog.d/`]: https://github.com/pypa/setuptools/tree/master/changelog.d
1717
[PR docs]:
18-
https://setuptools.readthedocs.io/en/latest/development/developer-guide.html#making-a-pull-request
18+
https://setuptools.pypa.io/en/latest/development/developer-guide.html#making-a-pull-request

.github/workflows/ci-sage.yml

Lines changed: 152 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,152 @@
1+
name: Run Sage CI for Linux
2+
3+
## This GitHub Actions workflow provides:
4+
##
5+
## - portability testing, by building and testing this project on many platforms
6+
##
7+
## - continuous integration, by building and testing other software
8+
## that depends on this project.
9+
##
10+
## It runs on every push of a tag to the GitHub repository.
11+
##
12+
## The testing can be monitored in the "Actions" tab of the GitHub repository.
13+
##
14+
## After all jobs have finished (or are canceled) and a short delay,
15+
## tar files of all logs are made available as "build artifacts".
16+
##
17+
## This GitHub Actions workflow uses the portability testing framework
18+
## of SageMath (https://www.sagemath.org/). For more information, see
19+
## https://doc.sagemath.org/html/en/developer/portability_testing.html
20+
21+
## The workflow consists of two jobs:
22+
##
23+
## - First, it builds a source distribution of the project
24+
## and generates a script "update-pkgs.sh". It uploads them
25+
## as a build artifact named upstream.
26+
##
27+
## - Second, it checks out a copy of the SageMath source tree.
28+
## It downloads the upstream artifact and replaces the project's
29+
## package in the SageMath distribution by the newly packaged one
30+
## from the upstream artifact, by running the script "update-pkgs.sh".
31+
## Then it builds a small portion of the Sage distribution.
32+
##
33+
## Many copies of the second step are run in parallel for each of the tested
34+
## systems/configurations.
35+
36+
on:
37+
push:
38+
tags:
39+
- '*'
40+
workflow_dispatch:
41+
# Allow to run manually
42+
43+
env:
44+
# Ubuntu packages to install so that the project's "setup.py sdist" can succeed
45+
DIST_PREREQ: python3
46+
# Name of this project in the Sage distribution
47+
SPKG: setuptools
48+
# Sage distribution packages to build
49+
TARGETS_PRE: build/make/Makefile
50+
TARGETS: setuptools pyzmq
51+
TARGETS_OPTIONAL: build/make/Makefile
52+
# Standard setting: Test the current beta release of Sage:
53+
SAGE_REPO: sagemath/sage
54+
SAGE_REF: develop
55+
# Test with the branch from https://trac.sagemath.org/ticket/33288
56+
# This may provide hotfixes for the CI that have not been merged into
57+
# the sage develop branch yet.
58+
SAGE_TRAC_GIT: https://github.com/sagemath/sagetrac-mirror.git
59+
SAGE_TICKET: 33288
60+
REMOVE_PATCHES: "*"
61+
62+
jobs:
63+
64+
dist:
65+
runs-on: ubuntu-latest
66+
steps:
67+
- name: Check out ${{ env.SPKG }}
68+
uses: actions/checkout@v2
69+
with:
70+
path: build/pkgs/${{ env.SPKG }}/src
71+
- name: Install prerequisites
72+
run: |
73+
sudo DEBIAN_FRONTEND=noninteractive apt-get update
74+
sudo DEBIAN_FRONTEND=noninteractive apt-get install $DIST_PREREQ
75+
python3 -m pip install build
76+
- name: Run make dist, prepare upstream artifact
77+
run: |
78+
(cd build/pkgs/${{ env.SPKG }}/src && python3 -m bootstrap && python3 -m build --sdist) \
79+
&& mkdir -p upstream && cp build/pkgs/${{ env.SPKG }}/src/dist/*.tar.gz upstream/${{ env.SPKG }}-git.tar.gz \
80+
&& echo "sage-package create ${{ env.SPKG }} --version git --tarball ${{ env.SPKG }}-git.tar.gz --type=standard" > upstream/update-pkgs.sh \
81+
&& if [ -n "${{ env.REMOVE_PATCHES }}" ]; then echo "(cd ../build/pkgs/${{ env.SPKG }}/patches && rm -f ${{ env.REMOVE_PATCHES }}; :)" >> upstream/update-pkgs.sh; fi \
82+
&& ls -l upstream/
83+
- uses: actions/upload-artifact@v2
84+
with:
85+
path: upstream
86+
name: upstream
87+
88+
docker:
89+
runs-on: ubuntu-latest
90+
needs: [dist]
91+
strategy:
92+
fail-fast: false
93+
max-parallel: 32
94+
matrix:
95+
tox_system_factor: [ubuntu-trusty, ubuntu-xenial, ubuntu-bionic, ubuntu-focal, ubuntu-hirsute, ubuntu-impish, ubuntu-jammy, debian-stretch, debian-buster, debian-bullseye, debian-bookworm, debian-sid, linuxmint-17, linuxmint-18, linuxmint-19, linuxmint-19.3, linuxmint-20.1, linuxmint-20.2, linuxmint-20.3, fedora-26, fedora-27, fedora-28, fedora-29, fedora-30, fedora-31, fedora-32, fedora-33, fedora-34, fedora-35, centos-7, centos-stream-8, centos-stream-9, gentoo-python3.9, archlinux-latest, opensuse-15, opensuse-15.3, opensuse-tumbleweed, slackware-14.2, ubuntu-bionic-i386, manylinux-2_24-i686, debian-buster-i386, centos-7-i386]
96+
tox_packages_factor: [minimal, standard]
97+
env:
98+
TOX_ENV: docker-${{ matrix.tox_system_factor }}-${{ matrix.tox_packages_factor }}
99+
LOGS_ARTIFACT_NAME: logs-commit-${{ github.sha }}-tox-docker-${{ matrix.tox_system_factor }}-${{ matrix.tox_packages_factor }}
100+
DOCKER_TARGETS: configured with-targets with-targets-optional
101+
steps:
102+
- name: Check out SageMath
103+
uses: actions/checkout@v2
104+
with:
105+
repository: ${{ env.SAGE_REPO }}
106+
ref: ${{ env.SAGE_REF }}
107+
fetch-depth: 2000
108+
if: env.SAGE_REPO != ''
109+
- name: Check out git-trac-command
110+
uses: actions/checkout@v2
111+
with:
112+
repository: sagemath/git-trac-command
113+
path: git-trac-command
114+
if: env.SAGE_TRAC_GIT != ''
115+
- name: Check out SageMath from trac.sagemath.org
116+
shell: bash {0}
117+
run: |
118+
git config --global user.email "[email protected]"
119+
git config --global user.name "ci-sage workflow"
120+
if [ ! -d .git ]; then git init; fi; git remote add trac ${{ env.SAGE_TRAC_GIT }} && x=1 && while [ $x -le 5 ]; do x=$(( $x + 1 )); sleep $(( $RANDOM % 60 + 1 )); if git-trac-command/git-trac fetch $SAGE_TICKET; then git merge FETCH_HEAD || echo "(ignored)"; exit 0; fi; sleep 40; done; exit 1
121+
if: env.SAGE_TRAC_GIT != ''
122+
- uses: actions/download-artifact@v2
123+
with:
124+
path: upstream
125+
name: upstream
126+
- name: Install test prerequisites
127+
run: |
128+
sudo DEBIAN_FRONTEND=noninteractive apt-get update
129+
sudo DEBIAN_FRONTEND=noninteractive apt-get install tox python3-setuptools
130+
- name: Update Sage packages from upstream artifact
131+
run: |
132+
(export PATH=$(pwd)/build/bin:$PATH; (cd upstream && bash -x update-pkgs.sh) && sed -i.bak '/upstream/d' .dockerignore && echo "/:toolchain:/i ADD upstream upstream" | sed -i.bak -f - build/bin/write-dockerfile.sh && git diff)
133+
- name: Configure and build Sage distribution within a Docker container
134+
run: |
135+
set -o pipefail; EXTRA_DOCKER_BUILD_ARGS="--build-arg USE_MAKEFLAGS=\"-k V=0 SAGE_NUM_THREADS=3\"" tox -e $TOX_ENV -- $TARGETS 2>&1 | sed "/^configure: notice:/s|^|::warning file=artifacts/$LOGS_ARTIFACT_NAME/config.log::|;/^configure: warning:/s|^|::warning file=artifacts/$LOGS_ARTIFACT_NAME/config.log::|;/^configure: error:/s|^|::error file=artifacts/$LOGS_ARTIFACT_NAME/config.log::|;"
136+
- name: Copy logs from the Docker image or build container
137+
run: |
138+
mkdir -p "artifacts/$LOGS_ARTIFACT_NAME"
139+
cp -r .tox/$TOX_ENV/Dockerfile .tox/$TOX_ENV/log "artifacts/$LOGS_ARTIFACT_NAME"
140+
if [ -f .tox/$TOX_ENV/Dockertags ]; then CONTAINERS=$(docker create $(tail -1 .tox/$TOX_ENV/Dockertags) /bin/bash || true); fi
141+
if [ -n "$CONTAINERS" ]; then for CONTAINER in $CONTAINERS; do for ARTIFACT in /sage/logs; do docker cp $CONTAINER:$ARTIFACT artifacts/$LOGS_ARTIFACT_NAME && HAVE_LOG=1; done; if [ -n "$HAVE_LOG" ]; then break; fi; done; fi
142+
if: always()
143+
- uses: actions/upload-artifact@v2
144+
with:
145+
path: artifacts
146+
name: ${{ env.LOGS_ARTIFACT_NAME }}
147+
if: always()
148+
- name: Print out logs for immediate inspection
149+
# and markup the output with GitHub Actions logging commands
150+
run: |
151+
.github/workflows/scan-logs.sh "artifacts/$LOGS_ARTIFACT_NAME"
152+
if: always()

.github/workflows/main.yml

Lines changed: 70 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
name: tests
22

3-
on: [push, pull_request]
3+
on: [push, pull_request, workflow_dispatch]
44

55
jobs:
66
test:
@@ -10,8 +10,9 @@ jobs:
1010
- stdlib
1111
- local
1212
python:
13-
- pypy3
14-
- 3.6
13+
- pypy-3.7
14+
- 3.7
15+
- 3.8
1516
- 3.9
1617
- "3.10"
1718
platform:
@@ -40,8 +41,73 @@ jobs:
4041
${{ runner.os }},
4142
${{ matrix.python }}
4243
43-
release:
44+
test_cygwin:
45+
strategy:
46+
matrix:
47+
distutils:
48+
- stdlib
49+
- local
50+
runs-on: windows-latest
51+
env:
52+
SETUPTOOLS_USE_DISTUTILS: ${{ matrix.distutils }}
53+
steps:
54+
- uses: actions/checkout@v2
55+
- name: Install Cygwin with Python
56+
uses: cygwin/cygwin-install-action@v1
57+
with:
58+
platform: x86_64
59+
packages: >-
60+
git,
61+
gcc-core,
62+
python38,
63+
python38-devel,
64+
python38-pip
65+
- name: Install tox
66+
shell: C:\cygwin\bin\env.exe CYGWIN_NOWINPATH=1 CHERE_INVOKING=1 C:\cygwin\bin\bash.exe -leo pipefail -o igncr {0}
67+
run: |
68+
python3.8 -m pip install tox
69+
- name: Run tests
70+
shell: C:\cygwin\bin\env.exe CYGWIN_NOWINPATH=1 CHERE_INVOKING=1 C:\cygwin\bin\bash.exe -leo pipefail -o igncr {0}
71+
run: |
72+
tox -- --cov-report xml
73+
74+
integration-test:
75+
strategy:
76+
matrix:
77+
distutils:
78+
- stdlib
79+
- local
4480
needs: test
81+
if: github.event_name == 'workflow_dispatch' || (github.event_name == 'push' && contains(github.ref, 'refs/tags/'))
82+
# To avoid long times and high resource usage, we assume that:
83+
# 1. The setuptools APIs used by packages don't vary too much with OS or
84+
# Python implementation
85+
# 2. Any circumstance for which the previous assumption is not valid is
86+
# already tested via unit tests (or other tests not classified here as
87+
# "integration")
88+
# With that in mind, the integration tests can run for a single setup
89+
runs-on: ubuntu-latest
90+
env:
91+
SETUPTOOLS_USE_DISTUTILS: ${{ matrix.distutils }}
92+
steps:
93+
- uses: actions/checkout@v2
94+
- name: Install OS-level dependencies
95+
run: |
96+
sudo apt-get update
97+
sudo apt-get install build-essential gfortran libopenblas-dev
98+
- name: Setup Python
99+
uses: actions/setup-python@v2
100+
with:
101+
# Use a release that is not very new but still have a long life:
102+
python-version: "3.8"
103+
- name: Install tox
104+
run: |
105+
python -m pip install tox
106+
- name: Run integration tests
107+
run: tox -e integration
108+
109+
release:
110+
needs: [test, test_cygwin, integration-test]
45111
if: github.event_name == 'push' && contains(github.ref, 'refs/tags/')
46112
runs-on: ubuntu-latest
47113

.gitignore

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ docs/build
66
include
77
lib
88
distribute.egg-info
9-
foo.egg-info
109
setuptools.egg-info
1110
.coverage
1211
.eggs

0 commit comments

Comments
 (0)