-
Notifications
You must be signed in to change notification settings - Fork 77
/
setup.py
42 lines (27 loc) · 957 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
31
32
33
34
35
36
37
38
39
40
41
42
#!/usr/bin/env python
"""PyMKS - the materials knowledge system in Python
See the documenation for details at https://pymks.org
"""
import pathlib
from setuptools.config import read_configuration
from setuptools import setup, find_packages
import versioneer
def get_setupcfg():
"""Get the absolute path for setup.cfg"""
return pathlib.Path(__file__).parent.absolute() / "setup.cfg"
def get_configuration():
"""Get contents of setup.cfg as a dict"""
return read_configuration(get_setupcfg())
def get_name():
"""Single location for name of package"""
return get_configuration()["metadata"]["name"]
def setup_args():
"""Get the setup arguments not configured in setup.cfg"""
return dict(
packages=find_packages(),
package_data={"": ["tests/*.py"]},
data_files=["setup.cfg"],
version=versioneer.get_version(),
cmdclass=versioneer.get_cmdclass(),
)
setup(**setup_args())