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


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

PYTHONPATH with cmake build

Path csiph.com!news.mixmin.net!aioe.org!bofh.it!news.nic.it!robomod
From PICCA Frederic-Emmanuel <frederic-emmanuel.picca@synchrotron-soleil.fr>
Newsgroups linux.debian.maint.python
Subject PYTHONPATH with cmake build
Date Tue, 30 Aug 2022 16:30:01 +0200
Message-ID <F0apz-47z4-1@gated-at.bofh.it> (permalink)
X-Mailbox-Line From debian-python-request@lists.debian.org Tue Aug 30 14:24:13 2022
Old-Return-Path <frederic-emmanuel.picca@synchrotron-soleil.fr>
X-Amavis-Spam-Status No, score=0.009 tagged_above=-10000 required=5.3 tests=[BAYES_00=-2, FVGT_m_MULTI_ODD=0.02, RCVD_IN_MSPIKE_H2=-0.001, THREADTOPIC=2, T_SCC_BODY_TEXT_LINE=-0.01] autolearn=no autolearn_force=no
X-Policyd-Weight using cached result; rate: -5.5
X-Greylist delayed 450 seconds by postgrey-1.36 at bendel; Tue, 30 Aug 2022 14:06:18 UTC
MIME-Version 1.0
Content-Type text/plain; charset=utf-8
Content-Transfer-Encoding quoted-printable
X-Mailer Zimbra 8.8.15_GA_4272 (zclient/8.8.15_GA_4272)
Thread-Index g6+oDKZDJq1fXzsFm7SPOvKcM9OM6w==
Thread-Topic PYTHONPATH with cmake build
X-Renater-Ptge-Spamstate clean
X-Renater-Ptge-Spamcause gggruggvucftvghtrhhoucdtuddrgedvfedrvdekfedgjeduucetufdoteggodetrfdotffvucfrrhhofhhilhgvmecutffgpfetvffgtfenuceurghilhhouhhtmecufedttdenucenucfjughrpeffhffvkffugggtgffothesthhqtgdtredtjeenucfhrhhomheprffkveevtecuhfhrvgguvghrihgtqdfgmhhmrghnuhgvlhcuoehfrhgvuggvrhhitgdqvghmmhgrnhhuvghlrdhpihgttggrsehshihntghhrhhothhrohhnqdhsohhlvghilhdrfhhrqeenucggtffrrghtthgvrhhnpeekieeggeelkeeiudeikefgteektdduudfgkeegveeiffelvefhledtgfeitdeitdenucffohhmrghinhepuggvsghirghnrdhorhhgnecukfhppedutddrvdehgedrvdegtddrudegheenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepihhnvghtpedutddrvdehgedrvdegtddrudeghedphhgvlhhopeiishhtohhrvgdqsgefqddtuddvrdhprghrthgrghgvrdhrvghnrghtvghrrdhfrhdpmhgrihhlfhhrohhmpefrkfevveetucfhrhgvuggvrhhitgdqgfhmmhgrnhhuvghluceofhhrvgguvghrihgtqdgvmhhmrghnuhgvlhdrphhitggtrgesshihnhgthhhrohhtrhhonhdqshholhgvihhlrdhfrheqpdhnsggprhgtphhtthhopedupdhrtghpthhtohepuggvsghirghnqdhphihthhhonheslhhishhtshdruggvsghirghnrdhorhhg
X-Mailing-List <debian-python@lists.debian.org> archive/latest/20242
List-ID <debian-python.lists.debian.org>
List-URL <https://lists.debian.org/debian-python/>
List-Archive https://lists.debian.org/msgid-search/185024340.2308857.1661867906140.JavaMail.zimbra@synchrotron-soleil.fr
Approved robomod@news.nic.it
Lines 43
Organization linux.* mail to news gateway
Sender robomod@news.nic.it
X-Original-Date Tue, 30 Aug 2022 15:58:26 +0200 (CEST)
X-Original-Message-ID <185024340.2308857.1661867906140.JavaMail.zimbra@synchrotron-soleil.fr>
Xref csiph.com linux.debian.maint.python:14404

Show key headers only | 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