1

I am writing setup.py for my small python package, which is python wrapper on c++ tool, and it's depends on shared libraries like icu-uc, boost_program_options, and some custom ones. Python wrapper build with swig. I use Extension(libraries=[...]) to specify libraries to link.

My setup.py looks like this:

package_name = Extension(
    name='_package_name',
    sources=['some_souces.cpp',
            'some_swig_interfaces.i'
    ],
    swig_opts=['-c++'],
    libraries=['icuuc', ...],
)
setup(
    name='package_name',
    version='0.1.0',
        ....
    ext_modules=[package_name],
    py_modules=['package_name']
)

and I build this with python3 setup.py bdist_wheel

And when I build and install generated file locally it works fine, but when I truing to use pip3 install package_name.whl on computer with other version of icu-uc or other libraries it's crashes at runtime throwing ImportError: libicuuc.so.60: cannot open shared object file: No such file or directory. So basically my question is how to build more generic .whl package that don't stick to library version but looks for any match?

Dima Zhylko
  • 65
  • 2
  • 8

0 Answers0