diff --git a/.github/workflows/pypi_upload.yml b/.github/workflows/pypi_upload.yml index ca19f43172..cbbb4d31a7 100644 --- a/.github/workflows/pypi_upload.yml +++ b/.github/workflows/pypi_upload.yml @@ -39,7 +39,7 @@ jobs: - name: Install dependencies run: | - python -m pip install --upgrade --upgrade-strategy=eager pip setuptools wheel twine + python -m pip install --upgrade --upgrade-strategy=eager pip setuptools build wheel twine python -m pip install -e . --upgrade python -m pipenv install --dev env: @@ -47,7 +47,7 @@ jobs: - name: Build wheels run: | - python -m pipenv run python setup.py sdist bdist_wheel + python -m pipenv run python -m build # to upload to test pypi, pass repository_url: https://test.pypi.org/legacy/ and use secrets.TEST_PYPI_TOKEN - name: Publish a Python distribution to PyPI diff --git a/Makefile b/Makefile index 44498ac94b..fe5f493213 100644 --- a/Makefile +++ b/Makefile @@ -4,7 +4,7 @@ venv_dir := $(get_venv_dir)/pipenv_venv venv_file := $(CURDIR)/.test_venv get_venv_path =$(file < $(venv_file)) # This is how we will build tag-specific wheels, e.g. py36 or py37 -PY_VERSIONS:= 3.7 3.8 3.9 3.10 +PY_VERSIONS:= 3.7 3.8 3.9 3.10 3.11 BACKSLASH = '\\' # This is how we will build generic wheels, e.g. py2 or py3 INSTALL_TARGETS := $(addprefix install-py,$(PY_VERSIONS)) @@ -96,7 +96,7 @@ retest: virtualenv submodules test-install .PHONY: build build: install-virtualenvs.stamp install.stamp - PIPENV_PYTHON=3.7 pipenv run python setup.py sdist bdist_wheel + PIPENV_PYTHON=3.7 pipenv run python -m build .PHONY: update-version update-version: diff --git a/Pipfile b/Pipfile index 67e0637e10..5f57ce46d1 100644 --- a/Pipfile +++ b/Pipfile @@ -26,6 +26,8 @@ invoke = "==2.0.0" exceptiongroup = "==1.1.0" tomli = "*" pyyaml = "==6.0.1" +twine = "*" +build = "*" [packages] pytz = "*" diff --git a/tasks/release.py b/tasks/release.py index f828849cb5..c941c94063 100644 --- a/tasks/release.py +++ b/tasks/release.py @@ -165,7 +165,7 @@ def build_dists(ctx): ctx.run("pipenv install --dev", env=env) ctx.run("pipenv run pip install -e . --upgrade --upgrade-strategy=eager", env=env) log("Building wheel using python %s ...." % py_version) - ctx.run("pipenv run python setup.py sdist bdist_wheel", env=env) + ctx.run("pipenv run python -m build", env=env) @invoke.task(build_dists)