Re: Bug#679990: ITP: clipper -- object oriented development kit for crystallographic computing
> if the ABI is not stable we need to be sure that the upstream take
> care of the so name changed which come with ABI breakage. they need to
> read this [2].
OK I'm attaching a patch which could work. Basically upstream could set the
version in every single SConstruct script by setting the variable
"env_etc.shlibversion". If this is not set it sets to "0". So in my opinion it
comes very close to this what libtool does. Patch is not finished yet I need to
make it more global etc.
> if this is not the case, we can leave with private shared library.
> /usr/lib/cctbx look at here [1]. You can also google for debian rpath.
> if thoses shared library are only private.
In my opinion this is not a good idea. I don't want to loose the c++ interface
And I know some projects which are using the c++ class library. Otherwise I
could just go and statically link those libraries into the python extensions and
not deal with rpath.
> An option is to create a target in the rule file which generate the
> control file from the _config file as you propose, but this target
> should be called manualy so it can be double check the same idea was
> proposed here [4].
Good idea!
>
> it mean thaht we should propose python-xxx modules for each modules.
> maybe debtree[5] can help you and provide a nice picture of the
> packaging of cctbx and all its dependencies.
>
debtree looks nice I'll look into it.
--- a/cctbx_sources/libtbx/SConscript
+++ b/cctbx_sources/libtbx/SConscript
@@ -529,11 +529,37 @@
env_etc.extension_module_suffix = ".so"
env_base.Append(LIBSUFFIXES=[".dylib"])
else:
+ env_etc.shlibversion = ".0"
env_etc.shlibsuffix = ".so"
+ env_etc.shvsuffix = env_etc.shlibsuffix + env_etc.shlibversion
env_etc.extension_module_suffix = ".so"
+ env_base.Append(LIBSUFFIXES=[env_etc.shlibsuffix,env_etc.shvsuffix])
env_etc.libm = []
env_etc.libm.append("m")
if (env_etc.compiler in ["unix_gcc", "unix_gcc4"]):
+ import SCons.Action
+ import SCons.Defaults
+ def symlinkso(target, source, env):
+ for t in target:
+ path = t.abspath
+ if os.path.isfile(path):
+ linkpath = re.sub(r'(.+\.so)(\..*)',r'\1',path)
+ if path != linkpath:
+ os.symlink(path, linkpath)
+ LinkSO = SCons.Action.Action(symlinkso, None)
+ action_list = [ SCons.Defaults.SharedCheck,
+ SCons.Defaults.ShLinkAction,
+ LinkSO]
+ shared_lib = SCons.Builder.Builder(action = action_list,
+ SHLIBSUFFIX=env_etc.shvsuffix,
+ emitter = "$SHLIBEMITTER",
+ prefix = '$SHLIBPREFIX',
+ suffix = '$SHLIBSUFFIX',
+ SHLINKFLAGS='${SHLINKFLAGS}'+' -Wl,-soname=${TARGET.file}',
+ target_scanner = ProgramScanner,
+ src_suffix = '$SHOBJSUFFIX',
+ src_builder = 'SharedObject')
+ env_base['BUILDERS']['VersionedSharedLibrary'] = shared_lib
env_etc.static_libraries = 0
env_etc.static_bpl = 0
cc = env_etc.compiler.replace("unix_", "")
Reply to: