Skip to content

Commit

Permalink
Use unique VERSION file (#54)
Browse files Browse the repository at this point in the history
  • Loading branch information
La0 authored Dec 12, 2022
1 parent 1eb309c commit dc85cb4
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 3 deletions.
2 changes: 2 additions & 0 deletions MANIFEST.in
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
include laia/VERSION

exclude .pre-commit-config.yaml
exclude CONTRIBUTING.md

Expand Down
1 change: 1 addition & 0 deletions laia/VERSION
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
1.0.2
5 changes: 3 additions & 2 deletions laia/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,9 @@
import laia.utils

__all__ = ["__version__", "__root__", "get_installed_versions"]
__version__ = "1.0.2"
__root__ = Path(__file__).parent.parent
__lib__ = Path(__file__).parent
__root__ = __lib__.parent
__version__ = (__lib__ / "VERSION").read_text()

try:
branch = subprocess.check_output(
Expand Down
5 changes: 4 additions & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@

DIR = os.path.dirname(os.path.abspath(__file__))

with open(os.path.join(DIR, "laia/VERSION")) as f:
VERSION = f.read()


def get_requirements():
requirements_path = os.path.join(DIR, "requirements.txt")
Expand All @@ -18,7 +21,7 @@ def get_long_description():

setuptools.setup(
name="pylaia",
version="1.0.2",
version=VERSION,
author="Joan Puigcerver",
author_email="[email protected]",
maintainer="Teklia",
Expand Down

0 comments on commit dc85cb4

Please sign in to comment.