Path: csiph.com!weretis.net!feeder8.news.weretis.net!news.mixmin.net!aioe.org!bofh.it!news.nic.it!robomod From: Stefano Rivera Newsgroups: linux.debian.maint.python Subject: Re: PYTHONPATH with cmake build Date: Wed, 31 Aug 2022 00:20:01 +0200 Message-ID: References: X-Mailbox-Line: From debian-python-request@lists.debian.org Tue Aug 30 22:15:34 2022 Old-Return-Path: X-Amavis-Spam-Status: No, score=-106.871 tagged_above=-10000 required=5.3 tests=[BAYES_00=-2, DKIMWL_WL_HIGH=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, HEADER_FROM_DIFFERENT_DOMAINS=0.25, LDO_WHITELIST=-5, T_SCC_BODY_TEXT_LINE=-0.01, USER_IN_DKIM_WELCOMELIST=-0.01, USER_IN_DKIM_WHITELIST=-100] autolearn=ham autolearn_force=no X-Policyd-Weight: using cached result; rate: -4.6 Mail-Followup-To: debian-python@lists.debian.org X-Gpg-Public-Key: http://www.rivera.za.net/stefano.gpg MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline User-Agent: NeoMutt/20201127 X-Mailing-List: archive/latest/20252 List-ID: List-URL: List-Archive: https://lists.debian.org/msgid-search/20220830221516.dl5skl76birs27tw@satie.tumbleweed.org.za Approved: robomod@news.nic.it Lines: 36 Organization: linux.* mail to news gateway Sender: robomod@news.nic.it X-Original-Date: Tue, 30 Aug 2022 22:15:16 +0000 X-Original-Message-ID: <20220830221516.dl5skl76birs27tw@satie.tumbleweed.org.za> X-Original-References: <185024340.2308857.1661867906140.JavaMail.zimbra@synchrotron-soleil.fr> <1885471923.2393430.1661873161950.JavaMail.zimbra@synchrotron-soleil.fr> <62107125.2425333.1661875321047.JavaMail.zimbra@synchrotron-soleil.fr> Xref: csiph.com linux.debian.maint.python:14414 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