Skip to content

Commit

Permalink
fix(version): make package version available after install (#61)
Browse files Browse the repository at this point in the history
  • Loading branch information
portellaa authored Apr 27, 2021
1 parent acce362 commit 6e4368b
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 1 deletion.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -372,4 +372,5 @@ DerivedData/
*.pickle

# User created
VERSION
VERSION
version.py
5 changes: 5 additions & 0 deletions setup.py
Original file line number Diff line number Diff line change
@@ -1,13 +1,18 @@
from fileinput import FileInput
from setuptools import setup, find_namespace_packages
from pathlib import Path


here = Path(__file__).parent.resolve()

requirements = (here / "requirements.txt").read_text(encoding="utf8")
long_description = (here / 'README.md').read_text(encoding='utf-8')

version = (here / 'VERSION').read_text().rstrip("\n")

with open('src/ydata_synthetic/version.py', 'w') as version_file:
version_file.write(f'__version__ = \'{version}\'')

setup(name='ydata-synthetic',
version=version,
description='Synthetic data generation methods with different synthetization methods.',
Expand Down
1 change: 1 addition & 0 deletions src/ydata_synthetic/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
from .version import __version__

0 comments on commit 6e4368b

Please sign in to comment.