diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index df4390a0..712704c1 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -39,7 +39,7 @@ jobs: # Linting verifies that the project is in an acceptable state to create files # for releasing. # And this action should be run whenever a release is ready to go public as - # the version number will be changed by editing __about__.py. + # the version number will be changed by editing __init__.py. needs: lint steps: diff --git a/docs/conf.py b/docs/conf.py index c2fffd40..d89b26aa 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -8,7 +8,7 @@ ABOUT = {} _BASE_DIR = os.path.join(os.path.dirname(__file__), os.pardir) -with open(os.path.join(_BASE_DIR, "packaging", "__about__.py")) as f: +with open(os.path.join(_BASE_DIR, "src", "packaging", "__init__.py")) as f: exec(f.read(), ABOUT) # -- General configuration ---------------------------------------------------- diff --git a/noxfile.py b/noxfile.py index 1636d7d0..6c480595 100644 --- a/noxfile.py +++ b/noxfile.py @@ -35,7 +35,7 @@ def coverage(*args): coverage( "run", "--source", - "packaging/", + "packaging", "-m", "pytest", "--strict-markers", @@ -95,7 +95,7 @@ def docs(session): @nox.session def release(session): package_name = "packaging" - version_file = Path(f"{package_name}/__about__.py") + version_file = Path(f"src/{package_name}/__init__.py") changelog_file = Path("CHANGELOG.rst") try: diff --git a/packaging/__init__.py b/packaging/__init__.py deleted file mode 100644 index 3c50c5dc..00000000 --- a/packaging/__init__.py +++ /dev/null @@ -1,25 +0,0 @@ -# This file is dual licensed under the terms of the Apache License, Version -# 2.0, and the BSD License. See the LICENSE file in the root of this repository -# for complete details. - -from .__about__ import ( - __author__, - __copyright__, - __email__, - __license__, - __summary__, - __title__, - __uri__, - __version__, -) - -__all__ = [ - "__title__", - "__summary__", - "__uri__", - "__version__", - "__author__", - "__email__", - "__license__", - "__copyright__", -] diff --git a/pyproject.toml b/pyproject.toml index b8d40174..9a145424 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -6,7 +6,7 @@ build-backend = "flit_core.buildapi" [project] name = "packaging" description = "Core utilities for Python packages" -version = "22.0" +dynamic = ["version"] readme = "README.rst" requires-python = ">=3.7" authors = [{name = "Donald Stufft", email = "donald@stufft.io"}] diff --git a/packaging/__about__.py b/src/packaging/__init__.py similarity index 75% rename from packaging/__about__.py rename to src/packaging/__init__.py index 78b54d8c..5c312928 100644 --- a/packaging/__about__.py +++ b/src/packaging/__init__.py @@ -2,17 +2,6 @@ # 2.0, and the BSD License. See the LICENSE file in the root of this repository # for complete details. -__all__ = [ - "__title__", - "__summary__", - "__uri__", - "__version__", - "__author__", - "__email__", - "__license__", - "__copyright__", -] - __title__ = "packaging" __summary__ = "Core utilities for Python packages" __uri__ = "https://github.com/pypa/packaging" diff --git a/packaging/_elffile.py b/src/packaging/_elffile.py similarity index 100% rename from packaging/_elffile.py rename to src/packaging/_elffile.py diff --git a/packaging/_manylinux.py b/src/packaging/_manylinux.py similarity index 100% rename from packaging/_manylinux.py rename to src/packaging/_manylinux.py diff --git a/packaging/_musllinux.py b/src/packaging/_musllinux.py similarity index 100% rename from packaging/_musllinux.py rename to src/packaging/_musllinux.py diff --git a/packaging/_parser.py b/src/packaging/_parser.py similarity index 100% rename from packaging/_parser.py rename to src/packaging/_parser.py diff --git a/packaging/_structures.py b/src/packaging/_structures.py similarity index 100% rename from packaging/_structures.py rename to src/packaging/_structures.py diff --git a/packaging/_tokenizer.py b/src/packaging/_tokenizer.py similarity index 100% rename from packaging/_tokenizer.py rename to src/packaging/_tokenizer.py diff --git a/packaging/markers.py b/src/packaging/markers.py similarity index 100% rename from packaging/markers.py rename to src/packaging/markers.py diff --git a/packaging/py.typed b/src/packaging/py.typed similarity index 100% rename from packaging/py.typed rename to src/packaging/py.typed diff --git a/packaging/requirements.py b/src/packaging/requirements.py similarity index 100% rename from packaging/requirements.py rename to src/packaging/requirements.py diff --git a/packaging/specifiers.py b/src/packaging/specifiers.py similarity index 100% rename from packaging/specifiers.py rename to src/packaging/specifiers.py diff --git a/packaging/tags.py b/src/packaging/tags.py similarity index 100% rename from packaging/tags.py rename to src/packaging/tags.py diff --git a/packaging/utils.py b/src/packaging/utils.py similarity index 100% rename from packaging/utils.py rename to src/packaging/utils.py diff --git a/packaging/version.py b/src/packaging/version.py similarity index 100% rename from packaging/version.py rename to src/packaging/version.py