-
Notifications
You must be signed in to change notification settings - Fork 2
/
setup.py
51 lines (45 loc) · 1.44 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
try:
# Only do this with the development
from ez_setup import use_setuptools
use_setuptools()
except ImportError:
# ez_setup unneeded when packaged as an egg.
pass
from setuptools import setup, find_packages
from distutils.core import Extension
from distutils.cmd import Command
import distutils.command.build
import sys
import os
from os.path import join
ppath = lambda *p: p and join("..", *p) or ".."
include_dirs = [ppath(i) for i in ["interfaces", "", "sources", "CGRS"]]
library_dirs = [".."]
class test_cgrspy(distutils.command.build.build):
def run(self):
sys.path.insert(0, self.build_lib)
from cgrspy.tests import test_main
test_main.runTests()
user_options = []
setup(name="cgrspy",
version="1.1.1",
description="Python interface to the CellML Generics and Reflection "
"Service",
long_description=open("README.rst").read(),
author="Andrew Miller",
author_email="[email protected]",
url="http://cellml-api.sf.net/",
license='GPL/LGPL/MPL',
packages=find_packages(exclude=['ez_setup']),
cmdclass={
'test': test_cgrspy
},
ext_modules=[
Extension(
name="cgrspy.bootstrap",
sources=[join("cgrspy", "cgrspy_bootstrap.cpp")],
include_dirs=include_dirs,
library_dirs=library_dirs,
libraries=["cellml", "cgrs"])
]
)