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

pip install hachoir[urwid] fails on "recent" setuptools versions #93

Open
adrienbeau opened this issue Mar 1, 2024 · 3 comments
Open

Comments

@adrienbeau
Copy link

hachoir[urwid] requires urwid==1.3.1 (released on 2015-11-02)
This produces distutils.errors.DistutilsSetupError: use_2to3 is invalid.
use_2to3 was indeed removed from setuptools 58 (released on 2021-09-05)

Software environment:

  • KDE neon 6.0 (based on Ubuntu 22.04)
  • Python 3.10.12

Commands run:

$ python3 -m venv env-hachoir
$ cd env-hachoir
$ . bin/activate
$ pip install hachoir
Successfully installed hachoir-3.3.0
$ pip install hachoir[urwid]
Requirement already satisfied: hachoir[urwid] in ./lib/python3.10/site-packages (3.3.0)
Collecting urwid==1.3.1 (from hachoir[urwid])
  Downloading urwid-1.3.1.tar.gz (588 kB)
  Preparing metadata (setup.py) ... error
  error: subprocess-exited-with-error
  × python setup.py egg_info did not run successfully.
    exit code: 1
      Traceback (most recent call last):
      (...)
      File "/home/(...)/env-hachoir/lib/python3.10/site-packages/setuptools/dist.py", line 139, in invalid_unless_false
          raise DistutilsSetupError(f"{attr} is invalid.")
      distutils.errors.DistutilsSetupError: use_2to3 is invalid.
(...)

A workaround (or solution) is to require a more recent (or most recent) version of urwid.

hachoir-urwid works fine for me with the latest urwid (2.6.7).

@vstinner
Copy link
Owner

vstinner commented Mar 2, 2024

The error comes from urwid, no?

@adrienbeau
Copy link
Author

I think it comes from hachoir/setup.py:

        "extras_require": {
            "urwid": [
                "urwid==1.3.1"
            ],

Hachoir specifically requires this exact old version, dating from way before use_2to3 was dropped from setuptools.

More recent versions of urwid do not have this error.

I don't know why hachoir specifically requires version 1.3.1. It seems to work fine with recent versions of urwid.

@vstinner
Copy link
Owner

vstinner commented Mar 2, 2024

I don't know why hachoir specifically requires version 1.3.1. It seems to work fine with recent versions of urwid.

It didn't work with a specific urwid version. I don't recall which one. Do you want to write a change to no longer stick to this version?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants