Path: csiph.com!aioe.org!bofh.it!news.nic.it!robomod From: Scott Kitterman Newsgroups: linux.debian.maint.python Subject: Re: Best practice on how to package a python module along with a c++ program Date: Fri, 08 May 2020 16:20:01 +0200 Message-ID: References: X-Mailbox-Line: From debian-python-request@lists.debian.org Fri May 8 14:10:03 2020 Old-Return-Path: X-Amavis-Spam-Status: No, score=-12.2 tagged_above=-10000 required=5.3 tests=[BAYES_00=-2, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, LDO_WHITELIST=-5, PGPSIGNATURE=-5, RCVD_IN_DNSWL_NONE=-0.0001] autolearn=ham autolearn_force=no X-Policyd-Weight: using cached result; rate: -5.5 Dkim-Signature: v=1; a=ed25519-sha256; c=relaxed/simple; d=kitterman.com; i=@kitterman.com; q=dns/txt; s=201903e; t=1588946988; h=from : to : cc : subject : date : message-id : in-reply-to : references : mime-version : content-type : from; bh=h3xErQ9I+abOZuGUbSV4kLN1K+ftO97ncYTSOd8aWyE=; b=5EQLEoZhqMA1s0DN2CaU402jeow+ZLPY7/+WqErShVFRguDWN2XliSRhfhPK+QPT84lm4 /X20U48BPIV/wMHDw== Dkim-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kitterman.com; i=@kitterman.com; q=dns/txt; s=201903r; t=1588946988; h=from : to : cc : subject : date : message-id : in-reply-to : references : mime-version : content-type : from; bh=h3xErQ9I+abOZuGUbSV4kLN1K+ftO97ncYTSOd8aWyE=; b=IcauhTTQZubiUKDAKjVA08FjACJ+FsvORrv5U+M6dv+bTCzcqDOabnatAk6zf8xGu3AJO dAZBAW427H0EOb92GGrW7eUEkXvyrjBR5R1ijThIJkFav5oFfPTIzBxnMdcfXkbukWpqm8+ SczwCSuKmmZyE0B58yQHohS2DeKvUFoU0c8vRkIOjbsut6lnW67ooHpYnY2YoPU9eZMaeSg 1bQTEnE/b3eNChpQbi31qpjucAGe24fRH6pGdmcrbpX755fJxZRRlSoV7EfVamXGNaz8Qp4 i3odHUmYEFiiKea1aMScDAju31Ya1eizwLKHKGxAPyaOgtTxeivmylePcSIQ== MIME-Version: 1.0 Content-Type: multipart/signed; boundary="nextPart1686601.ABEL3z5rAE"; micalg="pgp-sha512"; protocol="application/pgp-signature" X-Mailing-List: archive/latest/18249 List-ID: List-URL: List-Archive: https://lists.debian.org/msgid-search/1982840.YYs7QWACbl@sk-desktop Approved: robomod@news.nic.it Lines: 58 Organization: linux.* mail to news gateway Sender: robomod@news.nic.it X-Original-Cc: debian-python@lists.debian.org X-Original-Date: Fri, 08 May 2020 10:09:43 -0400 X-Original-Message-ID: <1982840.YYs7QWACbl@sk-desktop> X-Original-References: <20200508105908.GG4188@t560.steinmann.cx> Xref: csiph.com linux.debian.maint.python:12561 --nextPart1686601.ABEL3z5rAE Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="UTF-8" On Friday, May 8, 2020 6:59:08 AM EDT Uwe Steinmann wrote: > Hi, >=20 > not sure if this is the right list, but it was my closes guess. >=20 > I'm packaging a c++ program (horizon-eda) which also contains a > python module written in c++. Upstream's Makefile has a target 'pymodule' > and 'make pymodule' creates horizon.so in the build directory. > According to upstream this has to be copied =D1=96nto python's sys.path >=20 > I thought about overriding dh_auto_build with >=20 > override_dh_auto_build: > make pymodule > dh_auto_build >=20 > which should at least build the module. But it still needs to be > installed at the right place. What would be the preferred way? =46irst, you don't specify, but assuming this is python3: The preferred mechanism would be to install the .so file into: usr/lib/python3.X/dist-packages/ (where X is the python3 version you are=20 building with) Then use dh_python3 and ${python3:Depends} to install it in the correct fin= al=20 location and generate appropriate Python interpreter dependencies. Scott K --nextPart1686601.ABEL3z5rAE Content-Type: application/pgp-signature; name="signature.asc" Content-Description: This is a digitally signed message part. Content-Transfer-Encoding: 7Bit -----BEGIN PGP SIGNATURE----- iQIzBAABCgAdFiEE53Kb/76FQA/u7iOxeNfe+5rVmvEFAl61aCgACgkQeNfe+5rV mvHFvw//WXvA63V7XUlrOhwrJBhogHMVttOMwa0hPTeXUZtKhaerjgQ/dVePMAfH B9KX98dXCpP6ijbTHRAmTONWm1XQRVN+m3aDR8107DpIxNzuEFMBDX9WCRhtvOik 7gPojgukDOuwLq1QbqHH+jOw1EZGX9RVIqM/jYpI6FAcYh2GhgYuUnvaVA6jyBPZ 9/IhktU6aUgh1X5nq1NhlI7qOGktP6W3spWrRQd70FGYmQH2fhrzr7qy1BhiALxl V2alxPd/RnQgmKlPJ7L9FAaSsGBYppMpBvbCniW/yUxAWqOE+8woty61bv6MzGsX hASdqpV00e2YnSf4AlScRMw/DSvM0N2w6R6K2TM/G4BZiqvpMy3keWRfuWv1/wjF 4JW4qaUYyZqRrlUhkKzbUe/vo02K1FVpnu32JBRbZq5V5WrnzVztaPGfCO7R6OPp KOZlRgvE9oWCgZGfuP8wpWhdlEB2tzmo3JkSckMRVD2Bt3b29goc7wjqNTRQgKW1 tzDmGMcNlHLgGOFTKxMtOy9g7UPhGCCkUWQZlIDwrhnYH2e3+hOI2K6XDrJIudi9 9y/ApgY4sHJ34XLv16bffv2MQED2V8kgSXGwTH4geEJVZkyCqjivSycYIxM9j+2R jR7CYHWdrrEOhq4er5mErYREFbLgyaG79f41ahReo2aiqppavsw= =LFGw -----END PGP SIGNATURE----- --nextPart1686601.ABEL3z5rAE--