Skip to content

Commit 888bb66

Browse files
committed
execute version.py directly rather than importing from module
1 parent 51276a4 commit 888bb66

2 files changed

Lines changed: 11 additions & 11 deletions

File tree

requirements.txt

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,2 @@
1-
numpy>=1.13.0
2-
netCDF4
3-
jsonschema==2.6.0
1+
--index-url https://pypi.python.org/simple/
2+
-e .

setup.py

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,14 @@
11
from setuptools import setup, find_packages
22

3-
from ncwriter.version import __version__
3+
version = {}
4+
with open("ncwriter/version.py") as fp:
5+
exec(fp.read(), version)
46

5-
INSTALL_REQUIRES = [line.strip() for line in open('requirements.txt')]
6-
# INSTALL_REQUIRES = [
7-
# 'jsonschema==2.6.0',
8-
# 'numpy>=1.13.0',
9-
# 'netCDF4'
10-
# ]
7+
INSTALL_REQUIRES = [
8+
'jsonschema==2.6.0',
9+
'numpy>=1.13.0',
10+
'netCDF4'
11+
]
1112

1213
# TODO: add this when we have JSON schema files and templates bundled
1314
# PACKAGE_DATA = {
@@ -20,7 +21,7 @@
2021

2122
setup(
2223
name=PACKAGE_NAME,
23-
version=__version__,
24+
version=version['__version__'],
2425
packages=find_packages(exclude=PACKAGE_EXCLUDES),
2526
# package_data=PACKAGE_DATA,
2627
url='https://github.com/aodn',

0 commit comments

Comments
 (0)