forked from uc-cdis/datadictionary
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsetup.py
38 lines (34 loc) · 1.07 KB
/
setup.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
from subprocess import check_output
from setuptools import setup, find_packages
def get_version():
# https://github.com/uc-cdis/dictionaryutils/pull/37#discussion_r257898408
try:
tag = check_output(
["git", "describe", "--tags", "--abbrev=0", "--match=[0-9]*"]
)
return tag.decode("utf-8").strip("\n")
except Exception:
raise RuntimeError(
"The version number cannot be extracted from git tag in this source "
"distribution; please either download the source from PyPI, or check out "
"from GitHub and make sure that the git CLI is available."
)
setup(
name='gen3dictionary',
version=get_version(),
description="Gen3 generic data dictionary",
license="Apache",
packages=find_packages(),
install_requires=[
'PyYAML~=5.1',
'jsonschema>=2.5.1',
'dictionaryutils',
],
package_data={
"gdcdictionary": [
"schemas/*.yaml",
"schemas/projects/*.yaml",
"schemas/projects/*/*.yaml",
]
},
)