webrecorder / warcio

Streaming WARC/ARC library for fast web archive IO
https://pypi.python.org/pypi/warcio
Apache License 2.0
387 stars 58 forks source link

Add dependency for setuptools, which is required by cli get_version command #168

Closed white-gecko closed 3 months ago

white-gecko commented 3 months ago

When I install warcio with pipx pkg_resources from setuptools is missing in the venv.

$ pipx install warcio                                                      
  installed package warcio 1.7.4, installed using Python 3.12.4
  These apps are now globally available
    - warcio
done! ✨ 🌟 ✨

$ warcio --version                                                         
Traceback (most recent call last):
  File "…/.local/bin/warcio", line 8, in <module>
    sys.exit(main())
             ^^^^^^
  File "…/.local/share/pipx/venvs/warcio/lib64/python3.12/site-packages/warcio/cli.py", line 16, in main
    parser.add_argument('-V', '--version', action='version', version=get_version())
                                                                     ^^^^^^^^^^^^^
  File "…/.local/share/pipx/venvs/warcio/lib64/python3.12/site-packages/warcio/cli.py", line 60, in get_version
    import pkg_resources
ModuleNotFoundError: No module named 'pkg_resources'

$ pipx uninstall warcio
uninstalled warcio! ✨ 🌟 ✨

$ pipx install git+https://github.com/white-gecko/warcio.git@feature/fixSetup
  installed package warcio 1.7.4, installed using Python 3.12.4
  These apps are now globally available
    - warcio
done! ✨ 🌟 ✨

$ warcio --version                                                           
warcio 1.7.4
wumpus commented 3 months ago

This is a quirk of a deprecation in Python 3.12, if I recall correctly.

white-gecko commented 3 months ago

This would be obsolte with #169 anyhow.

white-gecko commented 3 months ago

Since #168 is split into smaller portions. This pull request would not be obsolete anymore.

wumpus commented 3 months ago

This was fixed in your other PRs. Thank you.

white-gecko commented 3 months ago

Yes, you are right this is superseded by #173