Skip to content
This repository has been archived by the owner on Oct 16, 2024. It is now read-only.

Can't build btchip-python wheel anymore #53

Open
presentfactory opened this issue Jul 13, 2023 · 5 comments · May be fixed by #54
Open

Can't build btchip-python wheel anymore #53

presentfactory opened this issue Jul 13, 2023 · 5 comments · May be fixed by #54

Comments

@presentfactory
Copy link

When I try to install btchip-python via pip install btchip-python I get this due to something being wrong with the setup.py file which prevents it from installing:

      running install_scripts
      Traceback (most recent call last):
        File "/usr/lib/python3.11/site-packages/packaging/requirements.py", line 35, in __init__
          parsed = _parse_requirement(requirement_string)
                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        File "/usr/lib/python3.11/site-packages/packaging/_parser.py", line 64, in parse_requirement
          return _parse_requirement(Tokenizer(source, rules=DEFAULT_RULES))
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        File "/usr/lib/python3.11/site-packages/packaging/_parser.py", line 82, in _parse_requirement
          url, specifier, marker = _parse_requirement_details(tokenizer)
                                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        File "/usr/lib/python3.11/site-packages/packaging/_parser.py", line 126, in _parse_requirement_details
          marker = _parse_requirement_marker(
                   ^^^^^^^^^^^^^^^^^^^^^^^^^^
        File "/usr/lib/python3.11/site-packages/packaging/_parser.py", line 147, in _parse_requirement_marker
          tokenizer.raise_syntax_error(
        File "/usr/lib/python3.11/site-packages/packaging/_tokenizer.py", line 165, in raise_syntax_error
          raise ParserSyntaxError(
      packaging._tokenizer.ParserSyntaxError: Expected end or semicolon (after version specifier)
          python-pyscard>=1.6.12-4build1
                        ~~~~~~~~~~^

      The above exception was the direct cause of the following exception:

      Traceback (most recent call last):
        File "<string>", line 2, in <module>
        File "<pip-setuptools-caller>", line 34, in <module>
        File "/tmp/pip-install-ejw6ui8h/btchip-python_cd0a9c8abd924937b5736601c67fb5c6/setup.py", line 9, in <module>
          setup(
        File "/home/lemon/.local/lib/python3.11/site-packages/setuptools/__init__.py", line 153, in setup
          return distutils.core.setup(**attrs)
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        File "/home/lemon/.local/lib/python3.11/site-packages/setuptools/_distutils/core.py", line 148, in setup
          dist.run_commands()
        File "/home/lemon/.local/lib/python3.11/site-packages/setuptools/_distutils/dist.py", line 967, in run_commands
          self.run_command(cmd)
        File "/home/lemon/.local/lib/python3.11/site-packages/setuptools/_distutils/dist.py", line 986, in run_command
          cmd_obj.run()
        File "/usr/lib/python3.11/site-packages/wheel/bdist_wheel.py", line 395, in run
          self.egg2dist(self.egginfo_dir, distinfo_dir)
        File "/usr/lib/python3.11/site-packages/wheel/bdist_wheel.py", line 534, in egg2dist
          pkg_info = pkginfo_to_metadata(egginfo_path, pkginfo_path)
                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        File "/usr/lib/python3.11/site-packages/wheel/metadata.py", line 160, in pkginfo_to_metadata
          for key, value in generate_requirements({extra: reqs}):
        File "/usr/lib/python3.11/site-packages/wheel/metadata.py", line 138, in generate_requirements
          for new_req in convert_requirements(depends):
        File "/usr/lib/python3.11/site-packages/wheel/metadata.py", line 103, in convert_requirements
          parsed_requirement = Requirement(req)
                               ^^^^^^^^^^^^^^^^
        File "/usr/lib/python3.11/site-packages/packaging/requirements.py", line 37, in __init__
          raise InvalidRequirement(str(e)) from e
      packaging.requirements.InvalidRequirement: Expected end or semicolon (after version specifier)
          python-pyscard>=1.6.12-4build1
                        ~~~~~~~~~~^
      [end of output]

  note: This error originates from a subprocess, and is likely not a problem with pip.
  ERROR: Failed building wheel for btchip-python
  Running setup.py clean for btchip-python
Failed to build btchip-python
ERROR: Could not build wheels for btchip-python, which is required to install pyproject.toml-based projects
@Fuzzbawls
Copy link

also experiencing this issue now

@EchterAgo
Copy link

See also pypa/setuptools#3801, workaround is to downgrade setuptools.

EchterAgo added a commit to EchterAgo/btchip-python that referenced this issue Oct 10, 2023
The version specification is invalid with recent setuptools and also
the package name is `pyscard`.

See pypa/setuptools#3801

fixes LedgerHQ#53
EchterAgo added a commit to EchterAgo/btchip-python that referenced this issue Oct 10, 2023
The version specification is invalid with recent setuptools and also
the package name is `pyscard`.

See pypa/setuptools#3801

fixes LedgerHQ#53
@EchterAgo EchterAgo linked a pull request Oct 10, 2023 that will close this issue
@EchterAgo
Copy link

#54 fixes this.

pip install git+https://github.com/EchterAgo/btchip-python.git@fix_deps

@accumulator
Copy link

bump. #54 fixes this issue, what's the hold-up?

@vbmithr
Copy link

vbmithr commented Aug 7, 2024

Yeah, please merge, as it is a dependency to run electrum with a Ledger. @btchip ?

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

Successfully merging a pull request may close this issue.

5 participants