summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlex Grönholm <alex.gronholm@nextday.fi>2020-01-27 22:11:57 +0200
committerGitHub <noreply@github.com>2020-01-27 22:11:57 +0200
commit510a531af1415638ef5f0b9f443762dec62ed4fe (patch)
tree571aa9a9a27b58c02fe5a4c26b7fcea0a8f7011a
parentca444968b544a9685c3c4fbc73715d25b90f4c46 (diff)
downloadwheel-git-510a531af1415638ef5f0b9f443762dec62ed4fe.tar.gz
Fixed installation from sdist (#334)
Wheel cannot use pep517 yet because the installation process involves installing wheel because the setuptools build backend declares it as a dependency for building wheels. A future update of pip may solve this problem. Setuptools_scm, on the other hand, requires wheel as a build time dependency so if somebody tries to install wheel using `--no-binary=:all:`, it also creates a circular dependency. Fixes #332.
-rw-r--r--.github/workflows/codeqa-test-tag.yml6
-rw-r--r--.github/workflows/publish.yml6
-rw-r--r--MANIFEST.in9
-rw-r--r--docs/development.rst15
-rw-r--r--docs/news.rst5
-rw-r--r--pyproject.toml7
-rw-r--r--setup.cfg3
-rw-r--r--setup.py2
-rw-r--r--src/wheel/__init__.py2
-rw-r--r--tox.ini1
10 files changed, 37 insertions, 19 deletions
diff --git a/.github/workflows/codeqa-test-tag.yml b/.github/workflows/codeqa-test-tag.yml
index 5741abb..da7e16c 100644
--- a/.github/workflows/codeqa-test-tag.yml
+++ b/.github/workflows/codeqa-test-tag.yml
@@ -39,7 +39,11 @@ jobs:
uses: actions/setup-python@v1
with:
python-version: ${{ matrix.python-version }}
- - name: Install dependencies
+ - name: Upgrade setuptools
+ run: pip install "setuptools >= 40.9"
+ - name: Install the project
+ run: "pip install --no-binary=:all: ."
+ - name: Install test dependencies
run: pip install .[test]
- name: Test with pytest
run: pytest
diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml
index 36aa281..4345c91 100644
--- a/.github/workflows/publish.yml
+++ b/.github/workflows/publish.yml
@@ -13,9 +13,11 @@ jobs:
with:
python-version: 3.x
- name: Install dependencies
- run: pip install pep517
+ run: |
+ pip install "setuptools >= 40.9"
+ pip install .
- name: Create packages
- run: python -m pep517.build --binary --source --out-dir dist/ .
+ run: python setup.py sdist bdist_wheel
- name: Upload packages
uses: pypa/gh-action-pypi-publish@v1.0.0a0
with:
diff --git a/MANIFEST.in b/MANIFEST.in
new file mode 100644
index 0000000..04c5421
--- /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 3726040..3613b47 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 94ee87f..10bfeeb 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 f5c4199..0000000
--- 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 798be73..56e7c71 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,7 @@ 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
+setup_requires = setuptools >= 40.9.0
zip_safe = False
[options.packages.find]
diff --git a/setup.py b/setup.py
index d5d43d7..6068493 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 d986e5b..9b01039 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 e668680..e0dd820 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}