I’m using flatpak-pip-generator to create a portable python virtual environment. Many of the pip3 requirements are met but I am stuck at bcrypt requiring cffi and not finding the bdist_wheel program.
How should I proceed?
========================================================================
Building module python3-bcrypt in /home/jreynolds/btbits/x64_btbits/tools/flatpak/ct_flatpak_py3-08/.flatpak-builder/build/python3-bcrypt-1
========================================================================
Running: pip3 install --verbose --exists-action=i --no-index --find-links="file://${PWD}" --prefix=${FLATPAK_DEST} "bcrypt==3.1.3" --no-build-isolation
FB: Running: flatpak build --die-with-parent --env=FLATPAK_BUILDER_BUILDDIR=/run/build/python3-bcrypt --nofilesystem=host:reset --filesystem=/home/jreynolds/btbits/x64_btbits/tools/flatpak/ct_flatpak_py3-08/.fla
tpak-builder/build/python3-bcrypt-1 --bind-mount=/run/build/python3-bcrypt=/home/jreynolds/btbits/x64_btbits/tools/flatpak/ct_flatpak_py3-08/.flatpak-builder/build/python3-bcrypt-1 --build-dir=/run/build/python3
-bcrypt --bind-mount=/run/ccache=/home/jreynolds/btbits/x64_btbits/tools/flatpak/ct_flatpak_py3-08/.flatpak-builder/ccache --env=SOURCE_DATE_EPOCH=1716936933 '--env=CFLAGS=-O2 -g -pipe -Wp,-D_FORTIFY_SOURCE=2 -W
p,-D_GLIBCXX_ASSERTIONS -fexceptions -fstack-protector-strong -grecord-gcc-switches -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -fno-omit-frame-pointer ' '--env=CXXFLAGS=-O2 -g -pipe -W
p,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fexceptions -fstack-protector-strong -grecord-gcc-switches -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -fno-omit-frame-pointer ' '--env=
LDFLAGS=-L/app/lib -Wl,-z,relro,-z,now -Wl,--as-needed ' --env=CCACHE_DIR=/run/ccache/disabled --env=PATH=/app/bin:/usr/bin --env=LD_LIBRARY_PATH=/app/lib --env=PKG_CONFIG_PATH=/app/lib/pkgconfig:/app/share/pkgc
onfig:/usr/lib/pkgconfig:/usr/share/pkgconfig --env=FLATPAK_BUILDER_N_JOBS=16 /home/jreynolds/btbits/x64_btbits/tools/flatpak/ct_flatpak_py3-08/.flatpak-builder/rofiles/rofiles-YGznuM /bin/sh -c 'pip3 install --
verbose --exists-action=i --no-index --find-links="file://${PWD}" --prefix=${FLATPAK_DEST} "bcrypt==3.1.3" --no-build-isolation'
Using pip 23.0.1 from /app/lib/python3.8/site-packages/pip (python 3.8)
Looking in links: file:///run/build/python3-bcrypt
Processing ./bcrypt-3.1.3.tar.gz
Running command python setup.py egg_info
running egg_info
creating /tmp/pip-pip-egg-info-3u5rru6b/bcrypt.egg-info
writing /tmp/pip-pip-egg-info-3u5rru6b/bcrypt.egg-info/PKG-INFO
writing dependency_links to /tmp/pip-pip-egg-info-3u5rru6b/bcrypt.egg-info/dependency_links.txt
writing requirements to /tmp/pip-pip-egg-info-3u5rru6b/bcrypt.egg-info/requires.txt
writing top-level names to /tmp/pip-pip-egg-info-3u5rru6b/bcrypt.egg-info/top_level.txt
writing manifest file '/tmp/pip-pip-egg-info-3u5rru6b/bcrypt.egg-info/SOURCES.txt'
adding license file 'LICENSE' (matched pattern 'LICEN[CS]E*')
reading manifest file '/tmp/pip-pip-egg-info-3u5rru6b/bcrypt.egg-info/SOURCES.txt'
reading manifest template 'MANIFEST.in'
warning: no previously-included files found matching 'requirements.txt'
warning: no previously-included files found matching 'tasks.py'
warning: no previously-included files found matching '.travis.yml'
warning: no previously-included files found matching 'wheel-scripts'
warning: no previously-included files matching '*' found under directory 'wheel-scripts'
no previously-included directories found matching '.travis'
writing manifest file '/tmp/pip-pip-egg-info-3u5rru6b/bcrypt.egg-info/SOURCES.txt'
Preparing metadata (setup.py) ... done
Processing ./cffi-1.16.0.tar.gz
Running command Preparing metadata (pyproject.toml)
running dist_info
creating /tmp/pip-modern-metadata-bz5l4asz/cffi.egg-info
writing /tmp/pip-modern-metadata-bz5l4asz/cffi.egg-info/PKG-INFO
writing dependency_links to /tmp/pip-modern-metadata-bz5l4asz/cffi.egg-info/dependency_links.txt
writing entry points to /tmp/pip-modern-metadata-bz5l4asz/cffi.egg-info/entry_points.txt
writing requirements to /tmp/pip-modern-metadata-bz5l4asz/cffi.egg-info/requires.txt
writing top-level names to /tmp/pip-modern-metadata-bz5l4asz/cffi.egg-info/top_level.txt
writing manifest file '/tmp/pip-modern-metadata-bz5l4asz/cffi.egg-info/SOURCES.txt'
warning: the 'license_file' option is deprecated, use 'license_files' instead
adding license file 'LICENSE' (matched pattern 'LICENSE')
reading manifest file '/tmp/pip-modern-metadata-bz5l4asz/cffi.egg-info/SOURCES.txt'
reading manifest template 'MANIFEST.in'
writing manifest file '/tmp/pip-modern-metadata-bz5l4asz/cffi.egg-info/SOURCES.txt'
creating '/tmp/pip-modern-metadata-bz5l4asz/cffi.dist-info'
error: invalid command 'bdist_wheel'
error: subprocess-exited-with-error
× Preparing metadata (pyproject.toml) 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.
full command: /app/bin/python3.8 /app/lib/python3.8/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py prepare_metadata_for_build_wheel /tmp/tmp5cf5l786
cwd: /tmp/pip-install-m0579kkg/cffi_30dd7ea396c24848be0f16e03b847b15
Preparing metadata (pyproject.toml) ... error
error: metadata-generation-failed
× Encountered error while generating package metadata.
╰─> See above for output.
note: This is an issue with the package mentioned above, not pip.
hint: See above for details.
Error: module python3-bcrypt: Child process exited with code 1
make: *** [Makefile:64: com.candelatech.py3-08.flatpak] Error 1
Requirements txt:
$ cat requirements.0.txt ; echo "----"; cat requirements.1.txt
wheel==0.43.0
requirements-parser==0.9.0
pipdeptree==2.16.0
pybind11==2.12.0
----
wheel==0.43.0
bcrypt==3.1.3
There are no errors running flatpak-pip-generator. The problem comes with the bundle step when it is building the cffi dependency of bcrypt. The resulting requirements.json file does not list wheel because it finds it as a system tool.
Requirements.0.json:
"name": "requirements.0",
"buildsystem": "simple",
"build-commands": [],
"modules": [
{
"name": "python3-cffi",
"buildsystem": "simple",
"build-commands": [
"pip3 install --verbose --exists-action=i --no-index --find-links=\"file://${PWD}\" --prefix=${FLATPAK_DEST} \"cffi>=1.1\" --no-build-isolation"
],
"sources": [
{
"type": "file",
"url": "https://files.pythonhosted.org/packages/68/ce/95b0bae7968c65473e1298efb042e10cafc7bafc14d9e4f154008241c91d/cffi-1.16.0.tar.gz",
"sha256": "bcb3ef43e58665bbda2fb198698fcae6776483e0c4a631aa5647806c25e02cc0"
},
{
"type": "file",
"url": "https://files.pythonhosted.org/packages/13/a3/a812df4e2dd5696d1f351d58b8fe16a405b234ad2886a0dab9183fb78109/pycparser-2.22-py3-none-any.whl",
"sha256": "c3702b6d3dd8c7abc1afa565d7e63d53a1d0bd86cdc24edd75470f4de499cfcc"
}
]
},
{
"name": "python3-requirements-parser",
"buildsystem": "simple",
"build-commands": [
"pip3 install --verbose --exists-action=i --no-index --find-links=\"file://${PWD}\" --prefix=${FLATPAK_DEST} \"requirements-parser==0.9.0\" --no-build-isolation"
],
"sources": [
{
"type": "file",
"url": "https://files.pythonhosted.org/packages/2d/2e/d83d239cbf8a18f9400de46b9204c2fa8899f9347e771009aafb27858def/requirements_parser-0.9.0-py3-none-any.whl",
"sha256": "40298fd2bb423798fc52ca4550adf1944d75c998fd2316b5b6959842dbc70a32"
},
{
"type": "file",
"url": "https://files.pythonhosted.org/packages/18/2e/4843f4c64fc0d4b238ab3ebd548bb878e9c827ab2546da46d8e7ad530bfa/types_setuptools-70.0.0.20240524-py3-none-any.whl",
"sha256": "8f5379b9948682d72a9ab531fbe52932e84c4f38deda570255f9bae3edd766bc"
}
]
},
{
"name": "python3-pipdeptree",
"buildsystem": "simple",
"build-commands": [
"pip3 install --verbose --exists-action=i --no-index --find-links=\"file://${PWD}\" --prefix=${FLATPAK_DEST} \"pipdeptree==2.16.0\" --no-build-isolation"
],
"sources": [
{
"type": "file",
"url": "https://files.pythonhosted.org/packages/ed/4b/bf2a5530acfe55dd0350486c421549cf4a5411e331affbb2f00fdfd15bb7/pipdeptree-2.16.0-py3-none-any.whl",
"sha256": "77b5f8a942eaea83599b76459ad8ff908e60065a3055e09d49dcab3eb0077f3c"
}
]
},
{
"name": "python3-pybind11",
"buildsystem": "simple",
"build-commands": [
"pip3 install --verbose --exists-action=i --no-index --find-links=\"file://${PWD}\" --prefix=${FLATPAK_DEST} \"pybind11==2.12.0\" --no-build-isolation"
],
"sources": [
{
"type": "file",
"url": "https://files.pythonhosted.org/packages/26/55/e776489172f576b782e616f58273e1f3de56a91004b0d20504169dd345af/pybind11-2.12.0-py3-none-any.whl",
"sha256": "df8d60b94f9e714d81013db233393d430ebf9f3551642b82291cf1b14d1afdbd"
}
]
}
]
}