So, I’m trying to make a FlatPak of the Amulet Minecraft Map Editor, which is built in Python, (Flatpak requires everything to be built from source to maintain sandboxing, including all the Python modules). The flatpak build process runs smoothly until it comes to lz4
at which point I get this fatal error during the build:
========================================================================
Building module python3-lz4 in /home/evilsupahfly/src/Flatpak Testing/.flatpak-builder/build/python3-lz4-2
========================================================================
Running: pip3 install --verbose --exists-action=i --no-index --find-links="file://${PWD}" --prefix=${FLATPAK_DEST} "lz4~=4.3" --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-lz4
Processing ./lz4-4.3.3.tar.gz
Running command Preparing metadata (pyproject.toml)
/usr/lib/python3.11/site-packages/setuptools/_distutils/dist.py:266: UserWarning: Unknown distribution option: 'use_scm_version'
warnings.warn(msg)
running dist_info
creating /tmp/pip-modern-metadata-aum609f4/lz4.egg-info
writing /tmp/pip-modern-metadata-aum609f4/lz4.egg-info/PKG-INFO
writing dependency_links to /tmp/pip-modern-metadata-aum609f4/lz4.egg-info/dependency_links.txt
writing requirements to /tmp/pip-modern-metadata-aum609f4/lz4.egg-info/requires.txt
writing top-level names to /tmp/pip-modern-metadata-aum609f4/lz4.egg-info/top_level.txt
writing manifest file '/tmp/pip-modern-metadata-aum609f4/lz4.egg-info/SOURCES.txt'
reading manifest file '/tmp/pip-modern-metadata-aum609f4/lz4.egg-info/SOURCES.txt'
reading manifest template 'MANIFEST.in'
adding license file 'LICENSE'
writing manifest file '/tmp/pip-modern-metadata-aum609f4/lz4.egg-info/SOURCES.txt'
creating '/tmp/pip-modern-metadata-aum609f4/lz4-0.0.0.dist-info'
Preparing metadata (pyproject.toml) ... done
WARNING: Requested lz4~=4.3 from file:///run/build/python3-lz4/lz4-4.3.3.tar.gz, but installing version 0.0.0
Discarding file:///run/build/python3-lz4/lz4-4.3.3.tar.gz: Requested lz4~=4.3 from file:///run/build/python3-lz4/lz4-4.3.3.tar.gz has inconsistent version: expected '4.3.3', but metadata has '0.0.0'
ERROR: Could not find a version that satisfies the requirement lz4~=4.3 (from versions: 4.3.3)
ERROR: No matching distribution found for lz4~=4.3
Error: module python3-lz4: Child process exited with code 1
I’ve checked all the references to lz4
in the python source, and they all say 4.3
so I don’t know where version 0.0.0
is coming from nor do I know how to remedy this.
** Edit:
In case anybody needs it, my requires.txt
is as follows:
lz4~=4.3
versioneer>=0.29
meson-python==0.16.0
meson==0.63.3
cython>=3.0.0a9
setuptools>=60
pre-commit>=1.11.1
wheel>=0.37.1
pillow>=10.0.1
wxpython>=4.2.1
numpy>=1.17
pyopengl>=3.1.0
pyopengl-accelerate~=3.0
packaging>=21.3
amulet-core>=1.9
amulet-nbt>=1.1
amulet-map-editor>=0.10.34
pymctranslate>=1.2
minecraft-resource-pack>=1.3
platformdirs>=3.1
sphinx>=1.7.4
sphinx-autodoc-typehints>=1.3.0
sphinx-rtd-theme>=0.3.1