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


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

Re: PYTHONPATH with cmake build

From Andrey Rahmatullin <wrar@debian.org>
Newsgroups linux.debian.maint.python
Subject Re: PYTHONPATH with cmake build
Date 2022-08-30 16:40 +0200
Message-ID <F0azg-47Cd-5@gated-at.bofh.it> (permalink)
References <F0apz-47z4-1@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


[Multipart message — attachments visible in raw view] - view raw

On Tue, Aug 30, 2022 at 03:58:26PM +0200, PICCA Frederic-Emmanuel wrote:
> 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 ?
Does the same happen when you run the test in the source tree manually?

-- 
WBR, wRAR

Back to linux.debian.maint.python | Previous | Next — Previous in thread | 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