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


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

Re: Build and run-time triplets

From Julian Gilbey <julian@d-and-j.net>
Newsgroups linux.debian.maint.python
Subject Re: Build and run-time triplets
Date 2022-06-09 12:50 +0200
Message-ID <EwnTH-3E7B-7@gated-at.bofh.it> (permalink)
References (1 earlier) <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> <EwngZ-3DUN-1@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On Thu, Jun 09, 2022 at 11:00:28AM +0100, Simon McVittie wrote:
> On Thu, 09 Jun 2022 at 09:56:42 +0100, Julian Gilbey wrote:
> > 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.
> 
> You'd want DEB_HOST_MULTIARCH here (or use ${LIB} as I mentioned in a
> previous message to this thread).
> [...]

Thanks for this great explanation - I'm learning so much in this
thread!

> > About the location, though: why do compiled Python libraries live in
> > /usr/lib/python3/dist-packages/<pkgname> and not
> > /usr/lib/<triplet>/<pkgname>?
> 
> The Python jargon for a native C/C++ library that can be loaded to
> provide a Python module is an *extension*.
> [...]

> > And is there a good reason not to do
> > the same with this Python-package-specific library?
> 
> If it isn't a Python extension (cannot be loaded into Python with
> "import foo" to provide a module API to Python code) then it would seem
> inappropriate to put it in the directory that is reserved for Python
> extensions.

I hear this argument, though we do find data files and other sorts of
things other than Python files and compiled extensions that are needed
by Python modules in that same directory ("data_files" in setup.py);
for example numpy has dozens of other files in
/usr/lib/python3/dist-packages/numpy.

I think the counter-argument is exactly what you said: as long as the
shared library is in a place where the code that uses it knows where
to locate it, all will work fine.  The Python code as-written expects
the library to be in the same directory as the Python code.

Best wishes,

   Julian

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