From e29a5bdd0817f4068aac83edf110caf7c421f574 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alex=20Gr=C3=B6nholm?= Date: Wed, 22 Jan 2020 00:30:10 +0200 Subject: [PATCH] Migrated to the src layout Fixes #37. --- .github/workflows/codeqa-test-tag.yml | 2 +- MANIFEST.in | 2 +- docs/news.rst | 1 + setup.cfg | 6 +++++- {wheel => src/wheel}/__init__.py | 0 {wheel => src/wheel}/__main__.py | 0 {wheel => src/wheel}/bdist_wheel.py | 0 {wheel => src/wheel}/cli/__init__.py | 0 {wheel => src/wheel}/cli/convert.py | 0 {wheel => src/wheel}/cli/pack.py | 0 {wheel => src/wheel}/cli/unpack.py | 0 {wheel => src/wheel}/macosx_libfile.py | 0 {wheel => src/wheel}/metadata.py | 0 {wheel => src/wheel}/pep425tags.py | 0 {wheel => src/wheel}/pkginfo.py | 0 {wheel => src/wheel}/util.py | 0 {wheel => src/wheel}/wheelfile.py | 0 tox.ini | 6 +++--- 18 files changed, 11 insertions(+), 6 deletions(-) rename {wheel => src/wheel}/__init__.py (100%) rename {wheel => src/wheel}/__main__.py (100%) rename {wheel => src/wheel}/bdist_wheel.py (100%) rename {wheel => src/wheel}/cli/__init__.py (100%) rename {wheel => src/wheel}/cli/convert.py (100%) rename {wheel => src/wheel}/cli/pack.py (100%) rename {wheel => src/wheel}/cli/unpack.py (100%) rename {wheel => src/wheel}/macosx_libfile.py (100%) rename {wheel => src/wheel}/metadata.py (100%) rename {wheel => src/wheel}/pep425tags.py (100%) rename {wheel => src/wheel}/pkginfo.py (100%) rename {wheel => src/wheel}/util.py (100%) rename {wheel => src/wheel}/wheelfile.py (100%) diff --git a/.github/workflows/codeqa-test-tag.yml b/.github/workflows/codeqa-test-tag.yml index 633eeca3..5741abb4 100644 --- a/.github/workflows/codeqa-test-tag.yml +++ b/.github/workflows/codeqa-test-tag.yml @@ -10,7 +10,7 @@ jobs: - name: Check code style with Flake8 uses: TrueBrain/actions-flake8@v1.2 with: - path: wheel tests + path: src tests test: needs: [flake8] diff --git a/MANIFEST.in b/MANIFEST.in index ee0533e9..863d1da0 100644 --- a/MANIFEST.in +++ b/MANIFEST.in @@ -1,4 +1,4 @@ -recursive-include wheel *.py +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 diff --git a/docs/news.rst b/docs/news.rst index 25c2c073..e9423b1d 100644 --- a/docs/news.rst +++ b/docs/news.rst @@ -9,6 +9,7 @@ Release Notes - Updated project packaging and testing configuration for :pep:`517` - Moved the contents of setup.py to setup.cfg - Fixed duplicate RECORD file when using "wheel pack" on Windows +- Switched the project to use the "src" layout **0.33.6 (2019-08-18)** diff --git a/setup.cfg b/setup.cfg index 57dd5b71..a3dd482a 100644 --- a/setup.cfg +++ b/setup.cfg @@ -29,10 +29,15 @@ keywords = wheel, packaging license = MIT [options] +package_dir= + = src packages = find: python_requires = >=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.* zip_safe = False +[options.packages.find] +where = src + [options.extras_require] test = pytest >= 3.0.0 @@ -50,7 +55,6 @@ testpaths = tests [coverage:run] source = wheel -omit = .tox/* [coverage:report] show_missing = true diff --git a/wheel/__init__.py b/src/wheel/__init__.py similarity index 100% rename from wheel/__init__.py rename to src/wheel/__init__.py diff --git a/wheel/__main__.py b/src/wheel/__main__.py similarity index 100% rename from wheel/__main__.py rename to src/wheel/__main__.py diff --git a/wheel/bdist_wheel.py b/src/wheel/bdist_wheel.py similarity index 100% rename from wheel/bdist_wheel.py rename to src/wheel/bdist_wheel.py diff --git a/wheel/cli/__init__.py b/src/wheel/cli/__init__.py similarity index 100% rename from wheel/cli/__init__.py rename to src/wheel/cli/__init__.py diff --git a/wheel/cli/convert.py b/src/wheel/cli/convert.py similarity index 100% rename from wheel/cli/convert.py rename to src/wheel/cli/convert.py diff --git a/wheel/cli/pack.py b/src/wheel/cli/pack.py similarity index 100% rename from wheel/cli/pack.py rename to src/wheel/cli/pack.py diff --git a/wheel/cli/unpack.py b/src/wheel/cli/unpack.py similarity index 100% rename from wheel/cli/unpack.py rename to src/wheel/cli/unpack.py diff --git a/wheel/macosx_libfile.py b/src/wheel/macosx_libfile.py similarity index 100% rename from wheel/macosx_libfile.py rename to src/wheel/macosx_libfile.py diff --git a/wheel/metadata.py b/src/wheel/metadata.py similarity index 100% rename from wheel/metadata.py rename to src/wheel/metadata.py diff --git a/wheel/pep425tags.py b/src/wheel/pep425tags.py similarity index 100% rename from wheel/pep425tags.py rename to src/wheel/pep425tags.py diff --git a/wheel/pkginfo.py b/src/wheel/pkginfo.py similarity index 100% rename from wheel/pkginfo.py rename to src/wheel/pkginfo.py diff --git a/wheel/util.py b/src/wheel/util.py similarity index 100% rename from wheel/util.py rename to src/wheel/util.py diff --git a/wheel/wheelfile.py b/src/wheel/wheelfile.py similarity index 100% rename from wheel/wheelfile.py rename to src/wheel/wheelfile.py diff --git a/tox.ini b/tox.ini index 77664f05..e6686804 100644 --- a/tox.ini +++ b/tox.ini @@ -10,11 +10,11 @@ skip_missing_interpreters = true isolated_build = true [testenv] -commands = python -m pytest {posargs} +commands = pytest {posargs} extras = test [testenv:flake8] -basepython = python2.7 +basepython = python3 deps = flake8 -commands = flake8 wheel tests +commands = flake8 src tests skip_install = true