-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Description
Describe the bug
As seen in This discussion, setuptools has taken a stricter stance on versioning via the PyPA specifiers. The relevant change is with local version specifiers:
Local version identifiers MUST comply with the following scheme:
<public version identifier>[+<local version label>]
They consist of a normal public version identifier (as defined in the previous section), along with an arbitrary “local version label”, separated from the public version identifier by a plus. Local version labels have no specific semantics assigned, but some syntactic restrictions are imposed.
The current code for versioning (found in meshroom/__init__.py) appends a minus symbol instead of following this semantic (line 17):
if __version_status__ is VersionStatus.develop:
__version__ += "-" + __version_status__.nameThis causes issues when attempting certain automated tasks (such as building via docker).
To Reproduce
Steps to reproduce the behavior:
- Set up a normal docker build using the scripts in the
docker/directory. In my case, I usedbuild-ubuntu.sh - Wait for the final build in the script, the
Dockerfile_ubuntuone, to start
Expected behavior
The docker build completes as expected.
Log
(Cropped to the relevant info)
#11 [ 7/16] WORKDIR /opt/Meshroom
#11 CACHED
#12 [ 8/16] RUN python setup.py install_exe -d "/opt/Meshroom_bundle" && find /opt/Meshroom_bundle -name "*Qt6Web*" -delete && find /opt/Meshroom_bundle -name "*Qt6Designer*" -delete && rm -rf /opt/Meshroom_bundle/lib/PySide6/typesystems/ /opt/Meshroom_bundle/lib/PySide6/examples/ /opt/Meshroom_bundle/lib/PySide6/include/ /opt/Meshroom_bundle/lib/PySide6/Qt/translations/ /opt/Meshroom_bundle/lib/PySide6/Qt/resources/ /opt/Meshroom_bundle/lib/PySide6/QtWeb* /opt/Meshroom_bundle/lib/PySide6/rcc /opt/Meshroom_bundle/lib/PySide6/designer
#12 0.523 /usr/local/lib/python3.11/dist-packages/setuptools/__init__.py:94: _DeprecatedInstaller: setuptools.installer and fetch_build_eggs are deprecated.
#12 0.523 !!
#12 0.523
#12 0.523 ********************************************************************************
#12 0.523 Requirements should be satisfied by a PEP 517 installer.
#12 0.523 If you are using pip, you can try `pip install --use-pep517`.
#12 0.523 ********************************************************************************
#12 0.523
#12 0.523 !!
#12 0.523 dist.fetch_build_eggs(dist.setup_requires)
#12 0.553 Traceback (most recent call last):
#12 0.553 File "/opt/Meshroom/setup.py", line 130, in <module>
#12 0.553 setup(
#12 0.553 File "/usr/local/lib/python3.11/dist-packages/cx_Freeze/__init__.py", line 66, in setup
#12 0.553 return setuptools.setup(**attrs)
#12 0.553 ^^^^^^^^^^^^^^^^^^^^^^^^^
#12 0.553 File "/usr/local/lib/python3.11/dist-packages/setuptools/__init__.py", line 117, in setup
#12 0.553 return distutils.core.setup(**attrs)
#12 0.553 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
#12 0.553 File "/usr/local/lib/python3.11/dist-packages/setuptools/_distutils/core.py", line 148, in setup
#12 0.553 _setup_distribution = dist = klass(attrs)
#12 0.553 ^^^^^^^^^^^^
#12 0.553 File "/usr/local/lib/python3.11/dist-packages/setuptools/dist.py", line 330, in __init__
#12 0.553 self.metadata.version = self._normalize_version(self.metadata.version)
#12 0.553 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
#12 0.553 File "/usr/local/lib/python3.11/dist-packages/setuptools/dist.py", line 366, in _normalize_version
#12 0.553 normalized = str(Version(version))
#12 0.553 ^^^^^^^^^^^^^^^^
#12 0.553 File "/usr/local/lib/python3.11/dist-packages/packaging/version.py", line 202, in __init__
#12 0.553 raise InvalidVersion(f"Invalid version: {version!r}")
#12 0.553 packaging.version.InvalidVersion: Invalid version: '2025.1.0-develop'
#12 ERROR: process "/bin/sh -c python setup.py install_exe -d \"${MESHROOM_BUNDLE}\" && find ${MESHROOM_BUNDLE} -name \"*Qt6Web*\" -delete && find ${MESHROOM_BUNDLE} -name \"*Qt6Designer*\" -delete && rm -rf ${MESHROOM_BUNDLE}/lib/PySide6/typesystems/ ${MESHROOM_BUNDLE}/lib/PySide6/examples/ ${MESHROOM_BUNDLE}/lib/PySide6/include/ ${MESHROOM_BUNDLE}/lib/PySide6/Qt/translations/ ${MESHROOM_BUNDLE}/lib/PySide6/Qt/resources/ ${MESHROOM_BUNDLE}/lib/PySide6/QtWeb* ${MESHROOM_BUNDLE}/lib/PySide6/rcc ${MESHROOM_BUNDLE}/lib/PySide6/designer" did not complete successfully: exit code: 1
------
> [ 8/16] RUN python setup.py install_exe -d "/opt/Meshroom_bundle" && find /opt/Meshroom_bundle -name "*Qt6Web*" -delete && find /opt/Meshroom_bundle -name "*Qt6Designer*" -delete && rm -rf /opt/Meshroom_bundle/lib/PySide6/typesystems/ /opt/Meshroom_bundle/lib/PySide6/examples/ /opt/Meshroom_bundle/lib/PySide6/include/ /opt/Meshroom_bundle/lib/PySide6/Qt/translations/ /opt/Meshroom_bundle/lib/PySide6/Qt/resources/ /opt/Meshroom_bundle/lib/PySide6/QtWeb* /opt/Meshroom_bundle/lib/PySide6/rcc /opt/Meshroom_bundle/lib/PySide6/designer:
0.553 ^^^^^^^^^^^^
0.553 File "/usr/local/lib/python3.11/dist-packages/setuptools/dist.py", line 330, in __init__
0.553 self.metadata.version = self._normalize_version(self.metadata.version)
0.553 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
0.553 File "/usr/local/lib/python3.11/dist-packages/setuptools/dist.py", line 366, in _normalize_version
0.553 normalized = str(Version(version))
0.553 ^^^^^^^^^^^^^^^^
0.553 File "/usr/local/lib/python3.11/dist-packages/packaging/version.py", line 202, in __init__
0.553 raise InvalidVersion(f"Invalid version: {version!r}")
0.553 packaging.version.InvalidVersion: Invalid version: '2025.1.0-develop'
------
2 warnings found (use docker --debug to expand):
- InvalidDefaultArgInFrom: Default value for ARG alicevision/meshroom-deps:${MESHROOM_VERSION}-av${AV_VERSION}-ubuntu${UBUNTU_VERSION}-cuda${CUDA_VERSION} results in empty or invalid base image name (line 5)
- UndefinedVar: Usage of undefined variable '$MESHROOM_BUNDLE' (line 12)
Dockerfile_ubuntu:27
--------------------
26 |
27 | >>> RUN python setup.py install_exe -d "${MESHROOM_BUNDLE}" && \
28 | >>> find ${MESHROOM_BUNDLE} -name "*Qt6Web*" -delete && \
29 | >>> find ${MESHROOM_BUNDLE} -name "*Qt6Designer*" -delete && \
30 | >>> rm -rf ${MESHROOM_BUNDLE}/lib/PySide6/typesystems/ \
31 | >>> ${MESHROOM_BUNDLE}/lib/PySide6/examples/ \
32 | >>> ${MESHROOM_BUNDLE}/lib/PySide6/include/ \
33 | >>> ${MESHROOM_BUNDLE}/lib/PySide6/Qt/translations/ \
34 | >>> ${MESHROOM_BUNDLE}/lib/PySide6/Qt/resources/ \
35 | >>> ${MESHROOM_BUNDLE}/lib/PySide6/QtWeb* \
36 | >>> ${MESHROOM_BUNDLE}/lib/PySide6/rcc \
37 | >>> ${MESHROOM_BUNDLE}/lib/PySide6/designer
38 |
--------------------
ERROR: failed to solve: process "/bin/sh -c python setup.py install_exe -d \"${MESHROOM_BUNDLE}\" && find ${MESHROOM_BUNDLE} -name \"*Qt6Web*\" -delete && find ${MESHROOM_BUNDLE} -name \"*Qt6Designer*\" -delete && rm -rf ${MESHROOM_BUNDLE}/lib/PySide6/typesystems/ ${MESHROOM_BUNDLE}/lib/PySide6/examples/ ${MESHROOM_BUNDLE}/lib/PySide6/include/ ${MESHROOM_BUNDLE}/lib/PySide6/Qt/translations/ ${MESHROOM_BUNDLE}/lib/PySide6/Qt/resources/ ${MESHROOM_BUNDLE}/lib/PySide6/QtWeb* ${MESHROOM_BUNDLE}/lib/PySide6/rcc ${MESHROOM_BUNDLE}/lib/PySide6/designer" did not complete successfully: exit code: 1
Note the packaging.version.InvalidVersion: Invalid version: '2025.1.0-develop' line.
Desktop (please complete the following and other pertinent information):
- OS: Ubuntu 25.04
- Python version 13.11.13
- Qt/PySide version: As per Dockerfile
- Building on commit
494cfe6a7a4adc3bcc5c2390446f51ba4ed28d1a
Resolution
Simply replacing the - symbol with a + in the __init__.py file fixes the issue (line 18):
if __version_status__ is VersionStatus.develop:
__version__ += "+" + __version_status__.name