forked from StochSS/GillesPy2
-
Notifications
You must be signed in to change notification settings - Fork 0
/
setup.py
70 lines (50 loc) · 1.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
from setuptools import setup
from setuptools.command.develop import develop
from setuptools.command.install import install
from setuptools.command.bdist_egg import bdist_egg
from setuptools.command.easy_install import easy_install
import subprocess
import os
SETUP_DIR = os.path.dirname(os.path.abspath(__file__))
def stoch_path(command_subclass):
"""
A decorator for classes subclassing one of the setuptools commands.
It modifies the run() method.
"""
orig_run = command_subclass.run
def modified_run(self):
success=False
orig_run(self)
command_subclass.run = modified_run
return command_subclass
# update all install classes with our new class
@stoch_path
class develop_new(develop):
pass
@stoch_path
class install_new(install):
pass
@stoch_path
class bdist_egg_new(bdist_egg):
pass
@stoch_path
class easy_install_new(easy_install):
pass
setup(name = "gillespy2",
version = "1.1",
packages = ['gillespy2'],
description = 'Python interface for Gillespie style biochemical simulations',
install_requires = ["numpy",
"matplotlib",
"scipy"],
author = "Brian Drawert, Kevin Sanft, Ghilman Brock, Eliot Dixon, Dalton Nickerson",
author_email = ["[email protected]"],
license = "GPL",
keywords = "gillespy2, gillespie algorithm, biochemical simulation",
url = "http://www.github.com/briandrawert/GillesPy2", # we don't really yet have one
download_url = "https://github.com/briandrawert/GillesPy2/tarball/master/",
cmdclass = {'bdist_egg':bdist_egg_new,
'install':install_new,
'develop':develop_new,
'easy_install':easy_install_new}
)