Open Xyno-dev opened 6 months ago
You probably need to include maturin
in the list of packages that you install with flatpak-pip-generator
.
I did but I got another error saying that another module wasnt installed, then i added that into the list and it said that i didnt have the rust-compiler installed?
Try adding
sdk-extensions:
- org.freedesktop.Sdk.Extension.rust-stable
build-options:
append-path: /usr/lib/sdk/rust-stable/bin
at the top of your Manifest.
zayan@nolifemachine:~/Documents/Python_Projects/HalalGPT/HalalGPT/flatpak-build$ flatpak-builder /home/zayan/Documents/Python_Projects/HalalGPT/HalalGPT/flatpak-dist /home/zayan/Documents/Python_Projects/HalalGPT/HalalGPT/flatpak-build/io.github.aurapy.halalgpt.yaml --force-clean
(flatpak-builder:15563): Json-WARNING **: 22:09:13.698: Failed to deserialize "build-options" property of type "BuilderOptions" for an object of type "BuilderManifest"
** (flatpak-builder:15563): WARNING **: 22:09:13.700: Unknown property sources for type BuilderManifest
Emptying app dir '/home/zayan/Documents/Python_Projects/HalalGPT/HalalGPT/flatpak-dist'
Downloading sources
Initializing build dir
error: Requested extension org.freedesktop.Sdk.Extension.rust-stable/x86_64/5.15-23.08 not installed
Error: Child process exited with code 1
I ran flatpak install flathub org.freedesktop.Sdk.Extension.rust-stable/x86_64/5.15-23.08
but it couldn't find a match
You need to run
flatpak install org.freedesktop.Sdk.Extension.rust-stable//23.08
to install it
zayan@nolifemachine:~/Documents/Python_Projects/HalalGPT/HalalGPT/flatpak-build$ flatpak-builder /home/zayan/Documents/Python_Projects/HalalGPT/HalalGPT/flatpak-dist ./io.github.aurapy.halalgpt.yaml --force-clean
(flatpak-builder:6586): Json-WARNING **: 19:23:11.124: Failed to deserialize "build-options" property of type "BuilderOptions" for an object of type "BuilderManifest"
** (flatpak-builder:6586): WARNING **: 19:23:11.125: Unknown property sources for type BuilderManifest
Emptying app dir '/home/zayan/Documents/Python_Projects/HalalGPT/HalalGPT/flatpak-dist'
Downloading sources
Starting build of io.github.aurapy.halalgpt
Skipping module PyQtWebEngineApp (no sources)
Cache miss, checking out last cache hit
========================================================================
Building module python3-setuptools-rust in /home/zayan/Documents/Python_Projects/HalalGPT/HalalGPT/flatpak-build/.flatpak-builder/build/python3-setuptools-rust-1
========================================================================
Running: pip3 install --verbose --exists-action=i --no-index --find-links="file://${PWD}" --prefix=${FLATPAK_DEST} "setuptools-rust" --no-build-isolation
Using pip 24.0 from /usr/lib/python3.11/site-packages/pip (python 3.11)
Looking in links: file:///run/build/python3-setuptools-rust
Processing ./setuptools_rust-1.9.0-py3-none-any.whl
Requirement already satisfied: setuptools>=62.4 in /usr/lib/python3.11/site-packages (from setuptools-rust) (69.4.0)
Processing ./semantic_version-2.10.0-py2.py3-none-any.whl (from setuptools-rust)
Installing collected packages: semantic-version, setuptools-rust
Successfully installed semantic-version-2.10.0 setuptools-rust-1.9.0
Committing stage build-python3-setuptools-rust to cache
========================================================================
Building module python3-maturin in /home/zayan/Documents/Python_Projects/HalalGPT/HalalGPT/flatpak-build/.flatpak-builder/build/python3-maturin-4
========================================================================
Running: pip3 install --verbose --exists-action=i --no-index --find-links="file://${PWD}" --prefix=${FLATPAK_DEST} "maturin" --no-build-isolation
Using pip 24.0 from /usr/lib/python3.11/site-packages/pip (python 3.11)
Looking in links: file:///run/build/python3-maturin
Processing ./maturin-1.5.1.tar.gz
Running command Preparing metadata (pyproject.toml)
/usr/lib/python3.11/site-packages/setuptools/config/_apply_pyprojecttoml.py:83: SetuptoolsWarning: `install_requires` overwritten in `pyproject.toml` (dependencies)
corresp(dist, value, root_dir)
running dist_info
creating /tmp/pip-modern-metadata-2t_hiomg/maturin.egg-info
writing /tmp/pip-modern-metadata-2t_hiomg/maturin.egg-info/PKG-INFO
writing dependency_links to /tmp/pip-modern-metadata-2t_hiomg/maturin.egg-info/dependency_links.txt
writing requirements to /tmp/pip-modern-metadata-2t_hiomg/maturin.egg-info/requires.txt
writing top-level names to /tmp/pip-modern-metadata-2t_hiomg/maturin.egg-info/top_level.txt
writing manifest file '/tmp/pip-modern-metadata-2t_hiomg/maturin.egg-info/SOURCES.txt'
ERROR setuptools_scm._file_finders.git listing git files failed - pretending there aren't any
reading manifest file '/tmp/pip-modern-metadata-2t_hiomg/maturin.egg-info/SOURCES.txt'
reading manifest template 'MANIFEST.in'
warning: no files found matching '*.json' under directory 'src/python_interpreter'
writing manifest file '/tmp/pip-modern-metadata-2t_hiomg/maturin.egg-info/SOURCES.txt'
creating '/tmp/pip-modern-metadata-2t_hiomg/maturin-1.5.1.dist-info'
Preparing metadata (pyproject.toml) ... done
Building wheels for collected packages: maturin
Running command Building wheel for maturin (pyproject.toml)
/usr/lib/python3.11/site-packages/setuptools/config/_apply_pyprojecttoml.py:83: SetuptoolsWarning: `install_requires` overwritten in `pyproject.toml` (dependencies)
corresp(dist, value, root_dir)
running bdist_wheel
running build
running build_py
creating build
creating build/lib.linux-x86_64-cpython-311
creating build/lib.linux-x86_64-cpython-311/maturin
copying maturin/__init__.py -> build/lib.linux-x86_64-cpython-311/maturin
copying maturin/__main__.py -> build/lib.linux-x86_64-cpython-311/maturin
copying maturin/import_hook.py -> build/lib.linux-x86_64-cpython-311/maturin
running egg_info
creating maturin.egg-info
writing maturin.egg-info/PKG-INFO
writing dependency_links to maturin.egg-info/dependency_links.txt
writing requirements to maturin.egg-info/requires.txt
writing top-level names to maturin.egg-info/top_level.txt
writing manifest file 'maturin.egg-info/SOURCES.txt'
ERROR setuptools_scm._file_finders.git listing git files failed - pretending there aren't any
reading manifest file 'maturin.egg-info/SOURCES.txt'
reading manifest template 'MANIFEST.in'
warning: no files found matching '*.json' under directory 'src/python_interpreter'
writing manifest file 'maturin.egg-info/SOURCES.txt'
running build_ext
running build_rust
error: can't find Rust compiler
If you are using an outdated pip version, it is possible a prebuilt wheel is available for this package but pip is not able to install from it. Installing from the wheel would avoid the need for a Rust compiler.
To update pip, run:
pip install --upgrade pip
and then retry package installation.
If you did intend to build this package from source, try installing a Rust compiler from your system package manager and ensure it is on the PATH during installation. Alternatively, rustup (available at https://rustup.rs) is the recommended way to download and update the Rust compiler toolchain.
error: subprocess-exited-with-error
× Building wheel for maturin (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: /usr/bin/python /usr/lib/python3.11/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py build_wheel /tmp/tmpw2hxc2em
cwd: /tmp/pip-install-7ikrmdg_/maturin_a660c3fdbe6646a482022c4c72bc6491
Building wheel for maturin (pyproject.toml) ... error
ERROR: Failed building wheel for maturin
Failed to build maturin
ERROR: Could not build wheels for maturin, which is required to install pyproject.toml-based projects
Error: module python3-maturin: Child process exited with code 1
same error :sob:
Can you post your full Manifest?
I am trying to turn my pyqt5 application into a flatpak but when i run
flatpak-builder <My-Build-Directory> <Manifest>
I get the errorModuleNotFoundError: No module named 'maturin'
when installing the OpenAI module.If it helps, here is my manifest file:
and here is my requirements file generated using flatpak-pip-generator:
please help and ask if you need further details, thanks.