From ce73094b493c2fb12e113f1f729f7c876c447715 Mon Sep 17 00:00:00 2001 From: Linux-cpp-lisp <1473644+Linux-cpp-lisp@users.noreply.github.com> Date: Wed, 17 Nov 2021 15:57:44 -0500 Subject: Refactor and bump version --- setup.py | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) (limited to 'setup.py') diff --git a/setup.py b/setup.py index 550c159..49b8704 100644 --- a/setup.py +++ b/setup.py @@ -1,6 +1,13 @@ from setuptools import setup, find_packages +from pathlib import Path + +# see https://packaging.python.org/guides/single-sourcing-package-version/ +version_dict = {} +with open(Path(__file__).parents[0] / "torch_runstats/_version.py") as fp: + exec(fp.read(), version_dict) +version = version_dict["__version__"] +del version_dict -__version__ = '0.2' url = 'https://github.com/fadel/pytorch_ema' download_url = '{}/archive/{}.tar.gz'.format(url, __version__) @@ -10,7 +17,7 @@ tests_require = [] setup( name='torch_ema', - version=__version__, + version=version, description='PyTorch library for computing moving averages of model parameters.', author='Samuel G. Fadel', author_email='samuelfadel@gmail.com', -- cgit v1.2.3