strictdoc-project / strictdoc

Software for technical documentation and requirements management.
https://strictdoc.readthedocs.io/en/stable/
Other
159 stars 25 forks source link

Task release-pyinstaller seems broken #1091

Closed RobertoBagnara closed 1 year ago

RobertoBagnara commented 1 year ago

This happens on Ubuntu 20.04.

$ git clone https://github.com/strictdoc-project/strictdoc.git
Cloning into 'strictdoc'...
remote: Enumerating objects: 24600, done.
remote: Counting objects: 100% (440/440), done.
remote: Compressing objects: 100% (233/233), done.
remote: Total 24600 (delta 214), reused 268 (delta 201), pack-reused 24160
Receiving objects: 100% (24600/24600), 23.59 MiB | 20.70 MiB/s, done.
Resolving deltas: 100% (16135/16135), done.
$ cd strictdoc/
$ invoke -c tasks release-pyinstaller
pip install pyinstaller toml && python developer/pip_install_strictdoc_deps.py && pyinstaller --clean --name strictdoc --noconfirm --additional-hooks-dir developer/pyinstaller_hooks --distpath /tmp/strictdoc --hidden-import strictdoc.server.app --add-data strictdoc/export/html/templates:templates/html --add-data strictdoc/export/rst/templates:templates/rst --add-data strictdoc/export/html/_static:_static --add-data strictdoc/export/html/_static_extra:_static_extra strictdoc/cli/main.py
Defaulting to user installation because normal site-packages is not writeable
Requirement already satisfied: pyinstaller in /home/roberto/.local/lib/python3.10/site-packages (5.9.0)
Requirement already satisfied: toml in /usr/lib/python3/dist-packages (0.10.2)
Requirement already satisfied: altgraph in /home/roberto/.local/lib/python3.10/site-packages (from pyinstaller) (0.17.3)
Requirement already satisfied: setuptools>=42.0.0 in /usr/lib/python3/dist-packages (from pyinstaller) (59.6.0)
Requirement already satisfied: pyinstaller-hooks-contrib>=2021.4 in /home/roberto/.local/lib/python3.10/site-packages (from pyinstaller) (2023.1)
pip_install_strictdoc_deps.py: checking if the current Python environment has all packages installed.
Traceback (most recent call last):
  File "/tmp/test/strictdoc/developer/pip_install_strictdoc_deps.py", line 26, in <module>
    pkg_resources.require(dependencies)
  File "/usr/lib/python3/dist-packages/pkg_resources/__init__.py", line 891, in require
    needed = self.resolve(parse_requirements(requirements))
  File "/usr/lib/python3/dist-packages/pkg_resources/__init__.py", line 782, in resolve
    raise VersionConflict(dist, req).with_context(dependent_req)
pkg_resources.VersionConflict: (reqif 0.0.27 (/usr/local/lib/python3.10/dist-packages), Requirement.parse('reqif==0.*,>=0.0.33'))
stanislaw commented 1 year ago

This is something that I will fix soon: if there is a VersionConflict, do a full upgrade of all dependencies.

Before the fix is in place, the error message is suggesting that your reqif version is quite outdated:

pkg_resources.VersionConflict: (reqif 0.0.27 (/usr/local/lib/python3.10/dist-packages), Requirement.parse('reqif==0.*,>=0.0.33'))

Notice that you seem to have both system-wide and user-level packages:

/usr/lib/python3/dist-packages
/usr/local/lib/python3.10/dist-packages
/home/roberto/.local/lib/python3.10/site-packages 

Do/did you install some packages with sudo and some not? Stick to one way of installing, otherwise, things can get to undefined behavior.