forked from hackingmaterials/matminer
-
Notifications
You must be signed in to change notification settings - Fork 0
/
setup.py
65 lines (57 loc) · 2.53 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
#!/usr/bin/env python
import os
from setuptools import setup, find_packages
module_dir = os.path.dirname(os.path.abspath(__file__))
# Requirements
reqs_file = os.path.join(module_dir, "requirements.txt")
with open(reqs_file, "r") as f:
reqs_raw = f.read()
reqs_list = [r.replace("==", ">=") for r in reqs_raw.split("\n")]
# Optional requirements
extras_file = os.path.join(module_dir, "requirements-optional.txt")
with open(extras_file, "r") as f:
extras_raw = f.read()
extras_raw = [r for r in extras_raw.split("##") if r.strip() and "#" not in r]
extras_dict = {}
for req in extras_raw:
items = [i.replace("==", ">=") for i in req.split("\n") if i.strip()]
dependency_name = items[0].strip()
dependency_reqs = [i.strip() for i in items[1:] if i.strip()]
extras_dict[dependency_name] = dependency_reqs
extras_list = list(extras_dict)
extras_list = [r for d in extras_dict.values() for r in d]
if __name__ == "__main__":
setup(
name='matminer',
version='0.6.3',
description='matminer is a library that contains tools for data '
'mining in Materials Science',
long_description=open(os.path.join(module_dir, 'README.md')).read(),
url='https://github.com/hackingmaterials/matminer',
author='Anubhav Jain',
author_email='anubhavster@gmail.com',
license='modified BSD',
packages=find_packages(),
package_data={
'matminer.datasets': ['*.json'],
'matminer.featurizers': ["*.yaml"],
'matminer.utils.data_files': ['*.cif', '*.csv', '*.tsv', '*.json',
'magpie_elementdata/*.table',
'jarvis/*.json', '*.txt']},
zip_safe=False,
install_requires=reqs_list,
extras_require=extras_dict,
classifiers=['Programming Language :: Python :: 2.7',
'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='matminer',
tests_require=extras_list,
scripts=[]
# scripts=[os.path.join('scripts', f) for f in os.listdir(os.path.join(module_dir, 'scripts'))]
)