cript0nauta / pynixify

Nix expression generator for Python projects
GNU General Public License v3.0
66 stars 11 forks source link

pynixify fails with ImportError: cannot improt name 'LegacyVersion' from 'packaging.version' #61

Closed tdimiduk closed 1 year ago

tdimiduk commented 1 year ago

I installed pynixify today using the hack described in this issue hack https://github.com/cript0nauta/pynixify/issues/60

but it fails when I attempt to pynixify something

pynixify attrs
Traceback (most recent call last):
  File "/nix/store/dvvkq6n5ax4pcdlp76x62i7wp9d0h7pk-python3.10-pynixify-0.1/bin/..pynixify-wrapped-wrapped", line 6, in <module>
    from pynixify.command import main
  File "/nix/store/dvvkq6n5ax4pcdlp76x62i7wp9d0h7pk-python3.10-pynixify-0.1/lib/python3.10/site-packages/pynixify/__init__.py", line 17, in <module>
    from . import nixpkgs_sources
  File "/nix/store/dvvkq6n5ax4pcdlp76x62i7wp9d0h7pk-python3.10-pynixify-0.1/lib/python3.10/site-packages/pynixify/nixpkgs_sources.py", line 27, in <module>
    from pynixify.base import Package, parse_version
  File "/nix/store/dvvkq6n5ax4pcdlp76x62i7wp9d0h7pk-python3.10-pynixify-0.1/lib/python3.10/site-packages/pynixify/base.py", line 21, in <module>
    from packaging.version import Version, LegacyVersion, parse as parse_original
ImportError: cannot import name 'LegacyVersion' from 'packaging.version' (/nix/store/2043nb400zw6mxdpzm4g0cab6ac1gb7s-python3.10-packaging-23.0/lib/python3.10/site-packages/packaging/version.py)

I've tried several different packages and get the same error each time.

cript0nauta commented 1 year ago

Should be fixed in the main now. If for some reason the problem persists, feel free to reopen the issue.