Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

packaging.version.InvalidVersion: Invalid version: '2.10.1.Ludicrous.Lemur' #608

Closed
RayOfLight1 opened this issue Jan 27, 2023 · 1 comment
Labels
topic-compiling Related to building rmlint from source topic-gui

Comments

@RayOfLight1
Copy link

I get an error such as:

Traceback (most recent call last):
  File "/var/tmp/portage/app-misc/rmlint-2.10.1/work/rmlint-2.10.1/gui/setup.py", line 63, in <module>
    setup(
  File "/usr/lib/python3.10/site-packages/setuptools/_distutils/core.py", line 185, in setup
    return run_commands(dist)                                                                                                                                                                                                                                                                                                                                                                  File "/usr/lib/python3.10/site-packages/setuptools/_distutils/core.py", line 201, in run_commands
    dist.run_commands()
  File "/usr/lib/python3.10/site-packages/setuptools/_distutils/dist.py", line 969, in run_commands
    self.run_command(cmd)
  File "/usr/lib/python3.10/site-packages/setuptools/dist.py", line 1213, in run_command
    super().run_command(command)
  File "/usr/lib/python3.10/site-packages/setuptools/_distutils/dist.py", line 988, in run_command
    cmd_obj.run()
  File "/var/tmp/portage/app-misc/rmlint-2.10.1/work/rmlint-2.10.1/gui/setup.py", line 60, in run
    install.run(self)
  File "/usr/lib/python3.10/site-packages/setuptools/_distutils/command/install.py", line 709, in run
    self.run_command(cmd_name)
  File "/usr/lib/python3.10/site-packages/setuptools/_distutils/cmd.py", line 318, in run_command
    self.distribution.run_command(command)
  File "/usr/lib/python3.10/site-packages/setuptools/dist.py", line 1213, in run_command
    super().run_command(command)
  File "/usr/lib/python3.10/site-packages/setuptools/_distutils/dist.py", line 987, in run_command
    cmd_obj.ensure_finalized()
  File "/usr/lib/python3.10/site-packages/setuptools/_distutils/cmd.py", line 111, in ensure_finalized
    self.finalize_options()
  File "/usr/lib/python3.10/site-packages/setuptools/command/install_egg_info.py", line 26, in finalize_options
    ei_cmd = self.get_finalized_command("egg_info")
  File "/usr/lib/python3.10/site-packages/setuptools/_distutils/cmd.py", line 305, in get_finalized_command
    cmd_obj.ensure_finalized()
  File "/usr/lib/python3.10/site-packages/setuptools/_distutils/cmd.py", line 111, in ensure_finalized
    self.finalize_options()
  File "/usr/lib/python3.10/site-packages/setuptools/command/egg_info.py", line 219, in finalize_options
    parsed_version = parse_version(self.egg_version)
  File "/usr/lib/python3.10/site-packages/packaging/version.py", line 266, in __init__
    raise InvalidVersion(f"Invalid version: '{version}'")
packaging.version.InvalidVersion: Invalid version: '2.10.1.Ludicrous.Lemur'
scons: *** [gui/always.install] Error 1
In file included from /usr/include/string.h:535,
                 from /usr/include/glib-2.0/glib/galloca.h:35,
                 from /usr/include/glib-2.0/glib.h:32,
                 from lib/pathtricia.c:26:
In function 'strncpy',
    inlined from 'rm_path_iter_init' at lib/pathtricia.c:106:5:
/usr/include/bits/string_fortified.h:95:10: warning: '__builtin_strncpy' specified bound 4096 equals destination size [-Wstringop-truncation]
   95 |   return __builtin___strncpy_chk (__dest, __src, __len,
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   96 |                                   __glibc_objsize (__dest));
      |                                   ~~~~~~~~~~~~~~~~~~~~~~~~~
scons: building terminated because of errors.
 * ERROR: app-misc/rmlint-2.10.1::gentoo failed (install phase):
 *   escons failed.

my scons is 4.4.0, how can we further the troubleshooting for this issue? I'm running gentoo, not... Ludricrous Lemur.

@cebtenzzre
Copy link
Contributor

It looks like a deprecation warning I've been seeing has finally turned into an error. The GUI should install correctly with this patch:

diff --git a/gui/setup.py b/gui/setup.py
index 39bc603f..cb433089 100644
--- a/gui/setup.py
+++ b/gui/setup.py
@@ -19,7 +19,7 @@ def read_version():
     with open('../.version', 'r') as handle:
         version_string = handle.read()

-    return version_string.strip()
+    return version_string.split()[0]

 class install_glib_resources(install):
     user_options = install.user_options + [

@cebtenzzre cebtenzzre added topic-gui topic-compiling Related to building rmlint from source labels Jan 27, 2023
@cebtenzzre cebtenzzre changed the title Can't install the software nor todays master packaging.version.InvalidVersion: Invalid version: '2.10.1.Ludicrous.Lemur' Mar 3, 2023
intelfx added a commit to intelfx/rmlint that referenced this issue Mar 8, 2023
intelfx added a commit to intelfx/rmlint that referenced this issue Mar 8, 2023
intelfx added a commit to intelfx/rmlint that referenced this issue Mar 8, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
topic-compiling Related to building rmlint from source topic-gui
Projects
None yet
Development

No branches or pull requests

2 participants