forked from hackingmaterials/amset
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsetup.py
78 lines (68 loc) · 2.71 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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
import os
import platform
import sys
from distutils.sysconfig import get_config_vars
from distutils.version import LooseVersion
from pathlib import Path
from setuptools import find_packages, setup
from amset import __version__
reqs_raw = Path("requirements.txt").read_text()
reqs_list = [r.replace("==", ">=") for r in reqs_raw.split("\n")]
module_dir = os.path.dirname(os.path.abspath(__file__))
# The below snippet was taken from the Pandas setup.py script.
# It should make it easy to install BolzTraP2 without additional
# configuration.
# For mac, ensure extensions are built for macos 10.9 when compiling on a
# 10.9 system or above, overriding distuitls behaviour which is to target
# the version that python was built for. This may be overridden by setting
# MACOSX_DEPLOYMENT_TARGET before calling setup.py
if sys.platform == "darwin":
if "MACOSX_DEPLOYMENT_TARGET" not in os.environ:
current_system = platform.mac_ver()[0]
python_target = get_config_vars().get(
"MACOSX_DEPLOYMENT_TARGET", current_system
)
if LooseVersion(current_system) >= "10.9" > LooseVersion(python_target):
os.environ["MACOSX_DEPLOYMENT_TARGET"] = "10.9"
with open("README.md", "r") as file:
long_description = file.read()
if __name__ == "__main__":
setup(
name="amset",
version=__version__,
description="AMSET is a tool to calculate carrier transport properties "
"from ab initio calculation data",
long_description=long_description,
url="https://github.com/hackingmaterials/amset",
author="Alex Ganose",
author_email="[email protected]",
license="modified BSD",
keywords="conductivity scattering seebeck dft vasp",
packages=find_packages(),
package_data={
"amset": [
"defaults.yaml", "plot/asmet_base.mplstyle", "plot/revtex.mplstyle"
]
},
data_files=["LICENSE", "requirements.txt"],
zip_safe=False,
install_requires=reqs_list,
classifiers=[
"Programming Language :: Python :: 3.6",
"Development Status :: 4 - Beta",
"Intended Audience :: Science/Research",
"Intended Audience :: System Administrators",
"Intended Audience :: Information Technology",
"Operating System :: OS Independent",
"Topic :: Other/Nonlisted Topic",
"Topic :: Scientific/Engineering",
],
test_suite="nose.collector",
tests_require=["nose"],
entry_points={
"console_scripts": [
"amset = amset.tools.cli:cli",
"eff-phonon-freq = amset.tools.phonon_frequency:main",
]
},
)