-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathsetup.py
68 lines (62 loc) · 2.11 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
from setuptools import setup, Extension
def get_pybind_include():
"""Helper class to determine the pybind11 include path
The purpose of this class is to postpone importing pybind11
until it is actually installed, so that the ``get_include()``
method can be invoked. """
import pybind11
yield pybind11.get_include()
ext_modules = [
Extension(
'veripb.optimized.pybindings',
['veripb/optimized/pybindings.cpp',
'veripb/optimized/constraints.cpp',
'veripb/optimized/parsing.cpp'],
depends=[
'veripb/optimized/constraints.hpp',
'veripb/optimized/BigInt.hpp',
],
include_dirs=
# Path to pybind11 headers
get_pybind_include(),
extra_compile_args=['--std=c++17', '-DPY_BINDINGS'],
libraries=['gmp', 'gmpxx'],
language='c++'
),
Extension('veripb.verifier', sources=['veripb/verifier.py']),
Extension('veripb.rules', sources=['veripb/rules.py']),
Extension('veripb.rules_dominance', sources=['veripb/rules_dominance.py']),
Extension('veripb.parser', sources=['veripb/parser.py']),
Extension('veripb.autoproving', sources=['veripb/autoproving.py']),
Extension('veripb.constraints', sources=['veripb/constraints.py']),
Extension('veripb.rules_multigoal', sources=['veripb/rules_multigoal.py']),
]
for e in ext_modules:
e.cython_directives = {'language_level': "3"} #all are Python-3
setup(
name='veripb',
version='0.3a0',
description='Tool for verifying refutations.',
url='http://github.com/StephanGocht/veripb',
author='Stephan Gocht',
author_email='[email protected]',
license='MIT',
packages=['veripb', 'veripb.optimized'],
setup_requires=[
# Setuptools 18.0 properly handles Cython extensions.
'setuptools>=18.0',
'cython',
'pybind11'
],
install_requires=[
'cython',
# 'pyximport', part of cython, no extra pacage exists
'pybind11'
],
entry_points={
'console_scripts': [
'veripb=veripb:run_cmd_main',
]
},
ext_modules = ext_modules
)