This repository has been archived by the owner on Aug 16, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 4
/
setup.py
executable file
·102 lines (89 loc) · 2.9 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
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
# Copyright Tilde Materials Informatics
# Distributed under the MIT License
from __future__ import print_function
from setuptools import setup, find_packages
import os, sys
# Search for required system packages
missing_packages = []
try:
import numpy
from numpy import linalg
except ImportError:
missing_packages.append('numpy')
try:
from distutils.sysconfig import get_makefile_filename
except ImportError:
missing_packages.append('build-essential')
missing_packages.append('python-dev')
import subprocess
child = subprocess.Popen(["pkg-config", "libffi"], stdout=subprocess.PIPE)
status = child.communicate()[0]
if child.returncode != 0:
missing_packages.append('libffi-dev')
if missing_packages:
print("Please install the following required packages (or equivalents) on your system:")
print("".join([" * %s\n" % p for p in missing_packages]))
print()
print("Installation will now exit.")
sys.exit(1)
# convert documentation to rst
try:
import pypandoc
long_description = pypandoc.convert('README.md', 'rst')
except (IOError, ImportError, RuntimeError) as e:
if len(sys.argv) > 2 and sys.argv[2] == "upload":
raise e.__class__("PyPI servers need reStructuredText as README! Please install pypandoc to convert markdown "
"to rst")
else:
long_description = ''
from tilde import __version__
packages = find_packages(exclude=["tests", "tests.*"])
install_requires = [
'numpy',
'ujson',
'bcrypt',
'pg8000',
'sqlalchemy',
'argparse',
'ase',
'spglib',
'tornado == 4.5.3',
'sockjs-tornado',
'websocket-client',
'httplib2',
'quantum_esperanto',
'pycrystal'
]
setup(
name='tilde',
version=__version__,
description='Materials informatics framework for creating ab initio data repositories',
long_description=long_description,
url='https://github.com/tilde-lab/tilde',
license='MIT',
classifiers=[
'Development Status :: 3 - Alpha',
'Intended Audience :: Science/Research',
'Topic :: Scientific/Engineering :: Chemistry',
'Topic :: Scientific/Engineering :: Physics',
'Topic :: Scientific/Engineering :: Information Analysis',
'Topic :: Software Development :: Libraries :: Python Modules',
'License :: OSI Approved :: MIT License',
'Programming Language :: Python :: 3',
'Programming Language :: Python :: 3.6',
'Programming Language :: Python :: 3.7',
'Programming Language :: Python :: 3.8'
],
keywords='CRYSTAL Quantum-ESPRESSO VASP ab-initio materials informatics first-principles',
packages=packages,
include_package_data=True,
install_requires=install_requires,
tests_require= ['nose',],
test_suite='nose.collector',
scripts=[
"utils/tilde",
"utils/entry.py",
"utils/gui_server.py",
"utils/chk_tilde_install.py"
]
)