-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathsetup.py
30 lines (21 loc) · 838 Bytes
/
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
from codecs import open
import json
from os import path
from setuptools import setup, find_packages
here = path.abspath(path.dirname(__file__))
with open(path.join(here, "config.json"), "rt") as f:
conf = json.load(f)
# Generate meta.yaml
metayaml = conf["metayaml"]
metayaml["package"]["version"] = conf["setuppy"]["version"]
metayaml["source"]["git_rev"] = conf["setuppy"]["version"]
metayaml["about"]["home"] = conf["setuppy"]["url"]
metayaml["about"]["license"] = conf["setuppy"]["license"]
with open(path.join(here, "./conda-recipe/meta.yaml"), "wt") as f:
json.dump(metayaml, f)
# setup
setup_dict = conf["setuppy"]
with open(path.join(here, "README.md"), encoding="utf-8") as f:
setup_dict["long_description"] = f.read()
setup_dict["packages"] = find_packages(exclude=["pygosemsim.test*"])
setup(**setup_dict)