-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathsetup.py
88 lines (76 loc) · 2.42 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
#!/usr/bin/env python
# Procedure for local instalation:
# conda create --name diatom # create new env
# conda activate diatom (or source activate diatom) # actvate env
# conda install numpy, scipy, matplotlib
# pip install pybind11
# python setup.py install
import os
try:
from setuptools import setup, Extension
except ImportError:
from distutils.core import setup
from distutils.extension import Extension
here = os.path.abspath(os.path.dirname(__file__))
readme = os.path.join(here, 'README.md')
class Get_Pybind11_Include_Dirs(object):
"""Returns a list of include directories for pybind11;
Ensure that pybind11 is installed before referencing it."""
def __str__(self):
import pybind11
return pybind11.get_include()
os.environ['CC'] = 'g++'
diatomic_ext1 = Extension(
"diatomic.identify",
sources=["diatomic/identify.cpp"],
extra_compile_args=['-O3', '-shared', '-std=c++11'],
include_dirs=[Get_Pybind11_Include_Dirs()]
)
diatomic_ext2 = Extension(
"diatomic.wavenumbers",
sources=["diatomic/wavenumbers.cpp"],
extra_compile_args=['-O3', '-shared', '-std=c++11'],
include_dirs=[Get_Pybind11_Include_Dirs()]
)
setup(
name='diatomic-computations',
version='v0.0.1',
description='Diatomic Molecules Computations',
long_description=open(readme, encoding='utf-8').read(),
long_description_content_type='text/markdown',
author='Ilvie Havalyova',
author_email='[email protected]',
python_requires='>=3.7.0',
url='https://github.com/ihavalyova/DiAtomic',
download_url='',
license='BSD3',
keywords=[
'physics',
'diatomic-molecule',
'coupled-channels',
'energy-levels',
'deperturbation',
],
packages=['diatomic'],
install_requires=[
'numpy>=1.16.0',
'scipy>=1.5.0',
'matplotlib>=3.2.0',
],
extras_require={
'iminuit': ['iminuit'],
'py3nj': ['py3nj']
},
package_data={
'diatomic': ['identify.cpp', 'wavenumbers.cpp']
},
include_package_data=True,
classifiers=[
"License :: OSI Approved :: BSD License",
"Programming Language :: Python :: 3.7",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
],
zip_safe=False,
ext_modules=[diatomic_ext1, diatomic_ext2],
)