Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.debian.maint.python > #14404

PYTHONPATH with cmake build

From PICCA Frederic-Emmanuel <frederic-emmanuel.picca@synchrotron-soleil.fr>
Newsgroups linux.debian.maint.python
Subject PYTHONPATH with cmake build
Date 2022-08-30 16:30 +0200
Message-ID <F0apz-47z4-1@gated-at.bofh.it> (permalink)
Organization linux.* mail to news gateway

Show all headers | View raw


Hello, I am packaging a python extension which use cmake as build system

here the repo

https://salsa.debian.org/science-team/dxtbx

I try to activate the test but this cause this kind of trouble

During handling of the above exception, another exception occurred:
/usr/lib/python3.10/importlib/__init__.py:126: in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
tests/serialize/test_xds.py:8: in <module>
    from dxtbx.imageset import ImageSetFactory
dxtbx/imageset.py:5: in <module>
    import dxtbx.format.image  # noqa: F401, import dependency for unpickling
dxtbx/format/image.py:8: in <module>
    from dxtbx_format_image_ext import *  # type: ignore # isort:skip # noqa: F403
E   ModuleNotFoundError: No module named 'dxtbx_format_image_ext'

Indeed the extension are build here.

cd /<<PKGBUILDDIR>>/obj-x86_64-linux-gnu/src/dxtbx && /usr/bin/cmake -E cmake_link_script CMakeFiles/dxtbx_flumpy.dir/link.txt --verbose=1
/usr/bin/c++ -fPIC -g -O2 -ffile-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -flto -Wl,-z,relro -shared  -o ../../lib/dxtbx_flumpy.cpython-310-x86_64-linux-gnu.so CMakeFiles/dxtbx_flumpy.dir/boost_python/flumpy.cc.o  /usr/lib/x86_64-linux-gnu/libboost_python310.so.1.74.0 
lto-wrapper: warning: using serial compilation of 4 LTRANS jobs
lto-wrapper: note: see the ‘-flto’ option documentation for more information
[ 90%] Linking CXX shared module ../../lib/dxtbx_format_image_ext.so

so I need to add the /<<PKGBUILDDIR>>/obj-x86_64-linux-gnu/lib directory to the PYTHONPATH.

do you know how to do this ?

thanks for your help

Fred

Back to linux.debian.maint.python | Previous | Next — Next in thread | Find similar | Unroll thread


Thread

PYTHONPATH with cmake build PICCA Frederic-Emmanuel <frederic-emmanuel.picca@synchrotron-soleil.fr> - 2022-08-30 16:30 +0200
  Re: PYTHONPATH with cmake build Andrey Rahmatullin <wrar@debian.org> - 2022-08-30 16:40 +0200
    Re: PYTHONPATH with cmake build PICCA Frederic-Emmanuel <frederic-emmanuel.picca@synchrotron-soleil.fr> - 2022-08-30 18:00 +0200
      Re: PYTHONPATH with cmake build Andrey Rahmatullin <wrar@debian.org> - 2022-08-30 18:00 +0200
        Re: PYTHONPATH with cmake build PICCA Frederic-Emmanuel <frederic-emmanuel.picca@synchrotron-soleil.fr> - 2022-08-30 18:30 +0200
          Re: PYTHONPATH with cmake build Andrey Rahmatullin <wrar@debian.org> - 2022-08-30 19:00 +0200
            Re: PYTHONPATH with cmake build PICCA Frederic-Emmanuel <frederic-emmanuel.picca@synchrotron-soleil.fr> - 2022-08-30 19:20 +0200
              Re: PYTHONPATH with cmake build Neil Williams <codehelp@debian.org> - 2022-08-30 20:10 +0200
            Re: PYTHONPATH with cmake build PICCA Frederic-Emmanuel <frederic-emmanuel.picca@synchrotron-soleil.fr> - 2022-08-30 19:30 +0200
          Re: PYTHONPATH with cmake build Stefano Rivera <stefanor@debian.org> - 2022-08-31 00:20 +0200
            Re: PYTHONPATH with cmake build PICCA Frederic-Emmanuel <frederic-emmanuel.picca@synchrotron-soleil.fr> - 2022-08-31 11:30 +0200
              Re: PYTHONPATH with cmake build stefanor@debian.org - 2022-08-31 11:40 +0200

csiph-web