osvenskan / posix_ipc

Other
135 stars 24 forks source link

Missing hash for v1.1.1 #46

Closed oddjobz closed 1 year ago

oddjobz commented 1 year ago

Using poetry (and I suspect pipenv is the same) I can't install version 1.1.1, it's failing with;

Package operations: 1 install, 0 updates, 0 removals

  • Installing posix-ipc (1.1.1): Failed

  RuntimeError

  Hash for posix-ipc (1.1.1) from archive posix_ipc-1.1.1-cp310-cp310-linux_x86_64.whl not found in known
hashes  (was: sha256:5894b2133418e9d388ecbef76b2e1b3cc8e06e506bb56635aebc0ab125d0d0a7)

Not entirely sure what the build / deployment mechanism is for wheels, but it works fine for 1.1.0, so I'm guessing something isn't quite right somewhere. For anyone with problems;

poetry add posix-ipc@1.1.0

Works fine. Installing with "pip" also works fine, which makes me think the package is there but something has screwed up the hashes. Last time I saw this, someone had managed to re-publish using the same version number ... but it could also be something a little less desirable (!)

osvenskan commented 1 year ago

Hi @oddjobz, what repository are you pulling from? The wheel you mention is Linux-specific, and I haven't created a Linux-specific wheel for this project in a very long time. (I use a Mac.)

On PyPI, versions 1.1.0 and 1.1.1 have similar files. All of the wheels are Mac-specific:

https://pypi.org/project/posix-ipc/1.1.0/#files

https://pypi.org/project/posix-ipc/1.1.1/#files

I don't know where you're getting posix_ipc-1.1.1-cp310-cp310-linux_x86_64.whl from, but I didn't create it.

Someone just opened #45 asking for universal Linux wheels so you can follow that conversation if you're interested in Linux wheels for this project. The short story is that I wouldn't mind creating them, but I don't have the time right now.

oddjobz commented 1 year ago

Erm, yeah, as far as I know I'm just pulling from pypi, I don't have anything exotic set up in terms of custom repo's. It just struck me I may have pip'd an earlier version, so I just did this;

$ pyenv activate test
$ pip install posix-ipc
Collecting posix-ipc
  Downloading posix_ipc-1.1.1.tar.gz (94 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 94.3/94.3 kB 2.4 MB/s eta 0:00:00
  Preparing metadata (setup.py) ... done
Installing collected packages: posix-ipc
  DEPRECATION: posix-ipc is being installed using the legacy 'setup.py install' method, because it does
not have a 'pyproject.toml' and the 'wheel' package is not installed. pip 23.1 will enforce this behaviour
change. A possible replacement is to enable the '--use-pep517' option. Discussion can be found at
https://github.com/pypa/pip/issues/8559
  Running setup.py install for posix-ipc ... done
Successfully installed posix-ipc-1.1.1

So I guess pip is reporting the lack of a wheel as you say, but installing with pip does seem to work? As it happens I just ported my current application to MacOS, I guess a Linux wheel might save a little time but I didn't notice any problems until I tried to update on the Linux side. But I guess yeah, if poetry is trying to use the wheel and there is no wheel, I guess that could be problematic ... :)

oddjobz commented 1 year ago

If it helps, now I understand the issue I've switched back to poetry like so;

$ poetry add git+https://github.com/osvenskan/posix_ipc.git
Updating dependencies
Resolving dependencies... (0.2s)
Writing lock file
Package operations: 2 installs, 11 updates, 0 removals
  • Updating exceptiongroup (1.1.1 -> 1.1.0)
  • Updating filelock (3.10.0 -> 3.9.0)
  • Updating iniconfig (2.0.0 -> 1.1.1)
  • Updating packaging (23.0 -> 22.0)
  • Updating platformdirs (3.1.1 -> 2.6.2)
  • Updating charset-normalizer (3.1.0 -> 2.1.1)
  • Updating coverage (7.2.2 -> 6.5.0)
  • Installing py (1.11.0)
  • Updating pytest (7.2.2 -> 7.2.0)
  • Updating virtualenv (20.21.0 -> 20.17.1)
  • Installing posix-ipc (1.1.1 00e5986)
  • Updating pytest-cov (4.0.0 -> 3.0.0)
  • Updating tox (4.4.7 -> 3.28.0)

Which seems to work fine for me .. assuming the build environment can do handle it, is there a downside to working against the repo like this .vs. a wheel?

osvenskan commented 1 year ago

Glad to hear you've got it working in some fashion.

pip is the only python package manager I'm familiar with, so I don't have any experience interpreting poetry's messages. But if poetry was reporting the very reasonable condition, "you asked me to install a Linux-compatible posix_ipc 1.1.1 for Python 3.10, but there's no wheel for that", this strikes me as a really strange way to say it --

Hash for posix-ipc (1.1.1) from archive posix_ipc-1.1.1-cp310-cp310-linux_x86_64.whl not found in known
hashes  (was: sha256:5894b2133418e9d388ecbef76b2e1b3cc8e06e506bb56635aebc0ab125d0d0a7)

I'm not doubting you, just observing that the message led me to think you had a file called posix_ipc-1.1.1-cp310-cp310-linux_x86_64.whl from somewhere. ¯\_(ツ)_/¯

On Linux, pip is probably running python setup.py install which should compile the executable quickly, assuming you have a compiler installed along with a python-dev package for header files, etc.

assuming the build environment can do handle it, is there a downside to working against the repo like this .vs. a wheel?

Probably not? I'd need to know more about your environment to be sure. A wheel is just a zip file with the executable and some metadata in it, so if all you care about is the executable, it doesn't really matter where you get it from. Obviously distribution is a lot more complicated if you don't use a wheel, but if you're just running something locally it's probably fine.

osvenskan commented 1 year ago

@oddjobz Since this seems to be about package manager behavior rather than about posix_ipc, I'd like to close it. Do you feel satisfied that the issue is resolved?