-
Notifications
You must be signed in to change notification settings - Fork 0
/
setup.py
executable file
·66 lines (57 loc) · 2.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
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
# -*- coding: utf-8 -*-
try:
from setuptools import setup
except ImportError:
from distutils.core import setup
import sys
import os
import re
import glob
version = re.findall('__version__ = "(.*)"',
open('defcon/__init__.py', 'r').read())[0]
packages = [
"defcon",
"defcon.cli",
"defcon.gui",
]
CLASSIFIERS = """
Development Status :: 2 - Pre-Alpha
Environment :: Console
Intended Audience :: Science/Research
License :: OSI Approved :: GNU Lesser General Public License v3 or later (LGPLv3+)
Programming Language :: Python
Programming Language :: C++
Topic :: Scientific/Engineering :: Mathematics
"""
classifiers = CLASSIFIERS.split('\n')[1:-1]
# TODO: This is cumbersome and prone to omit something
demofiles = glob.glob(os.path.join("examples", "*", "*.py"))
demofiles += glob.glob(os.path.join("examples", "*", "*", "*.py"))
demofiles += glob.glob(os.path.join("examples", "*", "*", "*.xml*"))
demofiles += glob.glob(os.path.join("examples", "*", "*", "*", "*.geo"))
demofiles += glob.glob(os.path.join("examples", "*", "*", "*", "*.xml*"))
# Don't bother user with test files
[demofiles.remove(f) for f in demofiles if "test_" in f]
if sys.version_info[0] == 2:
entry_points = {'console_scripts': ['defcon = defcon.__main__:main',
'defcon2 = defcon.__main__:main']}
else:
entry_points = {'console_scripts': ['defcon = defcon.__main__:main',
'defcon3 = defcon.__main__:main']}
setup(name="defcon",
version=version,
author="Patrick Farrell",
author_email="patrick.farrell@maths.ox.ac.uk",
url="http://bitbucket.com/pefarrell/defcon",
description="Deflated Continuation",
long_description="Deflated Continuation algorithm of "
"Farrell, Beentjes and Birkisson",
classifiers=classifiers,
license="GNU LGPL v3 or later",
packages=packages,
package_dir={"defcon": "defcon"},
package_data={"defcon": ["gui/resources/*.png"]},
data_files=[(os.path.join("share", "defcon", os.path.dirname(f)), [f])
for f in demofiles],
entry_points=entry_points,
)