-
Notifications
You must be signed in to change notification settings - Fork 0
/
setup.py
38 lines (34 loc) · 1.16 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
# System imports
from distutils.core import setup
import platform
import sys
from os.path import join as pjoin
# Version number
major = 1
minor = 0
scripts = [pjoin("scripts", "gotran2beat"),
pjoin("scripts", "gotran2dolfin"),
]
if platform.system() == "Windows" or "bdist_wininst" in sys.argv:
# In the Windows command prompt we can't execute Python scripts
# without a .py extension. A solution is to create batch files
# that runs the different scripts.
batch_files = []
for script in scripts:
batch_file = script + ".bat"
f = open(batch_file, "w")
f.write('python "%%~dp0\%s" %%*\n' % split(script)[1])
f.close()
batch_files.append(batch_file)
scripts.extend(batch_files)
setup(name = "cbcbeat",
version = "{0}.{1}".format(major, minor),
description = """
An adjoint-enabled framework for computational cardiac electrophysiology
""",
author = "M. E. Rognes, J. E. Hake, P. E. Farrell, S. W. Funke",
author_email = "[email protected]",
packages = ["cbcbeat", "cbcbeat.cellmodels",],
package_dir = {"cbcbeat": "cbcbeat"},
scripts = scripts,
)