Commit a5747bd6 authored by Łukasz Nowak's avatar Łukasz Nowak

- build itools against locally provided software and use

   plone.recipe.command with uninstall ability by exposing location
 - add a test for itools proper installation


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@40266 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 193a35d4
......@@ -7,6 +7,7 @@ extends =
python-ldap-python.cfg
subversion.cfg
git.cfg
glib.cfg
parts =
itools-build
......@@ -36,19 +37,16 @@ md5sum = 12704cc354e2201e0921a832bf6b1556
destination = ${itools:source}
[itools-build]
recipe = collective.recipe.cmd
on_install = True
on_update = True
recipe = plone.recipe.command
# reference itools-download:destination instead of itools:source to trigger its
# execution
cmds =
command =
cd ${itools-download:destination}
env CFLAGS="$(pkg-config glib-2.0 --cflags-only-I)" ${python2.6:executable} setup.py install_lib -d ${itools:lib}
CFLAGS="-I${glib:location}/include/glib-2.0 -I${glib:location}/lib/glib-2.0/include" LDFLAGS="-L${glib:location}/lib -Wl,-rpath -Wl,${glib:location}/lib" ${python2.6:executable} setup.py install_lib -d ${itools:lib}
uninstall_cmds =
cd ${itools-download:destination}
${python2.6:executable} setup.py clean
rm -rf ${itools:lib}
update-command = ${:command}
location = ${itools:location}
stop-on-error = true
[mysql-python-env]
PATH =${software_definition:mysql_software}/bin:%(PATH)s
......
......@@ -427,5 +427,16 @@ class AssertApache(unittest.TestCase):
self.assertEqual([], failed_module_list,
'Apache modules not found:\n'+'\n'.join(failed_module_list))
class AssertItools(unittest.TestCase):
def test_ld_parserso(self):
elf_dict = readElfAsDict('parts/itools/lib/itools/xml/parser.so')
self.assertEqual(sorted(['libc', 'libglib-2.0', 'libpthread']),
elf_dict['library_list'])
soft_dir = os.path.join(os.path.abspath(os.curdir), 'parts')
expected_rpath_list = [os.path.join(soft_dir, software, 'lib') for
software in ['glib']]
self.assertEqual(sorted(expected_rpath_list), elf_dict['rpath_list'])
self.assertEqual(sorted(expected_rpath_list), elf_dict['runpath_list'])
if __name__ == '__main__':
unittest.main()
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment