flatpak-builder-tools
flatpak-builder-tools copied to clipboard
flatpak-pip-generator failed to generate proper astropy, ModuleNotFoundError: No module named 'numpy'
Running,
./flatpak-pip-generator astropy
{
"name": "python3-astropy",
"buildsystem": "simple",
"build-commands": [
"pip3 install --verbose --exists-action=i --no-index --find-links=\"file://${PWD}\" --prefix=${FLATPAK_DEST} \"astropy\" --no-build-isolation"
],
"sources": [
{
"type": "file",
"url": "https://files.pythonhosted.org/packages/a0/34/895006117f6fce0b4de045c87e154ee4a20c68ec0a4c9a36d900888fb6bc/pyparsing-3.0.6-py3-none-any.whl",
"sha256": "04ff808a5b90911829c55c4e26f75fa5ca8a2f5f36aa3a51f68e27033341d3e4"
},
{
"type": "file",
"url": "https://files.pythonhosted.org/packages/78/fd/0148f0e54f0c6f48a141409df65d74a5f1dae2e139f23d50a43c58c16098/pyerfa-2.0.0.1.tar.gz",
"sha256": "2fd4637ffe2c1e6ede7482c13f583ba7c73119d78bef90175448ce506a0ede30"
},
{
"type": "file",
"url": "https://files.pythonhosted.org/packages/05/8e/8de486cbd03baba4deef4142bd643a3e7bbe954a784dc1bb17142572d127/packaging-21.3-py3-none-any.whl",
"sha256": "ef103e05f519cdc783ae24ea4e2e0f508a9c99b2d4969652eed6a2e1ea5bd522"
},
{
"type": "file",
"url": "https://files.pythonhosted.org/packages/36/2b/61d51a2c4f25ef062ae3f74576b01638bebad5e045f747ff12643df63844/PyYAML-6.0.tar.gz",
"sha256": "68fb519c14306fec9720a2a5b45bc9f0c8d1b9c72adf45c37baedfcd949c35a2"
},
{
"type": "file",
"url": "https://files.pythonhosted.org/packages/0a/c8/a62767a6b374a0dfb02d2a0456e5f56a372cdd1689dbc6ffb6bf1ddedbc0/numpy-1.22.1.zip",
"sha256": "e348ccf5bc5235fc405ab19d53bec215bb373300e5523c7b476cc0da8a5e9973"
},
{
"type": "file",
"url": "https://files.pythonhosted.org/packages/82/f0/fc3f6f250bb9d5e5aaa890469fb27c4edee66cf0e2ea4f8b0b287260c6f8/astropy-5.0.tar.gz",
"sha256": "70203e151e13292586a817b4069ce1aad4643567aff38b1d191c173bc54f3927"
}
]
}
However, trying to build it will fail.
========================================================================
Building module python3-astropy in /home/andy/Desktop/Flatpak/io.github.veusz.Veusz/.flatpak-builder/build/python3-astropy-5
========================================================================
Running: pip3 install --verbose --exists-action=i --no-index --find-links="file://${PWD}" --prefix=${FLATPAK_DEST} "astropy" --no-build-isolation
Using pip 21.3.1 from /usr/lib/python3.8/site-packages/pip (python 3.8)
Looking in links: file:///run/build/python3-astropy
Processing ./astropy-5.0.tar.gz
Running command /usr/bin/python3 /usr/lib/python3.8/site-packages/pip/_vendor/pep517/in_process/_in_process.py prepare_metadata_for_build_wheel /tmp/tmpi7o4m086
Traceback (most recent call last):
File "/usr/lib/python3.8/site-packages/pip/_vendor/pep517/in_process/_in_process.py", line 363, in <module>
main()
File "/usr/lib/python3.8/site-packages/pip/_vendor/pep517/in_process/_in_process.py", line 345, in main
json_out['return_val'] = hook(**hook_input['kwargs'])
File "/usr/lib/python3.8/site-packages/pip/_vendor/pep517/in_process/_in_process.py", line 164, in prepare_metadata_for_build_wheel
return hook(metadata_directory, config_settings)
File "/usr/lib/python3.8/site-packages/setuptools/build_meta.py", line 161, in prepare_metadata_for_build_wheel
self.run_setup()
File "/usr/lib/python3.8/site-packages/setuptools/build_meta.py", line 145, in run_setup
exec(compile(code, __file__, 'exec'), locals())
File "setup.py", line 68, in <module>
setup(ext_modules=get_extensions())
File "/app/lib/python3.8/site-packages/extension_helpers/_setup_helpers.py", line 48, in get_extensions
for setuppkg in iter_setup_packages(srcdir, packages):
File "/app/lib/python3.8/site-packages/extension_helpers/_setup_helpers.py", line 109, in iter_setup_packages
module = import_file(setup_package,
File "/app/lib/python3.8/site-packages/extension_helpers/_utils.py", line 194, in import_file
mod = loader.load_module()
File "<frozen importlib._bootstrap_external>", line 522, in _check_name_wrapper
File "<frozen importlib._bootstrap_external>", line 1022, in load_module
File "<frozen importlib._bootstrap_external>", line 847, in load_module
File "<frozen importlib._bootstrap>", line 265, in _load_module_shim
File "<frozen importlib._bootstrap>", line 702, in _load
File "<frozen importlib._bootstrap>", line 671, in _load_unlocked
File "<frozen importlib._bootstrap_external>", line 843, in exec_module
File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
File "./astropy/wcs/setup_package.py", line 14, in <module>
import numpy
ModuleNotFoundError: No module named 'numpy'
Preparing metadata (pyproject.toml) ... error
WARNING: Discarding file:///run/build/python3-astropy/astropy-5.0.tar.gz. Command errored out with exit status 1: /usr/bin/python3 /usr/lib/python3.8/site-packages/pip/_vendor/pep517/in_process/_in_process.py prepare_metadata_for_build_wheel /tmp/tmpi7o4m086 Check the logs for full command output.
ERROR: Could not find a version that satisfies the requirement astropy (from versions: 5.0)
ERROR: No matching distribution found for astropy
Error: module python3-astropy: Child process exited with code 1
But numpy is there. So why?
It looks like any package contains NumPy will throw this error. I tried to install NumPy and pandas, same error. Maybe because building NumPy on itself is a hassle, It will be nicer if the pip gets a pre compiled package instead of building it from scratch.