1
+ import os
2
+ from setuptools import setup , find_packages
3
+
4
+ with open ('requirements.txt' ) as f :
5
+ required = f .read ().splitlines ()
6
+
7
+
8
+ reqs = []
9
+ for ir in required :
10
+ if ir [0 :3 ] == 'git' :
11
+ name = ir .split ('/' )[- 1 ]
12
+ reqs += ['%s @ %s@master' % (name , ir )]
13
+ else :
14
+ reqs += [ir ]
15
+
16
+
17
+ # If interested in benchmarking devito, we need the `examples` too
18
+ exclude = ['docs' , 'tests' ]
19
+ try :
20
+ if not bool (int (os .environ .get ('DEVITO_BENCHMARKS' , 0 ))):
21
+ exclude += ['examples' ]
22
+ except (TypeError , ValueError ):
23
+ exclude += ['examples' ]
24
+
25
+ setup (name = 'devito' ,
26
+ description = "Finite Difference Tutorials using Devito." ,
27
+ long_description = """The Devito Book is a set of tutorials adapted from
28
+ The Craft of Finite Difference Computing with Partial Differential Equations
29
+ by Hans Petter Langtangen and Svein Linge. These tutorials use Devito,
30
+ a new tool for performing optimised Finite Difference (FD) computation
31
+ from high-level symbolic problem definitions. Devito performs automated code
32
+ generation and Just-In-time (JIT) compilation based on symbolic
33
+ equations defined in SymPy to create and execute highly
34
+ optimised Finite Difference kernels on multiple computer
35
+ platforms.""" ,
36
+ url = 'http://www.devitoproject.org' ,
37
+ author = "Imperial College London" ,
38
+ author_email = 'g.gorman@imperial.ac.uk' ,
39
+ license = 'MIT' ,
40
+ packages = find_packages (exclude = exclude ),
41
+ install_requires = reqs ,
42
+ test_suite = 'tests' )
0 commit comments