Re: can pip be made using local Debian packages for any dependencies
Hi Philippe (2023.02.13_01:11:28_+) > On Sun, Feb 12, 2023 at 7:31 PM Donald Stufft 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. Yeah, most packages should ship .egg-info/.dist-info. > 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 You sure it isn't doing an isolated build? Try --no-build-isolation. SR -- Stefano Rivera http://tumbleweed.org.za/ +1 415 683 3272
Re: can one change the path of generated entry point console_scripts
Hi Philippe (2023.02.14_00:13:08_+) > When I use dh-python to build a package that contains a pyproject.toml > and uses python3-setuptools for building like e.g. described here > https://setuptools.pypa.io/en/latest/userguide/entry_point.html > > and I use that entry point feature to have a script auto-generated > that calls my main():[project.scripts] > somescript = "package:main" > > is it possible to change the path were that script is finally put it > the package (i.e. not ./usr/bin/)? Just move it somewhere else later in the build? e.g. after dh_install. /usr/bin is where user-executable scripts should go, unless they belong in /usr/sbin or /usr/games. Internal scripts (that will be executed by the full path name) can live in /usr/share/ or similar. SR -- Stefano Rivera http://tumbleweed.org.za/ +1 415 683 3272
Re: can pip be made using local Debian packages for any dependencies
My suggestion to the pip folks was a plugin system and extension point for "install x" package that distros could provide implementations for On Wed, 15 Feb 2023, 16:35 Stefano Rivera, wrote: > Hi Philippe (2023.02.13_01:11:28_+) > > On Sun, Feb 12, 2023 at 7:31 PM Donald Stufft 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. > > Yeah, most packages should ship .egg-info/.dist-info. > > > 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 > > You sure it isn't doing an isolated build? Try --no-build-isolation. > > SR > > -- > Stefano Rivera > http://tumbleweed.org.za/ > +1 415 683 3272 >
Re: can pip be made using local Debian packages for any dependencies
Hi Ian (2023.02.15_18:07:39_+) > My suggestion to the pip folks was a plugin system and extension point for > "install x" package that distros could provide implementations for Yeah, something like that could work. I don't know how useful it would be, though. Obviously, only root could use it (or root inside a container). And our selection of Python modules is far from complete. It's not Debian's intent to provide a mirror of PyPI within Debian. Generally speaking, we package the modules that we find useful for supporting building and shipping other python modules and applications. We'll only have a single version of each package. And they're usually not the versions developers want, because in any stable release they're probably out of date. SR -- Stefano Rivera http://tumbleweed.org.za/ +1 415 683 3272
Re: can pip be made using local Debian packages for any dependencies
As someone who does Python software development on Debian constantly for their $dayjob, my best advice is to just install things from PyPI into and run them from venvs/virtualenvs. The default "--user" install mode pip offers is fragile and leaves you with potential conflicts anyway if you need different versions of dependencies for different things. To your original question, if you really want to use some Debian-packaged libraries mixed with things installed from source or from PyPI, make your venv with the --system-site-packages option. -- Jeremy Stanley signature.asc Description: PGP signature
Re: can pip be made using local Debian packages for any dependencies
I agree that is "easiest" but what I was after was the ability to restrict myself to the curated and signed packages from debian, pypi is just as bad as old CPAN when it comes to packages disappearing or being broken or depending on totally random versions On Wed, 15 Feb 2023, 22:01 Jeremy Stanley, wrote: > As someone who does Python software development on Debian constantly > for their $dayjob, my best advice is to just install things from > PyPI into and run them from venvs/virtualenvs. The default "--user" > install mode pip offers is fragile and leaves you with potential > conflicts anyway if you need different versions of dependencies for > different things. > > To your original question, if you really want to use some > Debian-packaged libraries mixed with things installed from source or > from PyPI, make your venv with the --system-site-packages option. > -- > Jeremy Stanley >