diff --git a/opengsq/version.py b/opengsq/version.py index 36a511e..f1edb19 100644 --- a/opengsq/version.py +++ b/opengsq/version.py @@ -1 +1 @@ -__version__ = '2.2.1' +__version__ = '2.2.2' diff --git a/setup.py b/setup.py index 105c02d..132f7f1 100644 --- a/setup.py +++ b/setup.py @@ -2,15 +2,21 @@ from setuptools import find_packages, setup +current_dir = os.path.abspath(os.path.dirname(__file__)) version_contents = {} -with open(os.path.join(os.path.abspath(os.path.dirname(__file__)), 'opengsq', 'version.py'), encoding='utf-8') as f: + +with open(os.path.join(current_dir, 'opengsq', 'version.py'), encoding='utf-8') as f: exec(f.read(), version_contents) with open('README.md', 'r', encoding='utf-8') as f: long_description = f.read() -with open('requirements.txt', 'r', encoding='utf-8') as f: - install_requires = f.read().splitlines() +try: + with open('requirements.txt', 'r', encoding='utf-8') as f: + install_requires = f.read().splitlines() +except FileNotFoundError: + with open(os.path.join(current_dir, 'opengsq.egg-info', 'requires.txt'), 'r', encoding='utf-8') as f: + install_requires = f.read().splitlines() setup( name='opengsq',