Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.debian.maint.python > #14918

Re: can pip be made using local Debian packages for any dependencies

Path csiph.com!fu-berlin.de!bofh.it!news.nic.it!robomod
From Philippe Cerfon <philcerf@gmail.com>
Newsgroups linux.debian.maint.python
Subject Re: can pip be made using local Debian packages for any dependencies
Date Mon, 13 Feb 2023 02:30:02 +0100
Message-ID <FYvPj-5rC5-7@gated-at.bofh.it> (permalink)
References <FYcD0-5f0N-1@gated-at.bofh.it> <FYfAR-5hCV-1@gated-at.bofh.it> <FYfKx-5hGe-1@gated-at.bofh.it> <FYfKx-5hGe-3@gated-at.bofh.it> <FYpqy-5nAX-11@gated-at.bofh.it>
X-Mailbox-Line From debian-python-request@lists.debian.org Mon Feb 13 01:27:12 2023
Old-Return-Path <philcerf@gmail.com>
X-Amavis-Spam-Status No, score=-2.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, RCVD_IN_DNSWL_NONE=-0.0001] autolearn=no autolearn_force=no
X-Policyd-Weight NOT_IN_SBL_XBL_SPAMHAUS=-1.5 CL_IP_EQ_HELO_IP=-2 (check from: .gmail. - helo: .mail-pj1-x102b.google. - helo-domain: .google.) FROM/MX_MATCHES_HELO(DOMAIN)=-2; rate: -5.5
X-Gm-Message-State AO0yUKUoKhWF0T5knL3JPXxOkER3TNtPBSMV/Zw0dJPNukLC+HFgkUHv mjUUNIUIwPnnfGNGBRba+ivtqQJksblfHs3Z+x4=
X-Google-SMTP-Source AK7set9+/VCtOMmpwfUtqNEla64o9LQKqtgECPsaPf4WkhS3tPQYyb/Pu5GrLO7PDlwBhb63zUfUHrKfmT3Pocawf1M=
X-Received by 2002:a17:90a:5181:b0:232:cc9a:db32 with SMTP id u1-20020a17090a518100b00232cc9adb32mr2914909pjh.94.1676250699092; Sun, 12 Feb 2023 17:11:39 -0800 (PST)
MIME-Version 1.0
Content-Type text/plain; charset="UTF-8"
Content-Transfer-Encoding quoted-printable
X-Mailing-List <debian-python@lists.debian.org> archive/latest/20817
List-ID <debian-python.lists.debian.org>
List-URL <https://lists.debian.org/debian-python/>
List-Archive https://lists.debian.org/msgid-search/CAN+za=Nh9jMfUKmvvoJUZ3rhaPBvXFxC7PGJVc0c5euEwTmWXg@mail.gmail.com
Approved robomod@news.nic.it
Lines 92
Organization linux.* mail to news gateway
Sender robomod@news.nic.it
X-Original-Cc Ian Norton <inorton@gmail.com>, debian-python@lists.debian.org
X-Original-Date Mon, 13 Feb 2023 02:11:28 +0100
X-Original-Message-ID <CAN+za=Nh9jMfUKmvvoJUZ3rhaPBvXFxC7PGJVc0c5euEwTmWXg@mail.gmail.com>
X-Original-References <CAN+za=M3QvK2eb_OPoxYpCA2_gtejXDMcY0kH+U6s+x_hJomCg@mail.gmail.com> <CAGUnuBF1BxOyrx1_GGEOtJONf=j08UgE9T2-juUXQnTp8p-8Mg@mail.gmail.com> <CAGUnuBGzeH3Uy8Fe6fJvoxsi9yCJXHvLYss4FKR+V+9XTut35Q@mail.gmail.com> <CAGUnuBGCqzqR-h5=rtCLD0RNTiVNHP_d+GFjtTDNE05cPCwN7g@mail.gmail.com> <Mailbird-3d2f35ae-00ad-4864-a8f9-a39876df65ae@stufft.io>
Xref csiph.com linux.debian.maint.python:14918

Show key headers only | View raw


Hey.


On Sun, Feb 12, 2023 at 7:31 PM Donald Stufft <donald@stufft.io> wrote:
>
> I'm pretty sure that most if not all debian packages already ship the required information for pip to see them as installed, and if they are installed and they satisfy the dependency constraints that pip has for those projects, then they'll be used.


Are you sure? I have a test project with a pyproject.toml that contains:
[build-system]
requires = ["setuptools"]
build-backend = "setuptools.build_meta"

i.e. no version requirement on setuptools.

Also:
$ dpkg -l python3-setuptools
...
ii  python3-setuptools 66.1.1-1     all          Python3 Distutils Enhancements

Yet when I do e.g.:
$ pip install --editable .
Defaulting to user installation because normal site-packages is not writeable
Obtaining file:///home/test/example
  Installing build dependencies ... error
  error: subprocess-exited-with-error

  × pip subprocess to install build dependencies did not run successfully.
  │ exit code: 1
  ╰─> [2 lines of output]
      ERROR: Could not find a version that satisfies the requirement
setuptools (from versions: none)
      ERROR: No matching distribution found for setuptools
      [end of output]

  note: This error originates from a subprocess, and is likely not a
problem with pip.
error: subprocess-exited-with-error

× pip subprocess to install build dependencies did not run successfully.
│ exit code: 1
╰─> See above for output.

note: This error originates from a subprocess, and is likely not a
problem with pip.

Now the particular error probably comes from my pip.conf, because I
set --no-index, at least when I try to install some package that is
not installed as Debian package, e.g.:
$ pip install acme
Defaulting to user installation because normal site-packages is not writeable
ERROR: Could not find a version that satisfies the requirement acme
(from versions: none)
ERROR: No matching distribution found for acme

But I need something like that to actually disable any remote downloads.

Perhaps you're right however, cause when I run with an empty pip.conf,
it does e.g. download files to:
~/.local/lib/python3.11/site-packages/natsort*
(which I set as a project dependency), but it doesn't create something
like that for setuptools.

On the other hand:
I've just installed Debian's python3-natsort, rm -rf ~/.local/ and did
pip install --editable . again (without pip.conf), and it still seems
to download and install natsort to ~/.local .
So that doesn't look, as if it would recognize the one from Debian.

But even if that would actually work, why does it need the index at
https://pypi.org/simple to use the local packages from Debian?


> The question of having pip automatically install a debian package instead of using PyPI basically comes down to a few problems:


That might be nice for some users, but I personally wouldn't even need
or want that. It should perhaps rather just tell which Debian packages
need to be installed.


Thanks,
Philippe.

Back to linux.debian.maint.python | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

can pip be made using local Debian packages for any dependencies Philippe Cerfon <philcerf@gmail.com> - 2023-02-12 06:00 +0100
  Re: can pip be made using local Debian packages for any dependencies Ian Norton <inorton@gmail.com> - 2023-02-12 09:10 +0100
    Re: can pip be made using local Debian packages for any dependencies Ian Norton <inorton@gmail.com> - 2023-02-12 09:20 +0100
      Re: can pip be made using local Debian packages for any dependencies Ian Norton <inorton@gmail.com> - 2023-02-12 09:20 +0100
        Re: can pip be made using local Debian packages for any dependencies Ian Norton <inorton@gmail.com> - 2023-02-12 09:30 +0100
        Re: can pip be made using local Debian packages for any dependencies "Donald Stufft" <donald@stufft.io> - 2023-02-12 19:40 +0100
          Re: can pip be made using local Debian packages for any dependencies Philippe Cerfon <philcerf@gmail.com> - 2023-02-13 02:30 +0100
            Re: can pip be made using local Debian packages for any dependencies Stefano Rivera <stefanor@debian.org> - 2023-02-15 17:40 +0100
              Re: can pip be made using local Debian packages for any dependencies Ian Norton <inorton@gmail.com> - 2023-02-15 19:10 +0100
                Re: can pip be made using local Debian packages for any dependencies Stefano Rivera <stefanor@debian.org> - 2023-02-15 21:20 +0100
                Re: can pip be made using local Debian packages for any dependencies Philippe Cerfon <philcerf@gmail.com> - 2023-02-17 03:40 +0100
                Re: can pip be made using local Debian packages for any dependencies Stefano Rivera <stefanor@debian.org> - 2023-02-17 15:40 +0100
                Re: can pip be made using local Debian packages for any dependencies Philippe Cerfon <philcerf@gmail.com> - 2023-02-18 06:20 +0100
                Re: can pip be made using local Debian packages for any dependencies Andrey Rakhmatullin <wrar@wrar.name> - 2023-02-17 19:30 +0100
              Re: can pip be made using local Debian packages for any dependencies Jeremy Stanley <fungi@yuggoth.org> - 2023-02-15 23:10 +0100
                Re: can pip be made using local Debian packages for any dependencies Ian Norton <inorton@gmail.com> - 2023-02-16 02:20 +0100
                Re: can pip be made using local Debian packages for any dependencies Andrey Rakhmatullin <wrar@wrar.name> - 2023-02-16 10:20 +0100
                Re: can pip be made using local Debian packages for any dependencies Jeremy Stanley <fungi@yuggoth.org> - 2023-02-16 14:50 +0100
              Re: can pip be made using local Debian packages for any dependencies Philippe Cerfon <philcerf@gmail.com> - 2023-02-17 03:40 +0100
    Re: can pip be made using local Debian packages for any dependencies Philippe Cerfon <philcerf@gmail.com> - 2023-02-13 02:20 +0100

csiph-web