On Tuesday, December 29 2020, Martina Ferrari wrote:

> As I was trying out the new PEP-517 build system, I installed python3-build 
> and
> tried to run it, only to get this stacktrace:
>
> /tmp/build-env-axtchyw0/bin/python: No module named ensurepip
> /tmp/build-env-axtchyw0/bin/python: No module named pip
> Traceback (most recent call last):
>   File "/usr/bin/pyproject-build", line 33, in <module>
>     sys.exit(load_entry_point('build==0.1.0', 'console_scripts', 
> 'pyproject-build')())
>   File "/usr/lib/python3/dist-packages/build/__main__.py", line 206, in 
> entrypoint
>     main(sys.argv[1:])
>   File "/usr/lib/python3/dist-packages/build/__main__.py", line 202, in main
>     build_package(args.srcdir, outdir, distributions, config_settings, not 
> args.no_isolation, args.skip_dependencies)
>   File "/usr/lib/python3/dist-packages/build/__main__.py", line 81, in 
> build_package
>     _build_in_isolated_env(builder, outdir, distributions)
>   File "/usr/lib/python3/dist-packages/build/__main__.py", line 45, in 
> _build_in_isolated_env
>     with IsolatedEnvBuilder() as env:
>   File "/usr/lib/python3/dist-packages/build/env.py", line 55, in __enter__
>     executable, pip_executable = _create_isolated_env(self._path)
>   File "/usr/lib/python3/dist-packages/build/env.py", line 187, in 
> _create_isolated_env
>     subprocess.check_call([executable, '-Im', 'pip', 'uninstall', 
> 'setuptools', '-y'])
>   File "/usr/lib/python3.9/subprocess.py", line 373, in check_call
>     raise CalledProcessError(retcode, cmd)
> subprocess.CalledProcessError: Command 
> '['/tmp/build-env-axtchyw0/bin/python', '-Im', 'pip', 'uninstall', 
> 'setuptools', '-y']' returned non-zero exit status 1.
>
>
> I don't know why build requires pip (I don't think it should?), but in any 
> case
> it seems it should be added as a dependency.

Thanks for the bug report, Martina.

Yeah, this is strange.  I don't think it should require pip, and after
installing python3-pip here and re-running /usr/bin/pyproject-build I
noticed that it (obviously) invokes pip and downloads several things,
which IMO is a no-no.

The reason I packaged python3-build is because check-manifest started
depending on it.  I'm thinking about removing the
/usr/bin/pyproject-build program and just shipping the library.  Do you
think it could work?  (Sorry, I'm not a PEP-517 expert).

Thanks in advance,

-- 
Sergio
GPG key ID: 237A 54B1 0287 28BF 00EF  31F4 D0EB 7628 65FC 5E36
Please send encrypted e-mail if possible
https://sergiodj.net/

Attachment: signature.asc
Description: PGP signature

Reply via email to