forked from debeshmandal/hydrogels
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsetup.py
62 lines (52 loc) · 1.84 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
import setuptools
from distutils.core import setup, Extension
from distutils import sysconfig
import os
import versioneer
with open("README.md", "r") as f:
long_description = f.read()
cpp_args = ['-std=c++11']#, '-stdlib=libc++']#, '-mmacosx-version-min=10.7']
class get_pybind_include(object):
"""Helper class to determine the pybind11 include path
The purpose of this class is to postpone importing pybind11
until it is actually installed, so that the ``get_include()``
method can be invoked. """
def __str__(self):
import pybind11
return pybind11.get_include()
potentials = Extension(
'potentials', sources = ['./hydrogels/theory/models/_cxx/potentials.cpp'],
include_dirs=[get_pybind_include(), './hydrogels/theory/models/_cxx/'],
language='c++',
extra_compile_args = cpp_args,
)
functions = Extension(
'functions', sources = ['./hydrogels/theory/models/_cxx/functions.cpp'],
include_dirs=[get_pybind_include(), './hydrogels/theory/models/_cxx/'],
language='c++',
extra_compile_args = cpp_args,
)
packages = []
for package in setuptools.find_packages():
if package.split('.')[0] == 'hydrogels':
packages.append(package)
print(packages)
setuptools.setup(
name="hydrogels",
author="Debesh Mandal",
description="Package for creating and analysing hydrogels in ReaDDy",
long_description=long_description,
long_description_content_type="text/markdown",
url="https://github.com/debeshmandal/hydrogels",
packages=packages,
classifiers=[
"Programming Language :: Python :: 3",
"License :: OSI Approved :: MIT License",
"Operating System :: POSIX",
],
python_requires=">=3.6",
ext_package='hydrogels',
ext_modules=[potentials, functions],
version=versioneer.get_version(),
cmdclass=versioneer.get_cmdclass(),
)