Issue45992
This issue tracker has been migrated to GitHub,
and is currently read-only.
For more information,
see the GitHub FAQs in the Python's Developer Guide.
Created on 2021-12-06 07:00 by uranusjr, last changed 2022-04-11 14:59 by admin.
Messages (3) | |||
---|---|---|---|
msg407769 - (view) | Author: Tzu-ping Chung (uranusjr) * | Date: 2021-12-06 07:00 | |
Should be reproducible with a 32-bit Python 3.10 running on 64-bit Windows. $ py -3.10-32 -q >>> from distutils.command.install import install <stdin>:1: DeprecationWarning: The distutils package is deprecated and slated for removal in Python 3.12. Use setuptools or check PEP 632 for potential alternatives >>> from distutils.dist import Distribution >>> c = install(Distribution()) >>> c.user = 1 >>> c.finalize_options() >>> for k in ('purelib', 'platlib', 'headers', 'scripts', 'data'): ... print(f'{k}\t{getattr(c, "install_" + k)}') ... purelib C:\Users\uranusjr\AppData\Roaming\Python\Python310-32\site-packages platlib C:\Users\uranusjr\AppData\Roaming\Python\Python310-32\site-packages headers C:\Users\uranusjr\AppData\Roaming\Python\Python310\Include\UNKNOWN scripts C:\Users\uranusjr\AppData\Roaming\Python\Python310\Scripts data C:\Users\uranusjr\AppData\Roaming\Python This is different from sysconfig, where all files are placed in the *-32 suffix: >>> import sysconfig >>> for k in ('purelib', 'platlib', 'include', 'scripts', 'data'): ... print(f'{k}\t{paths[k]}') ... purelib C:\Users\uranusjr\AppData\Roaming\Python\Python310-32\site-packages platlib C:\Users\uranusjr\AppData\Roaming\Python\Python310-32\site-packages include C:\Users\uranusjr\AppData\Roaming\Python\Python310-32\Include scripts C:\Users\uranusjr\AppData\Roaming\Python\Python310-32\Scripts data C:\Users\uranusjr\AppData\Roaming\Python And also different from Python 3.9 (and prior), which does not use the *-32 prefix: $ py -3.9-32 -q >>> from distutils.command.install import install >>> from distutils.dist import Distribution >>> c = install(Distribution()) >>> c.user = 1 >>> c.finalize_options() >>> for k in ('purelib', 'platlib', 'headers', 'scripts', 'data'): ... print(f'{k}\t{getattr(c, "install_" + k)}') ... purelib C:\Users\uranusjr\AppData\Roaming\Python\Python39\site-packages platlib C:\Users\uranusjr\AppData\Roaming\Python\Python39\site-packages headers C:\Users\uranusjr\AppData\Roaming\Python\Python39\Include\UNKNOWN scripts C:\Users\uranusjr\AppData\Roaming\Python\Python39\Scripts data C:\Users\uranusjr\AppData\Roaming\Python It’s of course not a problem to change the prefix and add the *-32 suffix on 3.10 (since the only thing that’s important is to have a consistent prefix for a given version), but the change should likely need to be applied consistently. I think we should fix distutils to match sysconfig? |
|||
msg407847 - (view) | Author: Steve Dower (steve.dower) * | Date: 2021-12-06 17:30 | |
They should all be under "-32" when in roaming appdata, because otherwise having 32-bit and 64-bit installs side-by-side will conflict. If these fields were newly added to distutils then should probably fix them to match sysconfig. If they're old and wrong, I'd just ignore them. |
|||
msg407850 - (view) | Author: Tzu-ping Chung (uranusjr) * | Date: 2021-12-06 17:49 | |
They are old, but so are purelib and platlib, which were changed regardless. The problem is that distutils’s values are now half wrong and half right, neither matching pre-3.10 behaviour, nor matching post-3.10 sysconfig behaviour. |
History | |||
---|---|---|---|
Date | User | Action | Args |
2022-04-11 14:59:53 | admin | set | github: 90150 |
2021-12-06 17:49:32 | uranusjr | set | messages: + msg407850 |
2021-12-06 17:30:40 | steve.dower | set | messages: + msg407847 |
2021-12-06 07:00:11 | uranusjr | create |