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


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

Re: Build and run-time triplets

Path csiph.com!news.mixmin.net!aioe.org!bofh.it!news.nic.it!robomod
From Andrey Rahmatullin <wrar@debian.org>
Newsgroups linux.debian.maint.python
Subject Re: Build and run-time triplets
Date Thu, 09 Jun 2022 12:00:01 +0200
Message-ID <Ewn7j-3DAV-1@gated-at.bofh.it> (permalink)
References <EwbIR-3wrn-9@gated-at.bofh.it> <EwjQ5-3Bsn-7@gated-at.bofh.it> <Ewl5v-3Cb5-7@gated-at.bofh.it> <EwloR-3Cz8-5@gated-at.bofh.it> <Ewmbf-3CSM-3@gated-at.bofh.it>
X-Mailbox-Line From debian-python-request@lists.debian.org Thu Jun 9 09:58:47 2022
Old-Return-Path <wrar@debian.org>
X-Amavis-Spam-Status No, score=-11.91 tagged_above=-10000 required=5.3 tests=[BAYES_00=-2, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, FOURLA=0.1, LDO_WHITELIST=-5, PGPSIGNATURE=-5, T_SCC_BODY_TEXT_LINE=-0.01] autolearn=ham autolearn_force=no
X-Policyd-Weight using cached result; rate: -3.5
MIME-Version 1.0
Content-Type multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="XLsFw/xrDK46n040"
Content-Disposition inline
X-Mailing-List <debian-python@lists.debian.org> archive/latest/20003
List-ID <debian-python.lists.debian.org>
List-URL <https://lists.debian.org/debian-python/>
List-Archive https://lists.debian.org/msgid-search/YqHER/qUaz4l7Qdv@belkar.wrar.name
Approved robomod@news.nic.it
Lines 79
Organization linux.* mail to news gateway
Sender robomod@news.nic.it
X-Original-Date Thu, 9 Jun 2022 14:58:31 +0500
X-Original-Message-ID <YqHER/qUaz4l7Qdv@belkar.wrar.name>
X-Original-References <YqEYHQLYKvGFmSAa@d-and-j.net> <YqGR3t+65uPJGTxk@belkar.wrar.name> <YqGkZDt/2GKkJV1l@d-and-j.net> <YqGpTXvqVuCglMqB@belkar.wrar.name> <YqG1yvivv+THiRgu@d-and-j.net>
Xref csiph.com linux.debian.maint.python:14175

Show key headers only | View raw


[Multipart message — attachments visible in raw view] - view raw

On Thu, Jun 09, 2022 at 09:56:42AM +0100, Julian Gilbey 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.
It's always DEB_HOST_MULTIARCH. *_TARGET_* are for Canadian cross. See
TERMS in dpkg-architecture(1).

> About the location, though: why do compiled Python libraries live in
> /usr/lib/python3/dist-packages/<pkgname> and not
> /usr/lib/<triplet>/<pkgname>? 
That's where the import machinery expects them. They also have special
names.

> And is there a good reason not to do the same with this
> Python-package-specific library?
Yes, it's not Python-related.

> 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.
It's not a module.

-- 
WBR, wRAR

Back to linux.debian.maint.python | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

Build and run-time triplets Julian Gilbey <julian@d-and-j.net> - 2022-06-08 23:50 +0200
  Re: Build and run-time triplets Andrey Rahmatullin <wrar@debian.org> - 2022-06-09 08:30 +0200
    Re: Build and run-time triplets Julian Gilbey <julian@d-and-j.net> - 2022-06-09 09:50 +0200
      Re: Build and run-time triplets Andrey Rahmatullin <wrar@debian.org> - 2022-06-09 10:10 +0200
        Re: Build and run-time triplets Julian Gilbey <julian@d-and-j.net> - 2022-06-09 11:00 +0200
          Re: Build and run-time triplets Andrey Rahmatullin <wrar@debian.org> - 2022-06-09 12:00 +0200
          Re: Build and run-time triplets Simon McVittie <smcv@debian.org> - 2022-06-09 12:10 +0200
            Re: Build and run-time triplets Julian Gilbey <julian@d-and-j.net> - 2022-06-09 12:50 +0200
        Re: Build and run-time triplets Simon McVittie <smcv@debian.org> - 2022-06-09 11:30 +0200
          Re: Build and run-time triplets Julian Gilbey <julian@d-and-j.net> - 2022-06-09 11:50 +0200
            Re: Build and run-time triplets Andrey Rahmatullin <wrar@debian.org> - 2022-06-09 12:10 +0200
              Re: Build and run-time triplets Julian Gilbey <julian@d-and-j.net> - 2022-06-09 12:50 +0200
        Re: Build and run-time triplets Julian Gilbey <julian@d-and-j.net> - 2022-07-24 19:40 +0200
          Re: Build and run-time triplets Andrey Rahmatullin <wrar@debian.org> - 2022-07-24 20:50 +0200
            Re: Build and run-time triplets Julian Gilbey <julian@d-and-j.net> - 2022-07-24 21:30 +0200
          Re: Build and run-time triplets Andrey Rahmatullin <wrar@debian.org> - 2022-07-24 20:50 +0200
            Re: Build and run-time triplets Julian Gilbey <julian@d-and-j.net> - 2022-07-24 21:40 +0200
              Re: Build and run-time triplets Andrey Rahmatullin <wrar@debian.org> - 2022-07-24 21:50 +0200
                Re: Build and run-time triplets Julian Gilbey <julian@d-and-j.net> - 2022-07-24 23:10 +0200

csiph-web