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


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

Re: PYTHONPATH with cmake build

From Stefano Rivera <stefanor@debian.org>
Newsgroups linux.debian.maint.python
Subject Re: PYTHONPATH with cmake build
Date 2022-08-31 00:20 +0200
Message-ID <F0hKp-4bVc-1@gated-at.bofh.it> (permalink)
References <F0apz-47z4-1@gated-at.bofh.it> <F0azg-47Cd-5@gated-at.bofh.it> <F0bOF-48hk-1@gated-at.bofh.it> <F0bOF-48hk-15@gated-at.bofh.it> <F0chI-48FT-1@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


Hi PICCA (2022.08.30_16:02:01_+0000)
>     cd build
>     cmake ../modules/dxtbx
>     cmake --build . --target install
>     pip install ../modules/dxtbx

This package essentially has 2 build systems, camke for the C++ stuff
and setuptools for the pure-python. I don't see any integration between
the two (which is quite annoying, the upstream really should fix that).

pybuild knows how to drive distutils, and knows how to drive cmake, but
not both together. Ideally, you do want to use pybuild when building
Python extensions, so you can do them for all supported Python versions.

So, can I suggest something like this?

#! /usr/bin/make -f

export PYBUILD_NAME=dxtbx
export PYBUILD_SYSTEM=distutils
export PYBUILD_AFTER_CONFIGURE=cmake -DPython_EXECUTABLE=/usr/bin/{interpreter} -S . -B {build_dir}/lib
export PYBUILD_AFTER_BUILD=make -C {build_dir}/lib
export PYBUILD_BEFORE_TEST=cp {build_dir}/lib/lib/*.so {build_dir}

%:
	dh $@ --with python3 --buildsystem=pybuild

You'll need something for the install too, but I didn't get that far, as
the tests fail (due to missing dependencies in Debian).

SR

-- 
Stefano Rivera
  http://tumbleweed.org.za/
  +1 415 683 3272

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