aboutsummaryrefslogtreecommitdiffstats
path: root/configure.py
diff options
context:
space:
mode:
authorlloyd <[email protected]>2014-01-07 00:30:03 +0000
committerlloyd <[email protected]>2014-01-07 00:30:03 +0000
commit52d3fd79aac9decf6cb0ef617e7638abe7ebd053 (patch)
treecdc9079db267ff5eea72f609cbd82f9985c631bc /configure.py
parent76efeb142e5da153bd6d98939754f714a5ecd550 (diff)
Move python to src, add to main makefile
Diffstat (limited to 'configure.py')
-rwxr-xr-xconfigure.py34
1 files changed, 17 insertions, 17 deletions
diff --git a/configure.py b/configure.py
index b6ab6e814..0874220e4 100755
--- a/configure.py
+++ b/configure.py
@@ -135,25 +135,24 @@ class BuildConfigurationInformation(object):
self.public_headers = sorted(flatten([m.public_headers() for m in modules]))
- self.apps_dir = os.path.join(options.base_dir, 'src/')
+ self.apps_dir = os.path.join(options.base_dir, 'src')
- def find_sources_in(srcdir):
- for (dirpath, dirnames, filenames) in os.walk(srcdir):
- for filename in filenames:
- if filename.endswith('.cpp'):
- yield os.path.join(dirpath, filename)
+ def find_sources_in(basedir, srcdirs):
+ for srcdir in srcdirs:
+ for (dirpath, dirnames, filenames) in os.walk(os.path.join(basedir, srcdir)):
+ for filename in filenames:
+ if filename.endswith('.cpp'):
+ yield os.path.join(dirpath, filename)
+
+ self.app_sources = [os.path.join(self.apps_dir, 'main.cpp')] + \
+ list(find_sources_in(self.apps_dir, ['apps', 'tests']))
- self.app_sources = list(find_sources_in(self.apps_dir))
+ self.python_sources = list(find_sources_in(self.apps_dir, ['python']))
self.boost_python = options.boost_python
- self.python_dir = os.path.join(options.lib_dir, 'wrap', 'python')
+ self.python_dir = os.path.join(options.src_dir, 'python')
self.pyobject_dir = os.path.join(self.build_dir, 'python')
- self.python_sources = sorted(
- [os.path.join(self.python_dir, file)
- for file in os.listdir(self.python_dir)
- if file.endswith('.cpp')])
-
self.manual_dir = os.path.join(self. doc_output_dir, 'manual')
def build_doc_commands():
@@ -1125,7 +1124,7 @@ def create_template_vars(build_config, options, modules, cc, arch, osinfo):
logging.warn('Unknown arch in innosetup_arch %s' % (arch))
return None
- return {
+ vars = {
'version_major': build_config.version_major,
'version_minor': build_config.version_minor,
'version_patch': build_config.version_patch,
@@ -1245,6 +1244,10 @@ def create_template_vars(build_config, options, modules, cc, arch, osinfo):
'python_version': options.python_version
}
+ vars["python_makefile"] = process_template('src/build-data/makefile/python.in', vars)
+
+ return vars
+
"""
Determine which modules to load based on options, target, etc
"""
@@ -1511,9 +1514,6 @@ def setup_build(build_config, options, template_vars):
if options.os == 'windows':
yield (options.build_data, 'innosetup.in', 'botan.iss')
- if options.boost_python:
- yield (options.makefile_dir, 'python.in', 'Makefile.python')
-
for (template_dir, template, sink) in templates_to_use():
source = os.path.join(template_dir, template)
if template_dir == options.build_data: