-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathsetup.py
More file actions
30 lines (27 loc) · 810 Bytes
/
setup.py
File metadata and controls
30 lines (27 loc) · 810 Bytes
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
from __future__ import print_function
from setuptools import setup, find_packages
import subprocess
Version = "8.2.1"
p = subprocess.Popen(
("git",
"describe",
"--tags"),
stdin=subprocess.PIPE,
stdout=subprocess.PIPE,
stderr=subprocess.PIPE)
try:
descr = p.stdout.readlines()[0].strip()
Version = "-".join(descr.split("-")[:-2])
if Version == "":
Version = descr
except Exception:
descr = Version
with open("cdat_info/cdat_git_version.py", "w") as f:
print("__version__ = '%s'" % Version, file=f)
print("__describe__ = '%s'" % descr, file=f)
setup(name="cdat_info",
version=Version,
packages=find_packages(),
data_files = [ ('share/cdat', ['share/cdat_runtests.json'])],
scripts=['scripts/generate_cdat_notebook.py']
)