Rocksolid Light

Welcome to novaBBS (click a section below)

mail  files  register  newsreader  groups  login

Message-ID:  

Warp 7 -- It's a law we can live with.


devel / comp.lang.python / Re: Compiling python on windows with vs

SubjectAuthor
o Re: Compiling python on windows with vsEryk Sun

1
Re: Compiling python on windows with vs

<mailman.106.1686846950.23016.python-list@python.org>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=23612&group=comp.lang.python#23612

  copy link   Newsgroups: comp.lang.python
Path: i2pn2.org!i2pn.org!news.swapon.de!fu-berlin.de!uni-berlin.de!not-for-mail
From: eryk...@gmail.com (Eryk Sun)
Newsgroups: comp.lang.python
Subject: Re: Compiling python on windows with vs
Date: Thu, 15 Jun 2023 11:35:46 -0500
Lines: 66
Message-ID: <mailman.106.1686846950.23016.python-list@python.org>
References: <6047921e-7201-c9fd-3917-555c23b41cf7@bfs.de>
<CAEfz+Tw0AQhzrwMJdzXx5dROrqkMSG0CJGMODP_YJK8qSrKAhQ@mail.gmail.com>
<CACL+1atisWWuWsq-BURtkivc1yXDysbqSPqBMBwEPU87kzZsHQ@mail.gmail.com>
<e42cbe4f-42d2-57c2-8bf0-e241740c6b03@bfs.de>
<CAEfz+Tx2ABH0NwZoawToNrohMy-Q_PQADy82cba_UtP5xp4bWw@mail.gmail.com>
<adc0c0ee-b1d2-6aa4-2303-b2170af199c3@bfs.de>
<CACL+1atVWRem2m6hh2-_+ruer04qbfg2Y2BEuZsLn8SkQPtUGQ@mail.gmail.com>
Mime-Version: 1.0
Content-Type: text/plain; charset="UTF-8"
X-Trace: news.uni-berlin.de q+AwLKikZGSUcTZ9hgi1gAhHx8ix3ohDggSfOIdePYIg==
Return-Path: <eryksun@gmail.com>
X-Original-To: python-list@python.org
Delivered-To: python-list@mail.python.org
Authentication-Results: mail.python.org; dkim=pass
reason="2048-bit key; unprotected key"
header.d=gmail.com header.i=@gmail.com header.b=M2PgTL/c;
dkim-adsp=pass; dkim-atps=neutral
X-Spam-Status: OK 0.000
X-Spam-Evidence: '*H*': 1.00; '*S*': 0.00; 'url-ip:140.82/16': 0.03;
'(which': 0.04; 'error:': 0.05; "python's": 0.05; 'windows,':
0.05; 'subject:python': 0.06; 'included.': 0.07; 'parent': 0.07;
'child': 0.09; 'example:': 0.09; 'implicit': 0.09; 'repositories':
0.09; 'resolved': 0.09; 'url:github': 0.14; 'url-ip:140/8': 0.15;
'"add': 0.16; '"write': 0.16; '(because': 0.16; '3.10': 0.16;
'bugs': 0.16; 'cpython.': 0.16; 'directories': 0.16;
'directories.': 0.16; 'edge.': 0.16; 'file";': 0.16; 'flag': 0.16;
'flag.': 0.16; 'mounted': 0.16; 'paths': 0.16; 'subject:windows':
0.16; 'subsequently': 0.16; 'url:cpython': 0.16; 'wrote:': 0.16;
'problem': 0.16; 'python': 0.16; 'grant': 0.17; 'probably': 0.17;
'bug': 0.19; 'to:addr:python-list': 0.20; 'all,': 0.20; 'issue':
0.21; 'extension': 0.25; 'cc:2**0': 0.25; 'object': 0.26;
'sensitive': 0.26; "isn't": 0.27; 'else': 0.27; 'done': 0.28;
'present': 0.30; 'whole': 0.30; 'code,': 0.31; 'modify': 0.31;
'module': 0.31; "doesn't": 0.32; '(as': 0.32; 'encountered': 0.32;
'files,': 0.32; 'python-list': 0.32; 'to:name:python': 0.32;
'message-id:@mail.gmail.com': 0.32; 'but': 0.32; 'there': 0.33;
'path': 0.33; 'windows': 0.34; 'someone': 0.34; 'requires': 0.34;
'header:In-Reply-To:1': 0.34; 'received:google.com': 0.34;
'developed': 0.35; 'failed': 0.35; 'from:addr:gmail.com': 0.35;
'files': 0.36; 'source': 0.36; 'necessarily': 0.37; 'main': 0.37;
"it's": 0.37; 'directory': 0.37; 'file': 0.38; 'single': 0.39;
'setting': 0.39; 'use': 0.39; 'case.': 0.40; 'file:': 0.40;
'processed': 0.40; '10,': 0.61; 'here.': 0.61; "there's": 0.61;
'lower': 0.62; 'simply': 0.63; 'full': 0.64; 'security.': 0.64;
'spam': 0.65; 'tool': 0.65; 'now,': 0.67; 'right': 0.68; 'matter':
0.68; 'longer': 0.71; 'easy': 0.74; 'tools': 0.74; 'hundreds':
0.75; 'rights': 0.76; 'implemented': 0.76; 'attribute': 0.84;
'enabled.': 0.84; 'inherit': 0.84; 'skip:q 20': 0.95
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=gmail.com; s=20221208; t=1686846947; x=1689438947;
h=cc:to:subject:message-id:date:from:references:in-reply-to
:mime-version:from:to:cc:subject:date:message-id:reply-to;
bh=iTg6YeUrBvJ1aXPdDy4jjagROL4yijw4eTqPN0FB2Kw=;
b=M2PgTL/cGC1Rx7Qzmp09iboGKPnvpdkQWzG0hSO7mSB336QcpbMJzHhje+l+VoeXmz
sqEqBBW3T/yVyTPQh90ebP747upf94Dg2l08/NOvqzSAWgTaxuU6PvMF4HJ5spu0JTlF
PPFJmDK5ewD3S7e4aDa3fvgNxweypBSaz6ruONqTPAuS5elOjKH0kZfyPl6iMQTmYPPA
g0kaWUw/oOX70ZEjlBQX9x4gf8g+PZw6JkeHon1kNGeo+diWaDyxei3GMYS6Vn6YIfAD
DaSMG96rxanmhmbdgtwO5mXCJL6+XnRv1sab9SEK1EjjEhBUAY2mgzw9XEHlBf2Nrcl7
UJPA==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=1e100.net; s=20221208; t=1686846947; x=1689438947;
h=cc:to:subject:message-id:date:from:references:in-reply-to
:mime-version:x-gm-message-state:from:to:cc:subject:date:message-id
:reply-to;
bh=iTg6YeUrBvJ1aXPdDy4jjagROL4yijw4eTqPN0FB2Kw=;
b=ilhiwNTRFyoThXfQO3o1gah9fT8oS3tfQFgyJFJt9BagtJ+ncaNimgHZ+y1R6FAQ0h
DgV8Z/f0d/bxhw08jI305Rp8SgACmF/1amCF0vqlr/GQqIq5UzJB0/nItmKJkm5urrwT
4/TbI9osAKSBaahwepetPQjQ5EB7tBxEDCUh6+P/Iw2QeTSX3JPKBMalH1iE50vh/9fh
ElF9qrHOg/8+Jj2kxCwy4fsBV8LnR8Eg1P9k+mKg/+QMnG02pmi7F1oSwfrTbboGf2As
Hyl7vPRKH6/h4TkaFjWH5VKXpe/u8IyFJhvgSXjFTWUZykpzuB5Nb2yhR5oggYZQes3d
H6ZA==
X-Gm-Message-State: AC+VfDymhYLexxF5ubde53BTFHS3GXZ5461cXhxBJJaS35l05X4ZRsXw
lq7SB032WMB2cZPUPScZqMe+QlpkdBcsmy2XolIaH3Ph
X-Google-Smtp-Source: ACHHUZ4l5K5W2LGpegMfth5tsEFJ8YL1ymz5uM4EEpI1KOu3qdl+sKEC7z01PWWQCaajHCtWpx4KExAw9//+wZ82fCM=
X-Received: by 2002:a4a:be10:0:b0:558:a104:65fd with SMTP id
l16-20020a4abe10000000b00558a10465fdmr12845198oop.2.1686846947162; Thu, 15
Jun 2023 09:35:47 -0700 (PDT)
In-Reply-To: <adc0c0ee-b1d2-6aa4-2303-b2170af199c3@bfs.de>
X-BeenThere: python-list@python.org
X-Mailman-Version: 2.1.39
Precedence: list
List-Id: General discussion list for the Python programming language
<python-list.python.org>
List-Unsubscribe: <https://mail.python.org/mailman/options/python-list>,
<mailto:python-list-request@python.org?subject=unsubscribe>
List-Archive: <https://mail.python.org/pipermail/python-list/>
List-Post: <mailto:python-list@python.org>
List-Help: <mailto:python-list-request@python.org?subject=help>
List-Subscribe: <https://mail.python.org/mailman/listinfo/python-list>,
<mailto:python-list-request@python.org?subject=subscribe>
X-Mailman-Original-Message-ID: <CACL+1atVWRem2m6hh2-_+ruer04qbfg2Y2BEuZsLn8SkQPtUGQ@mail.gmail.com>
X-Mailman-Original-References: <6047921e-7201-c9fd-3917-555c23b41cf7@bfs.de>
<CAEfz+Tw0AQhzrwMJdzXx5dROrqkMSG0CJGMODP_YJK8qSrKAhQ@mail.gmail.com>
<CACL+1atisWWuWsq-BURtkivc1yXDysbqSPqBMBwEPU87kzZsHQ@mail.gmail.com>
<e42cbe4f-42d2-57c2-8bf0-e241740c6b03@bfs.de>
<CAEfz+Tx2ABH0NwZoawToNrohMy-Q_PQADy82cba_UtP5xp4bWw@mail.gmail.com>
<adc0c0ee-b1d2-6aa4-2303-b2170af199c3@bfs.de>
 by: Eryk Sun - Thu, 15 Jun 2023 16:35 UTC

On 6/15/23, Thomas Schweikle via Python-list <python-list@python.org> wrote:
>
> No. This flag is not inherited. Someone has to set it for created
> directories. It is easy to confirm: take a directory not under MSYS or
> cygwin control (because it is mounted by MSYS or cygwin), set the flag,
> then create directories. They all will have caseSensitivInfo disabled.

That was how the attribute was implemented initially in Windows 10,
but subsequently it was made inheritable. For example:

C:\Temp\test>mkdir spam
C:\Temp\test>fsutil file setCaseSensitiveInfo spam enable
Error: Access is denied.

Setting the case-sensitive attribute requires the right to add files
and directories (i.e. "WD" = "write data" / "add file"; "AD" = "append
data" / "add subdirectory") and the right to remove files and
directories (i.e. "DC" = "delete child"). The owner of a directory
doesn't necessarily inherit these rights from the parent directory
(which is my case here), but the owner of any object usually has the
implicit right to modify discretionary security. Let's simply grant
the owner (i.e. "OW" = "owner rights") full control of the directory
(i.e. "F"), inheritable to child directories (i.e. "CI" = "container
inherit").

C:\Temp\test>icacls spam /grant *OW:(CI)(F)
processed file: spam
Successfully processed 1 files; Failed processing 0 files

C:\Temp\test>fsutil file setCaseSensitiveInfo spam enable
Case sensitive attribute on directory C:\Temp\test\spam is enabled.

Now, create a child directory and confirm that it inherits the
case-sensitive flag.

C:\Temp\test>mkdir spam\eggs
C:\Temp\test>fsutil file queryCaseSensitiveInfo spam\eggs
Case sensitive attribute on directory C:\Temp\test\spam\eggs is enabled.

> Python itself isn't the problem here. It is MSBuild.exe. For some reason
> this tool lowercases sometimes whole paths to files included. This does
> not matter if case sensitivity is disabled. It matters if case
> sensitivity is enabled! There is no reason MSBUild.exe does it. But it
> is done for some paths (as someone else pointed out).

For the specific problem you had when building 3.10 and 3.11, it's
actually a bug in Python's source code, which is no longer present in
3.12+. It can be fixed in 3.11, but 3.10 no longer gets bug fixes.
Here's the link to the issue on GitHub:

https://github.com/python/cpython/issues/105737

I encountered a different bug when building the main branch. Building
the _decimal extension module includes an .asm file. The relative path
in the project file has the correct case, but the build system
resolved the fully-qualified path as all lower case. This problem only
occurred for this single file, out of hundreds of relative paths in
the project files, so it's not like the build system is completely
broken when working in case-sensitive directories.

There are probably a few such bugs that need to be fixed in msbuild,
the compiler, and linker. After all, these tools have been developed
and tested for decades on only case-insensitive filesystems. But you
don't have to be on the bleeding edge. There's no reason to make
directories case-sensitive for repositories that are intended for use
on Windows, such as CPython.

1
server_pubkey.txt

rocksolid light 0.9.81
clearnet tor