Hello

I'm trying to use the python-pypa-build package inside a Guix container.
I'm getting the error 'invalid path: /etc/ssl/certs/ca-certificates.crt'
even though that file exists and is exposed to the container.

In a python project dir containing a pyproject.toml file:
$ guix shell -CN --expose=/etc/ssl/certs/ python python-pypa-build --
python3 -m build
* Creating venv isolated environment...
* Installing packages in isolated environment... (hatchling)
ERROR: Could not install packages due to an OSError: Could not find a
suitable TLS CA certificate bundle, invalid path:
/etc/ssl/certs/ca-certificates.crt

WARNING: There was an error checking the latest version of pip.

Traceback (most recent call last):
  File
"/gnu/store/2nh3pdr1dpfhcczbzkkr9hzn67bmrcfv-profile/lib/python3.10/site-packages/build/__main__.py",
line 372, in main
    built = build_call(
  File
"/gnu/store/2nh3pdr1dpfhcczbzkkr9hzn67bmrcfv-profile/lib/python3.10/site-packages/build/__main__.py",
line 229, in build_package_via_sdist
    sdist = _build(isolation, builder, outdir, 'sdist', config_settings,
skip_dependency_check)
  File
"/gnu/store/2nh3pdr1dpfhcczbzkkr9hzn67bmrcfv-profile/lib/python3.10/site-packages/build/__main__.py",
line 140, in _build
    return _build_in_isolated_env(builder, outdir, distribution,
config_settings)
  File
"/gnu/store/2nh3pdr1dpfhcczbzkkr9hzn67bmrcfv-profile/lib/python3.10/site-packages/build/__main__.py",
line 108, in _build_in_isolated_env
    env.install(builder.build_system_requires)
  File
"/gnu/store/2nh3pdr1dpfhcczbzkkr9hzn67bmrcfv-profile/lib/python3.10/site-packages/build/env.py",
line 211, in install
    _subprocess(cmd)
  File
"/gnu/store/2nh3pdr1dpfhcczbzkkr9hzn67bmrcfv-profile/lib/python3.10/site-packages/build/env.py",
line 81, in _subprocess
    raise e
  File
"/gnu/store/2nh3pdr1dpfhcczbzkkr9hzn67bmrcfv-profile/lib/python3.10/site-packages/build/env.py",
line 78, in _subprocess
    subprocess.check_output(cmd, stderr=subprocess.STDOUT)
  File
"/gnu/store/fh59bm3ckcj4lxhn1gj4pz5pvci3y87v-python-3.10.7/lib/python3.10/subprocess.py",
line 420, in check_output
    return run(*popenargs, stdout=PIPE, timeout=timeout, check=True,
  File
"/gnu/store/fh59bm3ckcj4lxhn1gj4pz5pvci3y87v-python-3.10.7/lib/python3.10/subprocess.py",
line 524, in run
    raise CalledProcessError(retcode, process.args,
subprocess.CalledProcessError: Command
'['/tmp/build-env-1rwer6ed/bin/python', '-Im', 'pip', 'install',
'--use-pep517', '--no-warn-script-location', '-r',
'/tmp/build-reqs-wkkg8onf.txt']' returned non-zero exit status 1.

ERROR Command '['/tmp/build-env-1rwer6ed/bin/python', '-Im', 'pip',
'install', '--use-pep517', '--no-warn-script-location', '-r',
'/tmp/build-reqs-wkkg8onf.txt']' returned non-zero exit status 1.

I've tried setting the SSL-related env vars but it made no difference.  Any
ideas?

Thanks in advance!
Jake

Reply via email to