Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.debian.maint.python > #14021
| Path | csiph.com!newsfeed.xs4all.nl!newsfeed7.news.xs4all.nl!bofh.it!news.nic.it!robomod |
|---|---|
| From | Stefano Rivera <stefanor@debian.org> |
| Newsgroups | linux.debian.maint.python |
| Subject | sysconfig default scheme change in Python 3.10 |
| Date | Mon, 28 Mar 2022 23:20:01 +0200 |
| Message-ID | <E64Wl-4Rgs-1@gated-at.bofh.it> (permalink) |
| X-Original-To | debian-python@lists.debian.org |
| X-Mailbox-Line | From debian-python-request@lists.debian.org Mon Mar 28 21:17:56 2022 |
| Old-Return-Path | <stefano@rivera.za.net> |
| X-Amavis-Spam-Status | No, score=-107.671 tagged_above=-10000 required=5.3 tests=[BAYES_00=-2, DKIMWL_WL_HIGH=-0.831, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, HEADER_FROM_DIFFERENT_DOMAINS=0.249, LDO_WHITELIST=-5, MURPHY_DRUGS_REL8=0.02, T_SCC_BODY_TEXT_LINE=-0.01, USER_IN_DKIM_WELCOMELIST=0.001, USER_IN_DKIM_WHITELIST=-100] autolearn=ham autolearn_force=no |
| X-Policyd-Weight | using cached result; rate: -4.6 |
| X-Greylist | delayed 165796 seconds by postgrey-1.36 at bendel; Mon, 28 Mar 2022 21:17:42 UTC |
| Mail-Followup-To | debian-python@lists.debian.org |
| X-Gpg-Public-Key | http://www.rivera.za.net/stefano.gpg |
| MIME-Version | 1.0 |
| Content-Type | text/plain; charset=utf-8 |
| Content-Disposition | inline |
| User-Agent | NeoMutt/20201127 |
| X-Mailing-List | <debian-python@lists.debian.org> archive/latest/19843 |
| List-ID | <debian-python.lists.debian.org> |
| List-URL | <https://lists.debian.org/debian-python/> |
| List-Archive | https://lists.debian.org/msgid-search/20220328211740.mv22bpb5ua37aieg@satie.tumbleweed.org.za |
| Approved | robomod@news.nic.it |
| Lines | 70 |
| Organization | linux.* mail to news gateway |
| Sender | robomod@news.nic.it |
| X-Original-Date | Mon, 28 Mar 2022 21:17:40 +0000 |
| X-Original-Message-ID | <20220328211740.mv22bpb5ua37aieg@satie.tumbleweed.org.za> |
| Xref | csiph.com linux.debian.maint.python:14021 |
Show key headers only | View raw
I realise we made a consequential changes in Python 3.10, that was never
announced to the team. At the time, I didn't realise how consequential
it would be, but it has forced a few packages to change in response.
The change was in python3.10 3.10.2-3 (25 Feb 2022).
The default sysconfig change has changed from posix_prefix to
posix_local. This matches the long-existing behaviour in Debian's
distutils.sysconfig. distutils is being removed from Python's stdlib in
3.12 [PEP-632], so setuptools etc. are being migrated to be configured
by sysconfig instead.
The practical reason for this is to make "python3 setup.py install"
install to /usr/local/lib/... rather than into the generally
package-managed /usr/lib/python3/.
$ python3.10 -m sysconfig
...
Current installation scheme: "posix_local"
Paths:
data = "/usr/local"
include = "/usr/include/python3.10"
platinclude = "/usr/include/python3.10"
platlib = "/usr/local/lib/python3.10/dist-packages"
platstdlib = "/usr/lib/python3.10"
purelib = "/usr/local/lib/python3.10/dist-packages"
scripts = "/usr/local/bin"
stdlib = "/usr/lib/python3.10"
...
This has caused some changes for some Debian packages. Generally it can
be fixed at a build-tool level, and shouldn't break other Python
packages, but for non-standard tools that haven't been fixed yet, you
may notice that modules install into /usr/local instead of /usr.
dh_python3 will move modules from /usr/local back to /usr, but it's
called after dh_install, so dh_install configuration can get broken by
this change.
The solution in build tools is to explicitly select the posix_prefix
scheme, and specify the appropriate prefix (/usr or /usr/local). For
build tools that default to /usr/local, this should be all you need to
do.
We've fixed this issue in pybind11 and automake-1.16, so far.
If you find any more tools that need work, feel free to ask me to help.
There have been some tweaks to this, since 3.10.2-3, to reduce breakage.
One of the significant wants was to not prefix the include paths with
/local/, as they are defined as referencing the location of cPython's
headers, not the install location for headers [bpo-44445]. But some
build tools may have their own interpretations of this...
Related to this change is something else worth noting:
Because distutils is being removed, modern setuptools now carries its
own distutils fork, internally. This doesn't have Debian's patches
implementing these scheme differences. Instead, it's configured by the
presence of a _distutils_system_mod module, which monkey-patches
distutils.
[PEP-632]: https://peps.python.org/pep-0632/
[bpo-44445]: https://bugs.python.org/issue44445
SR
--
Stefano Rivera
http://tumbleweed.org.za/
+1 415 683 3272
Back to linux.debian.maint.python | Previous | Next — Next in thread | Find similar | Unroll thread
sysconfig default scheme change in Python 3.10 Stefano Rivera <stefanor@debian.org> - 2022-03-28 23:20 +0200
Re: sysconfig default scheme change in Python 3.10 Simon McVittie <smcv@debian.org> - 2022-03-28 23:50 +0200
Re: sysconfig default scheme change in Python 3.10 Stefano Rivera <stefanor@debian.org> - 2022-03-29 01:30 +0200
csiph-web