-
Notifications
You must be signed in to change notification settings - Fork 1
/
setup.py
66 lines (58 loc) · 2.02 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
# Copyright 2017 Andrey Sobolev, Tilde Materials Informatics (Berlin)
# This file is a part of quantum_esperanto project. The project is licensed under the MIT license.
# See the LICENSE file in the project root for license terms.
from setuptools import setup, Extension
from quantum_esperanto import __version__
# check if we have Cython available
try:
from Cython.Build import cythonize
use_cython = True
except ImportError:
use_cython = False
# vasp extension
sources = [
"src/fast_atoi.c",
"src/fast_atof.c"]
if use_cython:
sources.append("src/vasp.pyx")
else:
sources.append("src/vasp.c")
vasp_ext = Extension("quantum_esperanto.vasp",
include_dirs=['include'],
sources=sources)
if use_cython:
exts = cythonize([vasp_ext])
else:
exts = [vasp_ext]
with open("README.md", "r") as f:
long_description = f.read()
setup(
name='quantum_esperanto',
version=__version__,
author='Andrey Sobolev',
author_email="[email protected]",
url="https://github.com/tilde-lab/quantum_esperanto",
license='MIT',
description="A fast parser of XML files output by VASP DFT code written in Cython.",
long_description=long_description,
classifiers=[
'Development Status :: 3 - Alpha',
'Intended Audience :: Science/Research',
'Topic :: Scientific/Engineering :: Chemistry',
'Topic :: Scientific/Engineering :: Physics',
'License :: OSI Approved :: MIT License',
'Programming Language :: Python :: 2',
'Programming Language :: Python :: 2.7',
'Programming Language :: Python :: 3',
'Programming Language :: Python :: 3.3',
'Programming Language :: Python :: 3.4',
'Programming Language :: Python :: 3.5',
'Programming Language :: Python :: 3.6'
],
ext_modules=exts,
packages=['quantum_esperanto'],
install_requires=['numpy>=1.10', 'lxml'],
extras_require={'dev': ['Cython', 'nose']},
tests_require=['nose'],
test_suite='nose.collector'
)