From 79e3ec441c2d744cf3a08d9e5c3f9817b4638e99 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alex=20Gr=C3=B6nholm?= Date: Mon, 27 Jan 2020 17:48:53 +0200 Subject: [PATCH] Fixed installation from sdist not working Fixes #331. Fixes #332. Fixes #333. --- .github/workflows/codeqa-test-tag.yml | 2 +- MANIFEST.in | 9 +++++++++ docs/development.rst | 15 ++++++++++----- docs/news.rst | 5 +++++ pyproject.toml | 7 ------- setup.cfg | 2 +- setup.py | 2 +- src/wheel/__init__.py | 2 +- tox.ini | 1 - 9 files changed, 28 insertions(+), 17 deletions(-) create mode 100644 MANIFEST.in delete mode 100644 pyproject.toml diff --git a/.github/workflows/codeqa-test-tag.yml b/.github/workflows/codeqa-test-tag.yml index 5741abb4..94a9cae9 100644 --- a/.github/workflows/codeqa-test-tag.yml +++ b/.github/workflows/codeqa-test-tag.yml @@ -40,7 +40,7 @@ jobs: with: python-version: ${{ matrix.python-version }} - name: Install dependencies - run: pip install .[test] + run: "pip install --no-binary=:all: .[test]" - name: Test with pytest run: pytest diff --git a/MANIFEST.in b/MANIFEST.in new file mode 100644 index 00000000..04c54217 --- /dev/null +++ b/MANIFEST.in @@ -0,0 +1,9 @@ +recursive-include src *.py +recursive-include tests *.py *.h *.txt *.c *.dynlib +recursive-include docs *.py *.rst make.bat Makefile +include tests/testdata/test-1.0-py2.py3-none-any.whl +include tox.ini +include manpages/*.rst +prune tests/testdata/*/build +prune tests/testdata/*/dist +prune tests/testdata/*/*.egg-info diff --git a/docs/development.rst b/docs/development.rst index 3726040e..3613b474 100644 --- a/docs/development.rst +++ b/docs/development.rst @@ -83,8 +83,13 @@ The wheel project welcomes help in the following ways: Release Process --------------- -To make a new release, edit ``docs/news.rst`` and add a new version and replace -``**UNRELEASED**`` with a release version and date, like -``**X.Y.Z (20XX-YY-ZZ)**``. The github workflow will pick up the new version -and create a new tag, which will then trigger the release workflow which will -package the project and publish the resulting artifacts to PyPI. +To make a new release: + +#. Edit ``docs/news.rst`` and replace ``**UNRELEASED**`` with a release version + and date, like ``**X.Y.Z (20XX-YY-ZZ)**``. +#. Replace the ``__version__`` attribute in ``src/wheel/__init__.py`` with the + same version number as above (without the date of course). + +The github workflow will pick up the new version from ``news.rst`` and create a +new tag, which will then trigger the release workflow which will package the +project and publish the resulting artifacts to PyPI. diff --git a/docs/news.rst b/docs/news.rst index 94ee87f3..10bfeeba 100644 --- a/docs/news.rst +++ b/docs/news.rst @@ -1,6 +1,11 @@ Release Notes ============= +**UNRELEASED** + +- Fixed installation of ``wheel`` from sdist which was broken due to a chicken + and egg problem with PEP 517 and setuptools_scm + **0.34.0 (2020-01-27)** - Dropped Python 3.4 support diff --git a/pyproject.toml b/pyproject.toml deleted file mode 100644 index f5c4199d..00000000 --- a/pyproject.toml +++ /dev/null @@ -1,7 +0,0 @@ -[build-system] -requires = ["setuptools >= 42", "setuptools_scm[toml]>=3.4"] -build-backend = "setuptools.build_meta" - -[tool.setuptools_scm] -write_to = "src/wheel/_version.py" -version_scheme = "post-release" diff --git a/setup.cfg b/setup.cfg index 798be732..a3dd482a 100644 --- a/setup.cfg +++ b/setup.cfg @@ -1,5 +1,6 @@ [metadata] name = wheel +version = attr: wheel.__version__ description = A built-package format for Python long_description = file: README.rst classifiers = @@ -32,7 +33,6 @@ package_dir= = src packages = find: python_requires = >=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.* -setup_requires = setuptools_scm >= 3.4 zip_safe = False [options.packages.find] diff --git a/setup.py b/setup.py index d5d43d7c..60684932 100644 --- a/setup.py +++ b/setup.py @@ -1,3 +1,3 @@ from setuptools import setup -setup(use_scm_version=True) +setup() diff --git a/src/wheel/__init__.py b/src/wheel/__init__.py index d986e5bc..9b01039b 100644 --- a/src/wheel/__init__.py +++ b/src/wheel/__init__.py @@ -1 +1 @@ -from ._version import version as __version__ # noqa: F401 +__version__ = '0.34.1' diff --git a/tox.ini b/tox.ini index e6686804..e0dd820f 100644 --- a/tox.ini +++ b/tox.ini @@ -7,7 +7,6 @@ envlist = py27, py35, py36, py37, py38, pypy, pypy3, flake8 minversion = 3.3.0 skip_missing_interpreters = true -isolated_build = true [testenv] commands = pytest {posargs}