[issue45992] distutils paths are scattered between PythonXY and PythonXY-32 on WoW64

2021-12-06 Thread Tzu-ping Chung

Tzu-ping Chung  added the comment:

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.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue45992] distutils paths are scattered between PythonXY and PythonXY-32 on WoW64

2021-12-06 Thread Steve Dower


Steve Dower  added the comment:

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.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue45992] distutils paths are scattered between PythonXY and PythonXY-32 on WoW64

2021-12-05 Thread Tzu-ping Chung

New submission from Tzu-ping Chung :

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
: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
dataC:\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
dataC:\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
dataC:\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?

--
components: Distutils, Windows
messages: 407769
nosy: dstufft, eric.araujo, paul.moore, steve.dower, tim.golden, uranusjr, 
zach.ware
priority: normal
severity: normal
status: open
title: distutils paths are scattered between PythonXY and PythonXY-32 on WoW64
versions: Python 3.10, Python 3.11

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com