dsanson / termpdf.py

A graphical pdf and epub reader that works inside the kitty terminal
MIT License
506 stars 32 forks source link

fix setup.py keyword #30

Open renzmann opened 2 years ago

renzmann commented 2 years ago

I ran into this issue trying to pip install this package. The issue is not that fitz isn't listed, but the keyword for requires should actually be install_requires. Without this keyword, pip actually won't install transitive dependencies.

Since the original installation instructions recommended a git clone followed by pip install, I modified the README to demonstrate a faster installation that combines both steps, assuming the install_requires keyword is in place. Also, as already mentioned by another user, having a requirements.txt that doesn't pin versions is duplicitous of the install_requires, but I'll leave that to you to remove if you want.

Furthermore, this seems like a good package to go up on PyPI, so that users can simply pip install termpdf.py. If there's interest for that, I'd be happy to contribute a separate PR that would move the repo to setuptools or poetry that would simplify the build/distribution process a lot.

To see an example of the installation I wrote in the README.md, you could try it from my branch:

pip install git+https://github.com/renzmann/termpdf.py
karlb commented 2 years ago

This solves https://github.com/dsanson/termpdf.py/issues/17 for me. Now I can install it with pipx install git+https://github.com/renzmann/termpdf.py while it failed with ModuleNotFoundError: No module named 'fitz' before. Thanks @renzmann! I also consider than changed installation instructions an improvement, so I suggest merging this PR.