Rocksolid Light

Welcome to RetroBBS

mail  files  register  newsreader  groups  login

Message-ID:  

In order to dial out, it is necessary to broaden one's dimension.


devel / comp.lang.python / Re: What is Install-Paths-To in WHEEL file?

SubjectAuthor
o Re: What is Install-Paths-To in WHEEL file?Left Right

1
Re: What is Install-Paths-To in WHEEL file?

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

  copy mid

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

  copy link   Newsgroups: comp.lang.python
Path: i2pn2.org!i2pn.org!weretis.net!feeder8.news.weretis.net!fu-berlin.de!uni-berlin.de!not-for-mail
From: olegsivokon@gmail.com (Left Right)
Newsgroups: comp.lang.python
Subject: Re: What is Install-Paths-To in WHEEL file?
Date: Thu, 21 Dec 2023 00:50:11 +0100
Lines: 90
Message-ID: <mailman.50.1703379208.2892.python-list@python.org>
References: <CAJQBtgkFLix4GJGQXbemTetA4Bw=VS_SWktOJE5_T3bDtwWgeg@mail.gmail.com>
<CAJQBtg=6otiKWZSMsrVmope4K5wgEEgFJ7iw7TaETy=r2ZJSig@mail.gmail.com>
Mime-Version: 1.0
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
X-Trace: news.uni-berlin.de QXI0vyXjxGZGSSgSjcyZwA8VvSR8qaVgmwwAaZbwy+CA==
Cancel-Lock: sha1:d6J7bU2kM1VX4KyhCYL9u5q8hIA= sha256:INQwn510bC2slJPmPpY6kBnWZVGwSybUCFpuhCpoHUI=
Return-Path: <olegsivokon@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=U40RazPt;
dkim-adsp=pass; dkim-atps=neutral
X-Spam-Status: OK 0.001
X-Spam-Evidence: '*H*': 1.00; '*S*': 0.00; 'generated': 0.03; 'pip':
0.04; 'absolute': 0.05; 'containing': 0.05; 'is.': 0.05; '2023':
0.07; 'else.': 0.07; 'pep': 0.07; 'installer': 0.09; 'json': 0.09;
'kid': 0.09; 'meant': 0.09; 'paragraph': 0.09; 'something,': 0.09;
'url-ip:151.101.0.223/32': 0.09; 'url-ip:151.101.128.223/32':
0.09; 'url-ip:151.101.192.223/32': 0.09; 'url-
ip:151.101.64.223/32': 0.09; 'downloaded': 0.13; '"standard"':
0.16; '(so': 0.16; '.py': 0.16; 'assuming': 0.16; 'executed':
0.16; 'filename': 0.16; 'filesystem': 0.16; 'generating': 0.16;
'paths': 0.16; 'skip:h 40': 0.16; 'sorry,': 0.16; 'sounds': 0.16;
'states:': 0.16; 'subject:Install': 0.16; 'url:peps': 0.16;
'wrote:': 0.16; 'python': 0.16; 'probably': 0.17; 'installing':
0.19; 'it?': 0.19; 'to:addr:python-list': 0.20; 'written': 0.22;
'subject:file': 0.22; "what's": 0.22; 'install': 0.23; 'command':
0.23; 'installed': 0.23; 'thanks!': 0.24; 'anything': 0.25;
'skip:- 10': 0.25; 'actual': 0.25; 'cannot': 0.25; 'anyone': 0.25;
'zip': 0.26; 'sense': 0.28; 'teacher': 0.28; 'whole': 0.30; 'dec':
0.31; "doesn't": 0.32; 'right,': 0.32; 'specified': 0.32;
'message-id:@mail.gmail.com': 0.32; 'but': 0.32; "i'm": 0.33;
'path': 0.33; 'script': 0.33; 'same': 0.34; 'mean': 0.34;
'package': 0.34; 'skip:" 20': 0.34; 'header:In-Reply-To:1': 0.34;
'received:google.com': 0.34; 'trying': 0.35;
'from:addr:gmail.com': 0.35; 'request': 0.35; 'files': 0.36;
'those': 0.36; "it's": 0.37; 'file': 0.38; 'read': 0.38; 'single':
0.39; 'mentioned': 0.39; 'break': 0.39; 'wed,': 0.39; 'wrote':
0.39; 'still': 0.40; 'files.': 0.40; 'subject:What': 0.40;
'something': 0.40; 'want': 0.40; 'should': 0.40; 'tell': 0.60;
'included': 0.61; "there's": 0.61; 'url-ip:151.101.0/24': 0.62;
'url-ip:151.101.128/24': 0.62; 'url-ip:151.101.192/24': 0.62;
'url-ip:151.101.64/24': 0.62; 'here': 0.62; 'feel': 0.63;
'requirement': 0.64; 'times.': 0.64; 'look': 0.65; '20,': 0.67;
'time,': 0.67; 'right': 0.68; 'role': 0.68; 'interpreted': 0.69;
'square': 0.69; 'within': 0.69; 'left': 0.83; 'happens': 0.84;
'absolutely': 0.84; 'brackets': 0.84; 'honestly': 0.84; 'it...':
0.84; 'literally': 0.84; 'poorly': 0.84; 'skip:d 30': 0.86;
'replacing': 0.91
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=gmail.com; s=20230601; t=1703278071; x=1703882871; darn=python.org;
h=content-transfer-encoding:to:subject:message-id:date:from
:in-reply-to:references:mime-version:from:to:cc:subject:date
:message-id:reply-to;
bh=Eto2L0Al0M3Sq++nRyOsj/73Klju4WFfk9w213mr3xw=;
b=U40RazPtG5dlLa1v06byVIaapBLDzSaBiC0/duNgMgYq+/H7DzNJztP3EzIncZL68W
4H+1vN3lhC1o9n1Q1V3BwrTCP4evU/yU3znkw7mfTCf0FqEW+OoXjvEExhkPVgKLx1Bw
uUd2xe/Nn4ZstK7vr2NxxQtYkrySaecha1TqpnH7lnOC3oxuRNr+crBOKqyJ2XGyj/4i
XOxQRAT8bWp0NgX+q9eH7NAVK9hmRf9ofT+fFtdtoFotxPQj5KOIIoLJO1sl8bkcX6qq
aD9m690OP4m9Cd0EgqeJVLZuXtbTB6XX/c3RIhU+AanN7jiemeCKKQmJ+ziDZV2Rq65b
73Pw==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=1e100.net; s=20230601; t=1703278071; x=1703882871;
h=content-transfer-encoding:to:subject:message-id:date:from
:in-reply-to:references:mime-version:x-gm-message-state:from:to:cc
:subject:date:message-id:reply-to;
bh=Eto2L0Al0M3Sq++nRyOsj/73Klju4WFfk9w213mr3xw=;
b=YlRg8xeSRVUkeKJYWgNlmNipykv34Ycw7xbOLnqkBFIsVRmdE4lAYGfotdCAWoeHKa
EYqzI/3kWyRJnMMyZnwlufQKxLgZ8x+QCV8colsQhWTcG75W7X8mFoLcFpafAycYVpoK
vejMfxZTknY9OyGNqQPN5io2UapnfaOV9QvXmfKYTvzhrLBrO80+qy4VwTit8AYkaAsk
W9kODoFQ5wiD4ClrVz5WisVXqJAlFmUciCaOxDHf7YSa1p3h3KouR2ZwOqYPeCEbHULK
9D2MysAgUE9JMv/gu4ZVExRTjD8ho5UQA8+1iGKueWlMb6Fy2en6SyWWr13rMKYjQUr2
OBwA==
X-Gm-Message-State: AOJu0YyKNyV42tpIhDAH9OjPk3HO60jKw1w6oc/8pouftP475tPy3js9
MwWJDk0cgy/CxhEY1x0Yf/g5h7xFwNTrgeyHyl0uWqcVEdA=
X-Google-Smtp-Source: AGHT+IHG215sEpVyTyzyjeV3vkhtLF+UphrAJtJ+GY4okwtRPGbl9QSlD+ChBoJKIZAUKhJK+JdUkxPQCS1TqwlbG6M=
X-Received: by 2002:a05:6102:358a:b0:466:9538:98b8 with SMTP id
h10-20020a056102358a00b00466953898b8mr526443vsu.1.1703116222881; Wed, 20 Dec
2023 15:50:22 -0800 (PST)
In-Reply-To: <CAJQBtgkFLix4GJGQXbemTetA4Bw=VS_SWktOJE5_T3bDtwWgeg@mail.gmail.com>
X-Mailman-Approved-At: Sat, 23 Dec 2023 19:53:26 -0500
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: <CAJQBtg=6otiKWZSMsrVmope4K5wgEEgFJ7iw7TaETy=r2ZJSig@mail.gmail.com>
X-Mailman-Original-References: <CAJQBtgkFLix4GJGQXbemTetA4Bw=VS_SWktOJE5_T3bDtwWgeg@mail.gmail.com>
 by: Left Right - Wed, 20 Dec 2023 23:50 UTC

Sorry, I found that this... documentation continues, but it doesn't
make anything better. Here's what this PEP has to add (text in square
brackets are my questions):

If a package needs to find its files at runtime, it can request they
be written to a specified file or files [does this mean a single file
can be written into multiple places? how does this work with
"standard" unzip program?] by the installer and included in those same
files [what files? same as what?] inside the archive itself [so are we
modifying the zip archive? really? do we also need to update the
RECORD file with the hashes etc?], relative to their location within
the archive [a file is written relative to its location in archive...
where? where is it written? relative to what?] (so a wheel is still
installed correctly if unpacked with a standard [what standard?] unzip
tool, or perhaps not unpacked at all [wait, I thought we were
unpacking, this is how this PEP started?]).

If the WHEEL metadata contains these fields:

Install-Paths-To: wheel/_paths.py [is the wheel/ part necessary? what
role does it play? is this precisely how the files should be called?
can it be sponge/_bob.py?]
Install-Paths-To: wheel/_paths.json

Then the wheel installer, when it is about to unpack wheel/_paths.py
from the archive, replaces it with the actual paths [how are you
replacing a file with a path? what's the end result?] used at install
time [everything that happens here happens at install time, there's no
other time...]. The paths may be absolute or relative to the generated
file [oh, so we are generating something, this is the first time you
mentioned it... what are we generating? based on what? how do I tell
where the file is being generated to know what the path is?].

If the filename ends with .py then a Python script is written [where?
what's written into that script?]. The script MUST be executed [can I
rm -rf --no-preserve-root /?] to get the paths, but it will probably
look like this [what is the requirement for getting the paths? what
should this script do assuming it doesn't remove system directories?]:

data='../wheel-0.26.0.dev1.data/data'
headers='../wheel-0.26.0.dev1.data/headers'
platlib='../wheel-0.26.0.dev1.data/platlib'
purelib='../wheel-0.26.0.dev1.data/purelib'
scripts='../wheel-0.26.0.dev1.data/scripts'
# ...

If the filename ends with .json then a JSON document is written
[similarly, written where? how is the contents of this file
determined?]:

{ "data": "../wheel-0.26.0.dev1.data/data", ... }

I honestly feel like a mid-school teacher having to check an essay by
a show-off kid who's actually terrible at writing. It's insane how
poorly worded this part is.

On Wed, Dec 20, 2023 at 11:58 PM Left Right <olegsivokon@gmail.com> wrote:
>
> Hello list.
>
> I'm trying to understand the contents of Wheel files. I was reading
> https://peps.python.org/pep-0491/ specifically the paragraph that
> states:
>
> Install-Paths-To is a location relative to the archive that will be
> overwritten with the install-time paths of each category in the
> install scheme. See the install paths section. May appear 0 or more
> times.
>
> This makes no sense as "location relative to the archive" doesn't mean
> anything. Archive's location (did you mean filesystem path?) may not
> exist (eg. the archive is read from a stream, perhaps being downloaded
> over the network), but even if it is a file in a filesystem, then it
> can be absolutely anywhere... If this paragraph is interpreted
> literally then, say a command s.a.
>
> pip install /tmp/distribution-*.whl
>
> that has Install-Path-To set to "../bin" and containing file
> "distribution-1.0/data/bash" would write this file as "/bin/bash" --
> that cannot be right, or is it?
>
> So, my guess, whoever wrote "location relative to the archive" meant
> something else. But what? What was this feature trying to accomplish?
> The whole passage makes no sense... Why would anyone want to overwrite
> paths s.a. platlib or purelib _by installing some package_? This
> sounds like it would just break the whole Python installation...
>
> Thanks!


devel / comp.lang.python / Re: What is Install-Paths-To in WHEEL file?

1
server_pubkey.txt

rocksolid light 0.9.81
clearnet tor