-
-
Notifications
You must be signed in to change notification settings - Fork 172
/
setup.py
85 lines (75 loc) · 2.78 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
import os
from skbuild import setup
def extra_cmake_args():
# FIXME: this doesn't seem to work if we supply more than one argument.
# I really am not sure why.
env = os.getenv('EXTRA_CMAKE_ARGS')
return env.split(';') if env else []
def wheel_args():
# Check if we are building wheels...
env = os.getenv('GITHUB_WORKFLOW')
args = [
'-DPYTHON_WHEEL_BUILD:BOOL=TRUE',
]
return args if env == 'Build Wheels' else []
cmake_args = [
'-DUSE_SPGLIB:BOOL=FALSE',
'-DUSE_OPENGL:BOOL=FALSE',
'-DUSE_QT:BOOL=FALSE',
'-DUSE_MMTF:BOOL=FALSE',
'-DUSE_PYTHON:BOOL=TRUE',
'-DUSE_HDF5:BOOL=FALSE',
'-DUSE_LIBARCHIVE:BOOL=FALSE',
'-DUSE_LIBMSYM:BOOL=FALSE',
'-DINSTALL_RUNTIME_DIR:PATH=avogadro',
'-DINSTALL_LIBRARY_DIR:PATH=avogadro',
'-DINSTALL_ARCHIVE_DIR:PATH=avogadro',
] + extra_cmake_args() + wheel_args()
# Add pybind11 if it is installed
try:
from pybind11 import get_cmake_dir
except ImportError:
pass
else:
cmake_args.append('-Dpybind11_DIR:PATH=' + get_cmake_dir())
with open('README.md') as f:
long_description = f.read()
setup(
name='avogadro',
use_scm_version=True,
setup_requires=['setuptools_scm'],
description='Avogadro provides analysis and data processing useful in computational chemistry, molecular modeling, bioinformatics, materials science, and related areas.',
long_description=long_description,
long_description_content_type="text/markdown",
author='Avogadro / OpenChemistry Developers',
license='BSD',
url='https://github.com/OpenChemistry/avogadrolibs',
project_urls={
'Documentation': 'https://two.avogadro.cc',
'Funding': 'https://github.com/sponsors/OpenChemistry',
'Source': 'https://github.com/OpenChemistry/avogadrolibs',
'Tracker': 'https://github.com/OpenChemistry/avogadrolibs/issues',
'Forum': 'https://discuss.avogadro.cc'
},
classifiers=[
'License :: OSI Approved :: BSD License',
'Programming Language :: Python',
'Programming Language :: C++',
'Development Status :: 4 - Beta',
'Development Status :: 5 - Production/Stable',
'Intended Audience :: Developers',
'Intended Audience :: Education',
'Intended Audience :: Science/Research',
'Topic :: Scientific/Engineering',
'Topic :: Scientific/Engineering :: Chemistry',
'Topic :: Scientific/Engineering :: Physics',
'Topic :: Scientific/Engineering :: Visualization',
'Topic :: Scientific/Engineering :: Information Analysis',
'Topic :: Software Development :: Libraries',
'Operating System :: Microsoft :: Windows',
'Operating System :: Unix',
'Operating System :: MacOS'
],
packages=['avogadro'],
cmake_args=cmake_args,
)