Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.debian.maint.python > #13668
| From | Andrey Rahmatullin <wrar@debian.org> |
|---|---|
| Newsgroups | linux.debian.maint.python |
| Subject | Re: platform.machine() on salsa i386 build? |
| Date | 2021-10-30 20:50 +0200 |
| Message-ID | <De1Au-5Jz-1@gated-at.bofh.it> (permalink) |
| References | <DdVY6-22h-9@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
[Multipart message — attachments visible in raw view] - view raw
On Sat, Oct 30, 2021 at 02:20:40PM +0200, Ole Streicher wrote:
> I have a package (pyraf) where I need to switch off some tests for i386
> (but not for other 32-bit platforms). I do this by
>
> import platform
> is_i386 = platform.machine() in ('i386', 'i486', 'i586', 'i686')
Yup, this is incorrect. This is the same as `uname -m` and so returns the
kernel architecture.
If you want to do this purely at the upstream side without checking
DEB_HOST_ARCH, AFAIK there is no 100% reliable way to do this.
Please read
https://docs.python.org/3/library/platform.html#platform.architecture for
further ideas and caveats.
--
WBR, wRAR
Back to linux.debian.maint.python | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
platform.machine() on salsa i386 build? Ole Streicher <olebole@debian.org> - 2021-10-30 14:50 +0200
Re: platform.machine() on salsa i386 build? Andrey Rahmatullin <wrar@debian.org> - 2021-10-30 20:50 +0200
Re: platform.machine() on salsa i386 build? Thomas Goirand <zigo@debian.org> - 2021-10-31 02:20 +0200
Re: platform.machine() on salsa i386 build? Nilesh Patra <nilesh@nileshpatra.info> - 2021-10-30 21:30 +0200
Re: platform.machine() on salsa i386 build? Ole Streicher <olebole@debian.org> - 2021-10-30 23:40 +0200
Re: platform.machine() on salsa i386 build? Stefano Rivera <stefanor@debian.org> - 2021-10-30 21:50 +0200
csiph-web