blob: 8919dd3f1a45ac77d387fcb2e42ea2d0b8a4107b (
plain)
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
|
#!/usr/bin/env python
###############################################################################
# Top contributors (to current version):
# Makai Mann
#
# This file is part of the cvc5 project.
#
# Copyright (c) 2009-2021 by the authors listed in the file AUTHORS
# in the top-level source directory and their institutional affiliations.
# All rights reserved. See the file COPYING in the top-level source
# directory for licensing information.
# #############################################################################
#
# This script is automatically configured with cmake when cvc5
# is built with --python-bindings. It is called during make
# install to automatically install the python bindings using
# distutils.
# If it is called from a python virtualenv, the bindings are
# installed in the virtualenv, otherwise, it respects the
# configured install prefix using the setup.py --prefix option
##
from distutils.core import setup
from distutils.command.clean import clean
from distutils.command.install import install
class PyCVC5Install(install):
# Calls the default run command, then deletes the build area
# (equivalent to "setup clean --all").
def run(self):
install.run(self)
c = clean(self.distribution)
c.all = True
c.finalize_options()
c.run()
setup(name='pycvc4',
version='${CVC5_MAJOR}.${CVC5_MINOR}.${CVC5_RELEASE}',
packages=['pycvc4'],
package_dir={'pycvc4': '${CMAKE_CURRENT_BINARY_DIR}/pycvc4'},
package_data={'pycvc4': ['pycvc4.so']},
cmdclass={'install': PyCVC5Install})
|