On Thu, Jun 09, 2022 at 01:03:25PM +0500, Andrey Rahmatullin wrote: > [...] > > Well, the upstream wanted to compile two versions of the library, one > > for 64 bit architectures and one for 32 bit architectures. I don't > > really want to build two different arch libraries in a single build, > > because that seems very contrary to the way the Debian architectures > > work, and would also limit it to the amd64/i386 architectures for no > > obviously good reason. I had imagined that if there is some sort of > > multiarch setup, one might have the amd64 and i386 packages installed > > simultaneously, hence the need for different names. > The normal way for this is putting it into > /usr/lib/<triplet>/pkgname/foo.so, and according to the code below you'll > need the full path at the run time so you indeed need the triplet at both > build and run time. You can get the triplet in d/rules, not sure how > should you pass it to the build system as that depends on the build system > used. For the run time, https://wiki.debian.org/Python/MultiArch suggests > sys.implementation._multiarch (note that you cannot use it during the > build as that would break cross-compilation etc.), not sure if there are > better ways.
Thanks for your help! OK (and yes, it does require the full path at runtime). What triplet do I use in d/rules? dpkg-architecture offers 6 different ones: DEB_{BUILD,HOST,TARGET}_{GNU_TYPE,MULTIARCH}? I'm guessing DEB_TARGET_MULTIARCH, but I'm really not certain, so it would be great to confirm that. About the location, though: why do compiled Python libraries live in /usr/lib/python3/dist-packages/<pkgname> and not /usr/lib/<triplet>/<pkgname>? And is there a good reason not to do the same with this Python-package-specific library? It's not for general use, so I can't see why I shouldn't put it in the python3 directory with the other compiled Python module libraries. Best wishes, Julian