Skip to content

Commit 330834c

Browse files
committed
Squashed 'externals/coda-oss/' changes from d372600..be445dd
be445dd Merge pull request #42 from porglezomp/master 5fd6e98 Ignore untarred driver folders 7614a42 io does not need to depend on unique since SafePath moved 0b266e2 Merge pull request #40 from mdaus/JavatoolUpdateForClasspaths 1e6cfee update to the logic in classpath section. I'm not sure there is a case when the user will want to specify a jar, and add it to the install_tgts. There was a bug with the former logic on Windows. 597dbc0 Merge pull request #39 from mdaus/disable_swig 26b8f93 Update jenkins.py 3b2ebc6 Merge pull request #38 from mdaus/python_install_update 55ba57e Fixed bugs a70d02f Merge pull request #33 from mdaus/python_install_update 5af30e4 removed dead code a347d58 better __init__.py handling code 7185d7c Merge branch 'master' of https://github.com/mdaus/coda-oss into python_install_update 07a94a8 Changes allowing windows support 5f22eb9 Merge pull request #35 from mdaus/install_swig_i_files b66a309 Installing Swig interface files too 636c544 Merge pull request #34 from mdaus/vector2_python 5db18e7 Adding Vector2 bindings 7bd834d Added option to override python install directory ced692f Fixed postfix bug in rpath logic 27e1b99 Started rpath addition 0ed7a98 Changed sys back to coda_sys, rm'd absolute_import 4b81dcb Added multi-package support 84c8c19 Merge branch 'master' of https://github.com/mdaus/coda-oss into python_install_update db994f4 initial commit for rewrite of python packaging 4c84f1f Merge pull request #30 from mdaus/Add_str_function_to_StringStream 965c670 Added str() function to io::StringStream Python bindings 32bcb81 Merge pull request #29 from mdaus/fix_windows_python 9228d0e Removing some unneeded items on the use lines a4c61b8 Some tricks to make Python bindings work properly on Windows - need to move the -python targets into targets_to_add to avoid some weirdness 655ef18 Merge pull request #27 from mdaus/jenkins-config d97a013 The template specializations need to be inlined if they're going to remain in a header file. Otherwise we'll get doubly defined linker errors. 11b63ec Update jenkins.py d5abf59 Update jenkins.py a67df1f Update jenkins.py 806e524 Update jenkins.py 0aea0b4 Update jenkins.py 7f4c01f Update jenkins.py 424a7bf Update jenkins.py d046b60 Update jenkins.py f7bdf0b Merge pull request #26 from mdaus/sio_lite_python_style_cleanup 6f317cd Adding angle and normSq() to checked-in generated bindings 1871dc6 Breaking dtype <--> SIO header type into their own functions to simplify implementation. 0063c70 Merge pull request #25 from mdaus/OneD_template_specializtion_for_Vector3 573ba86 Added template specializtions to math::poly::OneD<Vector3> ccff9be Using static_cast 607ad54 Merge pull request #23 from mdaus/Polygon2D b81fe60 Fixed bracing 3e825e7 Update wscript eba1b0c Delete test_intersection.cpp 398056b Delete test_poly_2d.cpp 6a59787 Delete Polygon2D.h 6585d4e Adding algoirthm library for std::min a0d6016 Merge pull request #24 from mdaus/rowcolint-revision 48a29b4 Correcting a templating issue with std::pow a58a737 Fixing an ambiguous call to std::pow fb8d2e5 Revert "initial commit of lapack fit.h, still very WIP and broken" 6bd818c Added types::RowCol<sys::SSize_T> and its vector to python bindings dbd37d9 Merge branch 'master' of https://github.com/mdaus/coda-oss into rowcolint-revision dcee071 initial commit of lapack fit.h, still very WIP and broken 78a187e Updated intersection f6003dd Merge branch 'master' of https://github.com/mdaus/coda-oss into Polygon2D ec3977a Need C++11 configure check to also include constexpr as VS 2013 doesn't support that 3b74405 There is no size_t std::pow() overloading be13656 Merge pull request #20 from mdaus/complex_benchmark 75fcca4 this should prevent the constants from being double defined, but since this version does not have c++11 support enabled, I am unable to check if it works properly. c0471f0 fixed the problem with str::toType, it is now being used again 060524e Added in comments to clarify code, added in liscense to top of test. Also ran it and made changes to get desired behavior. f5b062c Merge pull request #21 from mdaus/CPA-67_Fit_PolyVector3 fc260e6 Code review style cleanup 0c81abd Fixed according to comments. The MODULE_DEPS was left in the wscript because math/Constants.h now depends on sys/sys_config.h. atoi was kept in place of str::toType() as std::toType would not accept a c-string as an arguement when compiling 60494da Merge pull request #22 from mdaus/python_RowColSizeT 2865b82 Create test_intersection.cpp e3f4b0a Create test_poly_2d.cpp c78e153 Adjusted include guards 7f7f0ac Introduced Polygon2D abaf57a Adding algs to wscript for use of ConvexHull 3ca45a3 Added a template for RowCol<size_t> 018f987 Cleaned up fit functions 39bd6e2 added another benchmarking test, to see how accumulate performs. Also modified Constants.h and Constants.cpp to have c++11 support for constexpr if c++11 is available 3c23d99 Added in another benchmark that uses looping to accomplish its task. This produces different results 03edfe8 Merge pull request #13 from mdaus/math_additions_tests 1def5de made some changes to benchmark test for formatting of output 666f708 Added benchmark test for testing efficient ways to take the mean of a complex array of floats. Had to change wscript to make the math module include the sys module so that the stopwatch could be added. af2318d Placed unnamed namespace around content outside of main() 45a6bb3 Placed unnamed namespace around content outside of main c92627c Added hard coded tests 0c978f5 Merge pull request #19 from mdaus/Line2D fd8fa7a Updated parameter name in constructor 6d5c78f Updated parameter name in constructor 7c18a29 Added unnamed namespace to content outside of main(), adjusted some lines to be under 80 chars de41e5e Updated includes, corrected some lines going over 80 chars, removed unnecessary comments 2ac0248 Removed unnessecary includes, changed custom constructor to pass Point by const ref e10b206 Added fit() functions for CPA that return the PolyVector3 type, and tests 6d9d65c Removed algs from MODULE_DEPS--is not actually needed 6de571a Moved Line2D implementation to source file 0bdbb49 Responded to Adam's comments on first request merge pull a04d16b Added beginning copyright statement 9730e19 Fixing typos in comments fbf4ce2 Merge pull request #17 from mdaus/cpp11_switch 0781db0 Delete Polygon2D.h e4fea3d Added algs to module dependencies for Line2D.h 6c5dd70 An extensive test for Line2D.h functionality 2009277 Cleaned up some logic errors with throwing Exceptions 7220015 Tweaks and a more sensible way to check if a wscript is trying to force cpp11 8c36acc Merge pull request #16 from mdaus/463_sio.lite_write_for_noncontiguous_arrays 6d7b14f Merge pull request #18 from mdaus/win32_file_writer_64bit 29f0a35 Removed <size_t> from std::min 2b3339e bytesToWrite now is calculated against a size_t. 14d5ed4 Added a method to programatticly force c++11 usage if it exists a2227c3 Added '--enable-cpp11' to waf build options, fixed sys/wscript to ACTUALLY define if support exists e1e6f6e Added check for noncontiguous arrays in sio_lite.write(). Added test for writing noncontiguous arrays. ddcf3e7 Merge pull request #15 from mdaus/python_name_clobber_postfix 55eb923 Added functionality supporting a _base postfix on python modules (analogous to coda_ prefix) 69aba4c Created Polygon2D.h Skeleton 8e52984 Added copyright statement be30168 Created Line2D.h--not fully implemented functions yet 1f89331 Added types to nescessary modules 284ab7c Testing the new norm() and normSq() functions on VectorN objects 7afbb6a Testing the new norm() and normSq() functions on Vector objects 91aee7d Testing the new angle function for 3-dimensional Vector and VectorN db32af1 Merge pull request #12 from mdaus/Tests_for_logger_python_bindings 5aa311a Added bindings and test for FileHandler.h 9d712b3 More future-proof way of using the SWIG disown typemap to prevent double-deletion of Formatters 8835af2 Merge pull request #11 from mdaus/python_shared_linkage d95d7be Fixed bug with soname, typo 5d05437 Merge pull request #10 from mdaus/python_shared_linkage 1c695d2 fixed merge d5b0877 added changes from soname_crossplatform dcccda0 Actually added more logger bindings 702b460 Added Python tests for logging module bindings. Added bindings for Formatter.h, StandardFormatter.h, bindings for Formatter.h, StandardFormatter.h, StreamHandler.h, and LoggerFactory.h 8d52180 Win32 read now calculates bytesToRead with size_t 91089bf Win32 read now calculates bytesToRead with a size_t 31371c0 Merge pull request #8 from mdaus/math.linear_additions_up 53750f9 Fixing dot product error in angle function fb3962c Resolved dot product error in angle function de3b9bd false should be False 2257407 Rabble Rabble Rabble git-subtree-dir: externals/coda-oss git-subtree-split: be445dd68893aa159c9a9152a42ca42d432d62d1
1 parent b99e2d5 commit 330834c

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

64 files changed

+21704
-4555
lines changed

.gitignore

+21
Original file line numberDiff line numberDiff line change
@@ -2,3 +2,24 @@
22
*~
33
*.pyc
44

5+
# Build artifacts
6+
7+
target/
8+
9+
# Waf
10+
11+
.waf-*
12+
.lock-waf*
13+
14+
# Eclipse
15+
.project
16+
.cproject
17+
18+
# Drivers
19+
20+
modules/drivers/fftw/fftw-2.1.5/
21+
modules/drivers/jpeg/jpeg-9/
22+
modules/drivers/pcre/pcre-5.0/
23+
modules/drivers/uuid/e2fsprogs-1.40-uuid/
24+
modules/drivers/xml/xerces/xerces-c-3.1.1/
25+
modules/drivers/zlib/zlib-1.2.7/

build/build.py

+178-42
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,9 @@
77
from waflib.Configure import conf, ConfigurationContext
88
from waflib.Build import BuildContext, ListContext, CleanContext, InstallContext
99
from waflib.TaskGen import task_gen, feature, after, before
10+
from waflib.Task import Task
1011
from waflib.Utils import to_list as listify
12+
from waflib.Utils import h_file
1113
from waflib.Tools import waf_unit_test
1214
from waflib import Context, Errors
1315
from msvs import msvs_generator
@@ -452,14 +454,30 @@ def swigModule(self, **modArgs):
452454
name = modArgs['name']
453455
codename = name
454456

457+
package_name = Context.APPNAME
458+
try:
459+
package_name = modArgs['package']
460+
except:
461+
pass
462+
463+
# name for the task to generate our __init__.py file
464+
# (remember we need one in each package)
465+
init_tgen_name = 'python_init_file_' + package_name
466+
455467
prefix = env['prefix_' + name]
456468
if prefix:
457469
codename = prefix + name
458470

471+
postfix = env['postfix_' + name]
472+
if postfix:
473+
codename = codename + postfix
474+
459475
swigSource = os.path.join('source', name.replace('.', '_') + '.i')
476+
if env['install_headers']:
477+
self.install_files(os.path.join(env['install_includedir'], 'swig'), swigSource)
460478
target = '_' + codename.replace('.', '_')
461-
use = modArgs['use']
462-
installPath = os.path.join('${PYTHONDIR}', Context.APPNAME)
479+
use = modArgs['use'] + ' ' + init_tgen_name
480+
installPath = os.path.join(env['install_pydir'], package_name)
463481
taskName = name + '-python'
464482
exportIncludes = listify(modArgs.get('export_includes', 'source'))
465483

@@ -472,12 +490,41 @@ def swigModule(self, **modArgs):
472490
# it'll copy the file over to the installation directory for us.
473491
# We ensure this always runs via 'add_targets'
474492
copyFilesTarget = target + '_py'
475-
bld(features = 'py',
493+
bld(features = 'py',
476494
target = copyFilesTarget,
477495
env = env.derive(),
478496
install_path = installPath,
479497
source = bld.path.make_node('source').ant_glob('**/*.py'))
480498

499+
# this turns the folder at the destination path into a package
500+
501+
initTarget = init_tgen_name
502+
bld(features = 'python_package',
503+
name = initTarget,
504+
target='__init__.py',
505+
install_path = installPath)
506+
507+
targetsToAdd = [copyFilesTarget, initTarget]
508+
509+
# Tried to do this in process_swig_linkage() but it's too late
510+
# TODO: See if there's a cleaner way to do this
511+
# Basically, for Visual Studio if the -python targets are on the
512+
# use line, waf for some reason will not add in all the C++
513+
# dependencies that are needed, even if you put that C++ dependency
514+
# also explicitly on the use line. On Windows, we really logically
515+
# just want those to go on the targets_to_add line anyway.
516+
if env['COMPILER_CXX'] == 'msvc':
517+
updatedUse = []
518+
targetsToAdd = [copyFilesTarget]
519+
520+
for lib in use.split():
521+
if lib.endswith('-python'):
522+
targetsToAdd.append(lib)
523+
else:
524+
updatedUse.append(lib)
525+
526+
use = updatedUse
527+
481528
if 'SWIG' in env and env['SWIG']:
482529
# If Swig is available, let's use it to build the .cxx file
483530
# This gets generated into the source/generated folder and we'll
@@ -492,20 +539,20 @@ def swigModule(self, **modArgs):
492539
swig_flags = '-python -c++',
493540
install_path = installPath,
494541
name = taskName,
495-
targets_to_add = copyFilesTarget,
542+
targets_to_add = targetsToAdd,
496543
swig_install_fun = swigCopyGeneratedSources)
497544
else:
498545
# If Swig is not available, use the cxx file already sitting around
499546
# that Swig generated sometime in the past
500547
bld(features = 'cxx cshlib pyext add_targets swig_linkage includes',
501-
source = os.path.join('source', 'generated', codename.replace('.', '_') + '_wrap.cxx'),
502-
target = target,
503-
use = use,
504-
export_includes = exportIncludes,
505-
env = env.derive(),
506-
name = taskName,
507-
targets_to_add = copyFilesTarget,
508-
install_path = installPath)
548+
source = os.path.join('source', 'generated', codename.replace('.', '_') + '_wrap.cxx'),
549+
target = target,
550+
use = use,
551+
export_includes = exportIncludes,
552+
env = env.derive(),
553+
name = taskName,
554+
targets_to_add = targetsToAdd,
555+
install_path = installPath)
509556

510557
def getBuildDir(self, path=None):
511558
"""
@@ -687,6 +734,8 @@ def options(opt):
687734
default=False, help='Treat compiler warnings as errors')
688735
opt.add_option('--enable-debugging', action='store_true', dest='debugging',
689736
help='Enable debugging')
737+
opt.add_option('--enable-cpp11', action='store_true', default=False, dest='enablecpp11',
738+
help='Enable C++11 features')
690739
#TODO - get rid of enable64 - it's useless now
691740
opt.add_option('--enable-64bit', action='store_true', dest='enable64',
692741
help='Enable 64bit builds')
@@ -724,6 +773,8 @@ def options(opt):
724773
help='Override installation bin directory')
725774
opt.add_option('--sharedir', action='store', nargs=1, dest='sharedir',
726775
help='Override installation share directory')
776+
opt.add_option('--pydir', action='store', nargs=1, dest='pydir',
777+
help='Override installation python directory')
727778
opt.add_option('--install-source', action='store_true', dest='install_source', default=False,
728779
help='Distribute source into the installation area (for delivering source)')
729780
opt.add_option('--with-prebuilt-config', action='store', dest='prebuilt_config',
@@ -814,7 +865,7 @@ def configureCompilerOptions(self):
814865
config['cxx']['optz_fastest'] = '-O3'
815866

816867
gxxCompileFlags='-fPIC'
817-
if cxxCompiler == 'g++' and gccHasCpp11():
868+
if cxxCompiler == 'g++' and self.env['cpp11support'] and gccHasCpp11():
818869
gxxCompileFlags+=' -std=c++11'
819870

820871
self.env.append_value('CXXFLAGS', gxxCompileFlags.split())
@@ -1102,7 +1153,7 @@ def configure(self):
11021153

11031154
if self.env['DETECTED_BUILD_PY']:
11041155
return
1105-
1156+
11061157
sys_platform = getPlatform(default=Options.platform)
11071158
winRegex = r'win32'
11081159

@@ -1182,7 +1233,9 @@ def wrap_cmd_and_log(*k, **kw):
11821233
env.append_unique('LINKFLAGS', Options.options.linkflags.split())
11831234
if Options.options._defs:
11841235
env.append_unique('DEFINES', Options.options._defs.split(','))
1185-
1236+
#if its already defined in a wscript, don't touch.
1237+
if not env['cpp11support']:
1238+
env['cpp11support'] = Options.options.enablecpp11
11861239
configureCompilerOptions(self)
11871240

11881241
env['PLATFORM'] = sys_platform
@@ -1197,6 +1250,7 @@ def wrap_cmd_and_log(*k, **kw):
11971250
env['install_libdir'] = Options.options.libdir if Options.options.libdir else join(Options.options.prefix, 'lib')
11981251
env['install_bindir'] = Options.options.bindir if Options.options.bindir else join(Options.options.prefix, 'bin')
11991252
env['install_sharedir'] = Options.options.sharedir if Options.options.sharedir else join(Options.options.prefix, 'share')
1253+
env['install_pydir'] = Options.options.pydir if Options.options.pydir else '${PYTHONDIR}'
12001254

12011255
# Swig memory leak output
12021256
if Options.options.swig_silent_leak:
@@ -1222,8 +1276,10 @@ def wrap_cmd_and_log(*k, **kw):
12221276
@TaskGen.after_method('process_use')
12231277
def process_swig_linkage(tsk):
12241278

1279+
# first we need to setup some platform specific
1280+
# options for specifying soname and passing linker
1281+
# flags
12251282
solarisRegex = r'sparc-sun.*|i.86-pc-solaris.*|sunos'
1226-
12271283
platform = getPlatform(default=Options.platform)
12281284
compiler = tsk.env['COMPILER_CXX']
12291285
if compiler == 'msvc':
@@ -1232,51 +1288,131 @@ def process_swig_linkage(tsk):
12321288
# Not sure if cygwin/mingw does or not...
12331289
return
12341290

1235-
incstr = ''
1236-
for nod in tsk.includes:
1237-
incstr += ' -I' + nod.abspath()
1238-
if hasattr(tsk,'swig_flags'):
1239-
tsk.swig_flags = tsk.swig_flags + incstr
1240-
12411291
# TODO: Here we're using -Wl,_foo.so since if you just use -l_foo the linker
12421292
# assumes there's a 'lib' prefix in the filename which we don't have
12431293
# here. Instead, according to the ld man page, may be able to prepend
1244-
# a colon and do this instead: -l:_foo.so
1294+
# a colon and do this instead: -l:_foo.so (not sure if this works with
1295+
# ld version <= 2.17)
12451296
libpattern = tsk.env['cshlib_PATTERN']
12461297
linkarg_pattern = '-Wl,%s'
1298+
rpath_pattern = '-Wl,-rpath=%s'
12471299
if re.match(solarisRegex,platform) and compiler != 'g++' and compiler != 'icpc':
1248-
linkarg_pattern = '%s'
1300+
linkarg_pattern = '%s'
1301+
rpath_pattern = '-Rpath%s'
1302+
1303+
# so swig can find .i files to import
1304+
incstr = ''
1305+
for nod in tsk.includes:
1306+
incstr += ' -I' + nod.abspath()
1307+
if hasattr(tsk,'swig_flags'):
1308+
tsk.swig_flags = tsk.swig_flags + incstr
12491309

1310+
# Search for python libraries and
1311+
# add the target files explicitly as command line parameters for linking
1312+
package_list = []
12501313
newlib = []
12511314
for lib in tsk.env.LIB:
1315+
1316+
# get our library name so we
1317+
# can extract it's path from LIBPATH
1318+
# libname is the filename we'll be linking to
1319+
# searchstr is the module name
12521320
if lib.startswith('_coda_'):
12531321
libname = libpattern % lib
12541322
searchstr = lib[6:].replace('_','.')
1255-
libpath = ''
1256-
for libdir in tsk.env.LIBPATH:
1257-
if libdir.endswith(searchstr):
1258-
libpath = libdir
1259-
libpath = os.path.join(str(libpath), libname)
1260-
tsk.env.LINKFLAGS.append(libpath)
12611323
elif lib.startswith('_'):
12621324
libname = lib + '.so'
12631325
searchstr = lib[1:].replace('_','.')
1264-
for libdir in tsk.env.LIBPATH:
1265-
if libdir.endswith(searchstr):
1266-
libpath = libdir
1267-
libpath = os.path.join(str(libpath), libname)
1268-
tsk.env.LINKFLAGS.append(libpath)
12691326
else:
1327+
# this isnt a python library, ignore it
12701328
newlib.append(lib)
1271-
1272-
# Solaris Studio is a special case and their compiler has an option
1273-
# for giving a shared object a name, rather than letting us pass
1274-
# in options to the linker like gcc and icc
1275-
1276-
soname_str = linkarg_pattern % ('-h ' + (libpattern % tsk.target))
1329+
continue
1330+
1331+
if searchstr.endswith(".base"):
1332+
searchstr = searchstr[:-5]
1333+
1334+
dep_path = os.path.basename(tsk.bld.get_tgen_by_name(searchstr + '-python').install_path)
1335+
package_list.append(dep_path)
1336+
1337+
# Python wrappers have the same module name as their associated
1338+
# C++ modules so if waf is configured with --shared searching through
1339+
# LIBPATH for our module name is not sufficient to find the *python* module
1340+
# TODO: find some way to tell the C++ and python shared libs apart without
1341+
# forcing our python modules to be in a folder called 'python'
1342+
searchstr = os.path.join('python',searchstr)
1343+
1344+
# search for a module with a matching name
1345+
libpath = ''
1346+
for libdir in tsk.env.LIBPATH:
1347+
if libdir.endswith(searchstr):
1348+
libpath = libdir
1349+
libpath = os.path.join(str(libpath), libname)
1350+
1351+
# finally add the path to the referenced python library
1352+
tsk.env.LINKFLAGS.append(libpath)
1353+
1354+
# We need to explicitly set our soname otherwise modules that
1355+
# link to *us* in the above fashion will not be able to do it
1356+
# without the same path
1357+
# (ie python dependencies at runtime after installation)
1358+
# TODO use of the -h option changes slightly sometime after ld 2.17
1359+
# would be a good idea to verify that this will work with later
1360+
# versions
1361+
soname_str = linkarg_pattern % ('-h' + (libpattern % tsk.target))
12771362
tsk.env.LINKFLAGS.append(soname_str)
1363+
1364+
# finally, we want to bake the library search paths straight in to
1365+
# our python extensions so we don't need to set an LD_LIBRARY_PATH
1366+
package_set = set(package_list)
1367+
base_path = os.path.join(':${ORIGIN}', '..')
1368+
dirlist = ''.join(str(os.path.join(base_path,s)) for s in package_set)
1369+
if dirlist:
1370+
rpath_str = rpath_pattern % (dirlist)
1371+
tsk.env.LINKFLAGS.append(rpath_str)
1372+
1373+
# newlib is now a list of our non-python libraries
12781374
tsk.env.LIB = newlib
12791375

1376+
1377+
1378+
#
1379+
# This task generator creates tasks that install an __init__.py
1380+
# for our python packages. Right now all it does it create an
1381+
# empty __init__.py in the install directory but if we decide
1382+
# to go farther with our python bindings (ie, we have more than a
1383+
# couple packages or need to actually put stuff in the __init__.py)
1384+
# they will go here
1385+
#
1386+
1387+
@task_gen
1388+
@feature('python_package')
1389+
def python_package(tg):
1390+
1391+
# setup some paths
1392+
# we'll create our __init__.py right in our build directory
1393+
install_path = tg.install_path
1394+
pkg_name = os.path.join('packages', os.path.basename(install_path))
1395+
install_path = install_path.replace('${PYTHONDIR}',tg.env.PYTHONDIR)
1396+
dirname = os.path.join(tg.bld.bldnode.abspath(), pkg_name)
1397+
fname = os.path.join(tg.bld.bldnode.abspath(), pkg_name, tg.target)
1398+
1399+
if not os.path.exists(dirname):
1400+
os.makedirs(dirname)
1401+
1402+
# append to file or create
1403+
if not os.path.isfile(fname):
1404+
open(fname,'a').close()
1405+
1406+
# to install files the 'node' associated with the file
1407+
# needs to have a signature; the hash of the file is
1408+
# good enough for us.
1409+
relpath = os.path.join(pkg_name, tg.target)
1410+
nod = tg.bld.bldnode.make_node(relpath)
1411+
nod.sig = h_file(fname)
1412+
1413+
# schedule the file for installation
1414+
tg.bld.install_files(install_path,nod)
1415+
12801416
@task_gen
12811417
@feature('untar')
12821418
def untar(tsk):
@@ -1505,7 +1641,7 @@ def gccHasCpp11():
15051641
output = subprocess.check_output("g++ --help=c++", stderr=subprocess.STDOUT, shell=True)
15061642
except subprocess.CalledProcessError:
15071643
#If gcc is too old for --help=, then it is too old for C++11
1508-
return false
1644+
return False
15091645
for line in output.split('\n'):
15101646
if re.search(r'-std=c\+\+11', line):
15111647
return True

build/javatool.py

+5-4
Original file line numberDiff line numberDiff line change
@@ -162,12 +162,13 @@ def java_module(bld, **modArgs):
162162
classpathDirs += [bld.path.find_dir(os.path.relpath(bld.env['JARS_DIR'], bld.path.find_dir('.').abspath()))]
163163

164164
for cp in classpath:
165-
for dir in classpathDirs:
166-
if dir is not None and os.path.exists(join(dir.abspath(), cp)):
167-
real_classpath.append(join(dir.abspath(), cp))
168-
cp_targets.append(bld(name=cp, features='install_tgt', install_path=libInstallPath or '${PREFIX}/lib', dir=dir, files=[cp]))
169165
if os.path.exists(cp):
170166
real_classpath.append(cp)
167+
else :
168+
for dir in classpathDirs:
169+
if dir is not None and os.path.exists(join(dir.abspath(), cp)):
170+
real_classpath.append(join(dir.abspath(), cp))
171+
cp_targets.append(bld(name=cp, features='install_tgt', install_path=libInstallPath or '${PREFIX}/lib', dir=dir, files=[cp]))
171172

172173
# We need a try/catch here for the rare case where we have javac but
173174
# not JNI, we're a module that doesn't depend on JNI, but we depend on

0 commit comments

Comments
 (0)