Path: csiph.com!fu-berlin.de!bofh.it!news.nic.it!robomod From: Ian Norton Newsgroups: linux.debian.maint.python Subject: Re: can pip be made using local Debian packages for any dependencies Date: Sun, 12 Feb 2023 09:20:01 +0100 Message-ID: References: X-Original-To: Philippe Cerfon X-Mailbox-Line: From debian-python-request@lists.debian.org Sun Feb 12 08:18:52 2023 Old-Return-Path: X-Amavis-Spam-Status: No, score=-7.199 tagged_above=-10000 required=5.3 tests=[BAYES_00=-2, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, LDO_WHITELIST=-5, RCVD_IN_DNSWL_NONE=-0.0001] autolearn=ham autolearn_force=no X-Policyd-Weight: NOT_IN_SBL_XBL_SPAMHAUS=-1.5 CL_IP_EQ_HELO_IP=-2 (check from: .gmail. - helo: .mail-oa1-x31.google. - helo-domain: .google.) FROM/MX_MATCHES_HELO(DOMAIN)=-2; rate: -5.5 X-Gm-Message-State: AO0yUKXqWILYiCKTUJuTTRguKcXA8lvnwNFHdlihJfIsCIuR2qLasB3a mPm148W5heiXukW2gRy319vzVUDMJWxZFLjweqs+R76Z70w= X-Google-SMTP-Source: AK7set8gMFMvxX5GDYSzx2f1vB6ccASWbu3CSW0/Ukb9cjtbqls77SmXJkpRAoZN9O1PvbE5Vr/6hG+uLycVxvZsols= X-Received: by 2002:a05:6870:ec8d:b0:16d:f7bc:9e55 with SMTP id eo13-20020a056870ec8d00b0016df7bc9e55mr130781oab.166.1676189910849; Sun, 12 Feb 2023 00:18:30 -0800 (PST) MIME-Version: 1.0 Content-Type: text/plain; charset="UTF-8" X-Mailing-List: archive/latest/20813 List-ID: List-URL: List-Archive: https://lists.debian.org/msgid-search/CAGUnuBGCqzqR-h5=rtCLD0RNTiVNHP_d+GFjtTDNE05cPCwN7g@mail.gmail.com Approved: robomod@news.nic.it Lines: 51 Organization: linux.* mail to news gateway Sender: robomod@news.nic.it X-Original-Cc: debian-python@lists.debian.org X-Original-Date: Sun, 12 Feb 2023 08:18:17 +0000 X-Original-Message-ID: X-Original-References: Xref: csiph.com linux.debian.maint.python:14914 https://packaging.python.org/en/latest/specifications/recording-installed-packages/ defines the python spec where a package such as pyparsing would create a tree of files under: site-packages/pyparsing-3.0.9-dist-info/ including RECORD which is essentially a sha256-based manifest of files and some others. On Sun, 12 Feb 2023 at 08:12, Ian Norton wrote: > > You've made me wonder if it would be feasible to have a debian-centric > tool that populates .dist-info from debs? > > On Sun, 12 Feb 2023 at 08:05, Ian Norton wrote: > > > > I requested this kind of thing from the pip folks as > > https://github.com/pypa/pip/issues/11644 and others have requested > > similar, such as https://github.com/pypa/pip/issues/11607 > > > > On Sun, 12 Feb 2023 at 04:56, Philippe Cerfon wrote: > > > > > > Hey. > > > > > > I hope this is not too off topic. > > > > > > As far as I understand, dh-python, when building packages somehow > > > automatically uses the Debian package names and even prevents e.g. > > > setuptools from downloading any dependencies by setting a (hopefully > > > not running) proxy. > > > > > > > > > I wondered whether it's possible to make tools like pip and setuptools > > > directly use the Debian python packages when resolving dependencies. > > > > > > The main motivation are security constraints, so I had to configure > > > pip so that it cannot just download packages from PyPI (which is > > > rather easy, simply setting no-index in pip.conf). > > > > > > But then of course it also fails to e.g. do an editable install of a > > > locally developed package, when it tries to resolve the dependencies. > > > > > > So I wondered whether it's possible to prevent pip from downloading > > > any remote stuff, while still resolving dependencies (respectively > > > consider them as being resolved) *if* the package is locally installed > > > from the Debian archive? > > > (If a dependency isn't installed from a package it may of course fail.) > > > > > > > > > Thanks, > > > Philippe. > > > > > > PS: Please keep me CCed. > > >