-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathsetup.py
88 lines (73 loc) · 2.38 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
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
from distutils.core import setup
from setuptools.command.develop import develop
from setuptools.command.install import install
from setuptools.command.test import test
from wheel import bdist_wheel
import sys
import re
if sys.version_info[0] == 2:
sys.exit("Sorry, Python 2 is not supported.")
def obtain_version():
"""
Obtains the version as specified in prophesy.
:return: Version of prophesy.
"""
verstr = "unknown"
try:
verstrline = open('dynasty/_version.py', "rt").read()
except EnvironmentError:
pass # Okay, there is no version file.
else:
VSRE = r"^__version__ = ['\"]([^'\"]*)['\"]"
mo = re.search(VSRE, verstrline, re.M)
if mo:
verstr = mo.group(1)
else:
raise RuntimeError("unable to find version in dynasty/_version.py")
return verstr
class ConfigDevelop(develop):
"""
Custom command to write the config files after installation
"""
user_options = develop.user_options
def initialize_options(self):
develop.initialize_options(self)
def finalize_options(self):
develop.finalize_options(self)
def run(self):
develop.run(self)
class ConfigInstall(install):
"""
Custom command to write the config files after installation
"""
user_options = install.user_options
def initialize_options(self):
install.initialize_options(self)
def finalize_options(self):
install.finalize_options(self)
def run(self):
install.run(self)
setup(
name="Dynasty",
version=obtain_version(),
author="Sebastian Junges",
author_email="sebastian.junges@cs.rwth-aachen.de",
maintainer="Sebastian Junges",
maintainer_email="sebastian.junges@cs.rwth-aachen.de",
license="GPLv3",
url="https://github.com/moves-rwth/sketching",
description="Dynasty: probabilistic program sketches with PCTL formulae",
long_description="Dynasty is a prototype implementation for synthesis in probabilistic program sketches and PCTL formulae",
packages=["dynasty", "dynasty.cegis", "dynasty.family_checkers", "dynasty.jani", "dynasty.model_handling"],
install_requires=[ 'click', 'stormpy', 'z3-solver'],
extras_require={},
package_data={
'dynasty': [],
},
scripts=[
'dynasty.py'],
cmdclass={
'develop': ConfigDevelop,
'install': ConfigInstall,
}
)