aboutsummaryrefslogtreecommitdiffstats
path: root/configure.py
diff options
context:
space:
mode:
authorlloyd <[email protected]>2015-02-16 20:12:38 +0000
committerlloyd <[email protected]>2015-02-16 20:12:38 +0000
commit3b9a0c1535e40f8f9fc4cfbc734144ee229df65d (patch)
tree30c1d4363b4c85561204d26344f40de3e78f6d9d /configure.py
parent85caef829c9eeb7c224ad3b2e3ffbcfe981c2428 (diff)
Add new module `ffi` which provides a plain C interface, plus a new
ctypes Python wrapper that uses it. The API is intentionally designed to have a very simple ABI (extern "C", all structs are opaque, no memory ownership passing the FFI boundary, limited set of simple types as args) so the ctypes wrapper is quite simple. Currently ffi provides ciphers, hashes, MACs, RNGs, PBKDF, KDF, bcrypt, and most public key operations. Remove the old boost.python wrapper and all the build code for it.
Diffstat (limited to 'configure.py')
-rwxr-xr-xconfigure.py47
1 files changed, 12 insertions, 35 deletions
diff --git a/configure.py b/configure.py
index f0a589abd..0279361d8 100755
--- a/configure.py
+++ b/configure.py
@@ -51,6 +51,13 @@ def is_official_release():
# Assume a release date implies official release
return (botan_version.release_datestamp > 20130000)
+def maintainer_mode_default():
+ if is_official_release():
+ return False
+ if os.getenv('GO_ENVIRONMENT_NAME') == 'Botan':
+ return True # running under CI
+ return False
+
def get_vc_revision():
def get_vc_revision(cmdlist):
@@ -151,11 +158,8 @@ class BuildConfigurationInformation(object):
self.app_sources = list(find_sources_in(self.src_dir, 'cmd'))
self.test_sources = list(find_sources_in(self.src_dir, 'tests'))
- self.python_sources = list(find_sources_in(self.src_dir, 'python'))
- self.boost_python = options.boost_python
self.python_dir = os.path.join(options.src_dir, 'python')
- self.pyobject_dir = os.path.join(self.build_dir, 'python')
def build_doc_commands():
@@ -193,9 +197,6 @@ class BuildConfigurationInformation(object):
if options.with_doxygen:
yield os.path.join(self.doc_output_dir, 'doxygen')
- if self.boost_python:
- yield self.pyobject_dir
-
self.build_dirs = list(build_dirs())
def pkg_config_file(self):
@@ -284,7 +285,7 @@ def process_command_line(args):
help='disallow use of assembler')
build_group.add_option('--enable-debug', dest='debug_build',
- action='store_true', default=not is_official_release(),
+ action='store_true', default=False,
help='enable debug build (default %default)')
build_group.add_option('--disable-debug', dest='debug_build',
action='store_false', help=optparse.SUPPRESS_HELP)
@@ -343,8 +344,8 @@ def process_command_line(args):
build_group.add_option('--maintainer-mode', dest='maintainer_mode',
action='store_true',
- default=not is_official_release(),
- help="Enable extra warnings")
+ default=maintainer_mode_default(),
+ help="Maintainer mode build")
build_group.add_option('--release-mode', dest='maintainer_mode',
action='store_false',
@@ -356,19 +357,10 @@ def process_command_line(args):
wrapper_group = optparse.OptionGroup(parser, 'Python FFI options')
- wrapper_group.add_option('--with-boost-python', dest='boost_python',
- default=False, action='store_true',
- help='enable Boost.Python wrapper')
-
- wrapper_group.add_option('--without-boost-python',
- dest='boost_python',
- action='store_false',
- help=optparse.SUPPRESS_HELP)
-
wrapper_group.add_option('--with-python-version', dest='python_version',
metavar='N.M',
default='.'.join(map(str, sys.version_info[0:2])),
- help='specify Python to build against (eg %default)')
+ help='specify Python version (def %default)')
mods_group = optparse.OptionGroup(parser, 'Module selection')
@@ -1306,16 +1298,6 @@ def create_template_vars(build_config, options, modules, cc, arch, osinfo):
build_commands(build_config.test_sources,
build_config.testobj_dir, 'TEST')),
- 'python_obj_dir': build_config.pyobject_dir,
-
- 'python_objs': makefile_list(
- objectfile_list(build_config.python_sources,
- build_config.pyobject_dir)),
-
- 'python_build_cmds': '\n'.join(
- build_commands(build_config.python_sources,
- build_config.pyobject_dir, 'PYTHON')),
-
'ar_command': cc.ar_command or osinfo.ar_command,
'ranlib_command': osinfo.ranlib_command(),
'install_cmd_exec': osinfo.install_cmd_exec,
@@ -1345,11 +1327,6 @@ def create_template_vars(build_config, options, modules, cc, arch, osinfo):
else:
vars["dso_in"] = ""
- if options.boost_python:
- vars["python_in"] = process_template('src/build-data/makefile/python.in', vars)
- else:
- vars["python_in"] = ""
-
return vars
"""
@@ -1843,7 +1820,7 @@ def main(argv = None):
options = process_command_line(argv[1:])
def log_level():
- if options.verbose:
+ if options.verbose or options.maintainer_mode:
return logging.DEBUG
if options.quiet:
return logging.WARNING