Skip to content

Commit a4dc65f

Browse files
committed
[setup] Read project information from info.json
1 parent 5a18eb5 commit a4dc65f

File tree

1 file changed

+14
-1
lines changed

1 file changed

+14
-1
lines changed

setup.py

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,21 @@
1+
import json
2+
import os
13
import sys
24
try:
35
from setuptools import setup
46
except ImportError as ex:
57
from distutils.core import setup
6-
from odml.info import AUTHOR, CONTACT, CLASSIFIERS, HOMEPAGE, VERSION
8+
9+
with open(os.path.join("odml", "info.json")) as infofile:
10+
infodict = json.load(infofile)
11+
12+
VERSION = infodict["VERSION"]
13+
FORMAT_VERSION = infodict["FORMAT_VERSION"]
14+
AUTHOR = infodict["AUTHOR"]
15+
COPYRIGHT = infodict["COPYRIGHT"]
16+
CONTACT = infodict["CONTACT"]
17+
HOMEPAGE = infodict["HOMEPAGE"]
18+
CLASSIFIERS = infodict["CLASSIFIERS"]
719

820
packages = [
921
'odml',
@@ -27,6 +39,7 @@
2739
packages=packages,
2840
test_suite='test',
2941
install_requires=install_req,
42+
include_package_data=True,
3043
long_description=description_text,
3144
classifiers=CLASSIFIERS,
3245
license="BSD"

0 commit comments

Comments
 (0)