summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIan Stapleton Cordasco <graffatcolmingov@gmail.com>2021-12-30 15:33:43 -0600
committerGitHub <noreply@github.com>2021-12-30 15:33:43 -0600
commitc96cf403fb4f24d414f40faf4691174e4c54ea0b (patch)
tree7125d5a797e6172e024e3d0f559c402f100aaf04
parentd4c25791cd5002a5234d882a28040db94ca38595 (diff)
downloadurllib3-c96cf403fb4f24d414f40faf4691174e4c54ea0b.tar.gz
Use pypa/build to build dists, remove duplicate Python setup step
We don't need to set things up twice in a row (which we were doing in restoring the cache) and let's use pypa/build instead of python setup.py since that's better supported and the future
-rw-r--r--.github/PULL_REQUEST_TEMPLATE/release.md4
-rw-r--r--.github/workflows/ci.yml11
-rwxr-xr-xci/deploy.sh4
3 files changed, 6 insertions, 13 deletions
diff --git a/.github/PULL_REQUEST_TEMPLATE/release.md b/.github/PULL_REQUEST_TEMPLATE/release.md
index 64fdc674..6225f551 100644
--- a/.github/PULL_REQUEST_TEMPLATE/release.md
+++ b/.github/PULL_REQUEST_TEMPLATE/release.md
@@ -18,8 +18,8 @@
python -m venv
source venv/bin/activate
python -m pip install -U pip
- python -m pip install -U twine setuptools wheel
- python setup.py sdist bdist_wheel
+ python -m pip install -U twine setuptools wheel build
+ python -m build
twine check dist/*
# Inspect the output to make sure it looks right
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index e77d577d..6399f52f 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -21,8 +21,8 @@ jobs:
cache: pip
- name: Check packages
run: |
- python3 -m pip install -U pip setuptools wheel twine rstcheck;
- python3 setup.py sdist bdist_wheel;
+ python3 -m pip install -U pip setuptools wheel build twine rstcheck
+ python3 -m build
rstcheck README.rst CHANGES.rst
python3 -m twine check dist/*
test:
@@ -72,13 +72,6 @@ jobs:
python-version: ${{ matrix.python-version }}
cache: pip
- - name: Set Up Python - ${{ matrix.python-version }}
- uses: actions/setup-python@v2
- if: "!endsWith(matrix.python-version, '-dev')"
- with:
- python-version: ${{ matrix.python-version }}
- cache: pip
-
- name: Set Up Python (Development version) - ${{ matrix.python-version }}
uses: deadsnakes/action@v2.0.2
if: endsWith(matrix.python-version, '-dev')
diff --git a/ci/deploy.sh b/ci/deploy.sh
index 503f0723..322ca26f 100755
--- a/ci/deploy.sh
+++ b/ci/deploy.sh
@@ -2,6 +2,6 @@
set -exo pipefail
-python3 -m pip install --upgrade twine wheel
-python3 setup.py sdist bdist_wheel
+python3 -m pip install --upgrade twine wheel build
+python3 -m build
python3 -m twine upload dist/* -u $PYPI_USERNAME -p $PYPI_PASSWORD --skip-existing