kazhala / InquirerPy

:snake: Python port of Inquirer.js (A collection of common interactive command-line user interfaces)
https://inquirerpy.readthedocs.io
MIT License
341 stars 18 forks source link

InquirerPy pip package failed on bazel python_rules #57

Open pyu10055 opened 1 year ago

pyu10055 commented 1 year ago

@kazhala First I want to thank you for modernizing PyInquirer library, as we are trying to replace PyInquirer (issue), we are facing some issues with our existing build infrastructure. Bazel python rules require the package name to match the WHEEL file directory. In case of InquirerPy, the pip package is InquirerPy-0.3.4-py3-none-any.whl, bazel will try to parse the WHEEL file at: InquirerPy-0.3.4.dist-info/WHEEL Which is different from the real location in the file (inquirerpy-0.3.4.dist-info/WHEEL).

The main problem seems to be the mismatch of case between pip package name InquirerPy and internal directory inquirerpy. I have tested that if I rename the pip package to inquirerpy-0.3.4-py3-none-any.whl, then everything works.

Can you help to align these two and publish a new version? Thanks

cabreraalex commented 1 year ago

+1 having the same issue with Poetry and GitHub Actions

pyu10055 commented 1 year ago

@kazhala bumping this thread, thanks

kazhala commented 1 year ago

Ahh okay makes sense. I'll have a look over the weekend and see what I can do.

thehappydinoa commented 1 year ago

Same issue here, running the following env on an arm64 machine.

Python 3.10.8 Poetry 1.4.0 pip 22.1.2 setuptools 58.1.0

KeyError "There is no item named 'InquirerPy-0.3.4.dist-info/WHEEL' in the archive"
  at /usr/local/lib/python3.9/zipfile.py:1438 in getinfo
      1434│     def getinfo(self, name):
      1435│         """Return the instance of ZipInfo given 'name'."""
      1436│         info = self.NameToInfo.get(name)
      1437│         if info is None:
    → 1438│             raise KeyError(
      1439│                 'There is no item named %r in the archive' % name)
      1440│ 
      1441│         return info
      1442│ 
thehappydinoa commented 1 year ago

Actually I just downgraded Poetry 1.3.2 and it seems to have fixed my issue. Something introduce in 1.4.0 seems to be breaking for some wheel based projects.

pyu10055 commented 1 year ago

@kazhala any updates? thanks