From 91ded939cbb04f478500f684791e8268ac817b99 Mon Sep 17 00:00:00 2001 From: Mark <16909269+Archmonger@users.noreply.github.com> Date: Mon, 9 May 2022 02:18:36 -0700 Subject: [PATCH] Move VERSION source directory (#443) --- MANIFEST.in | 2 +- VERSION => dbbackup/VERSION | 0 dbbackup/__init__.py | 4 ++-- setup.py | 11 ++++++----- 4 files changed, 9 insertions(+), 8 deletions(-) rename VERSION => dbbackup/VERSION (100%) diff --git a/MANIFEST.in b/MANIFEST.in index fc7c13b..df9170e 100644 --- a/MANIFEST.in +++ b/MANIFEST.in @@ -2,5 +2,5 @@ recursive-include requirements * include requirements.txt include README.rst include LICENSE.txt -include VERSION +include dbbackup/VERSION recursive-include dbbackup/tests/testapp/blobs * diff --git a/VERSION b/dbbackup/VERSION similarity index 100% rename from VERSION rename to dbbackup/VERSION diff --git a/dbbackup/__init__.py b/dbbackup/__init__.py index 994a6cc..1101e39 100644 --- a/dbbackup/__init__.py +++ b/dbbackup/__init__.py @@ -4,8 +4,8 @@ import django -project_dir = Path(__file__).parent -with (project_dir.parent / "VERSION").open() as f: +src_dir = Path(__file__).parent +with (src_dir / "VERSION").open() as f: __version__ = f.read().strip() """The full version, including alpha/beta/rc tags.""" diff --git a/setup.py b/setup.py index 7626b5b..f3514c9 100644 --- a/setup.py +++ b/setup.py @@ -4,18 +4,19 @@ from setuptools import find_packages, setup -project_dir = Path(__file__).parent -with (project_dir / "VERSION").open() as f: +root_dir = Path(__file__).parent +src_dir = root_dir / "dbbackup" +with (src_dir / "VERSION").open() as f: version = f.read().strip() def get_requirements(): - with (project_dir / "requirements.txt").open() as f: + with (root_dir / "requirements.txt").open() as f: return f.read().splitlines() def get_test_requirements(): - with (project_dir / "requirements" / "tests.txt").open() as f: + with (root_dir / "requirements" / "tests.txt").open() as f: return f.read().splitlines() @@ -25,7 +26,7 @@ def get_test_requirements(): description="Management commands to help backup and restore a project database and media.", author="Archmonger", author_email="archiethemonger@gmail.com", - long_description=project_dir.joinpath("README.rst").read_text(encoding="utf-8"), + long_description=(root_dir / "README.rst").read_text(encoding="utf-8"), python_requires=">=3.6", install_requires=get_requirements(), tests_require=get_test_requirements(),