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

- make friendly links

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@40619 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 5250759d
...@@ -4,5 +4,16 @@ def post_make_hook(options, buildout): ...@@ -4,5 +4,16 @@ def post_make_hook(options, buildout):
make_options_list = [q for q in options.get('make-options', '').split('\n') if q] make_options_list = [q for q in options.get('make-options', '').split('\n') if q]
if os.system('make %s -f Makefile-libbz2_so' % ' '.join(make_options_list)) != 0: if os.system('make %s -f Makefile-libbz2_so' % ' '.join(make_options_list)) != 0:
raise ValueError('Generation of dynamic library failed') raise ValueError('Generation of dynamic library failed')
for f in [q for q in os.listdir(os.curdir) if '.so' in q]: original = 'libbz2.so.1.0.6'
shutil.copyfile(f, os.path.join(options['location'], 'lib', f)) link_list = ['libbz2.so.1.0', 'libbz2.so.1', 'libbz2.so']
destination = os.path.join(options['location'], 'lib')
for filename in [original] + link_list:
f = os.path.join(destination, filename)
if os.path.exists(f) or os.path.islink(f):
os.unlink(f)
shutil.copyfile(os.path.join(os.curdir, original), os.path.join(destination,
original))
for link in link_list:
os.symlink(original, os.path.join(destination,
link))
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