Skip to content

Commit

Permalink
Move VERSION source directory (#443)
Browse files Browse the repository at this point in the history
  • Loading branch information
Archmonger committed May 9, 2022
1 parent 445d0c3 commit 91ded93
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 8 deletions.
2 changes: 1 addition & 1 deletion MANIFEST.in
Original file line number Diff line number Diff line change
Expand Up @@ -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 *
File renamed without changes.
4 changes: 2 additions & 2 deletions dbbackup/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -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."""

Expand Down
11 changes: 6 additions & 5 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -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()


Expand All @@ -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(),
Expand Down

0 comments on commit 91ded93

Please sign in to comment.