Psycojoker / prosopopee

a static website generator to make beautiful customizable pictures galleries that tell a story
http://prosopopee.readthedocs.org
GNU General Public License v3.0
318 stars 55 forks source link

Requirements should be for `path` not `path.py` and then other errors #124

Closed Jwink3101 closed 2 months ago

Jwink3101 commented 3 years ago

I wanted to play and at least test this out since your example gallery isn't working (another issue). So I installed on macOS, into a clean virtualenv. Using path.py, it found some super old version that doesn't work. I changed it to path and it worked fine.

I was going to submit a pull request but honestly, I have no idea if this will break anything else

Okay, so it seems to have broken something about how it is trying to load stuff since I get errors like:

NotADirectoryError: [Errno 20] Not a directory: Path('/Users/<REDACTED>/venv/prosopopee/lib/python3.8/site-packages/prosopopee-1.0.1-py3.8.egg/prosopopee/themes')

I suspect that is because the .egg is a zipfile so you need to open it that way.

QSchulz commented 3 years ago

I wanted to play and at least test this out since your example gallery isn't working (another issue).

Please give us more info on that.

Using path.py, it found some super old version that doesn't work. I changed it to path and it worked fine.

Thanks for this report. I think it would make sense to send a Pull Request for that. Though, I can already tell you I'll comment asking whether we couldn't use pathlib instead (which is a standard library, so does not need to be added to requirements.txt).

Since path.py has been replaced by path, I'd expect it to keep compatibility.

I suspect that is because the .egg is a zipfile so you need to open it that way.

Just tried on a clean virtualenv on Linux and cannot reproduce. Can you still reproduce today? Wondering how pip treats packages which failed to install since you manually fixed it after it failed.

Jwink3101 commented 3 years ago

It has been a (long) while since I wrote this and it looks like the code has changed a lot since then. Based on the dates, this was from 0c6e83fd7.

Also, I don't recall the details but I agree strongly that if you require python 3.4+, you should be using pathlib!

I don't know how pip will treat a missing package or how your code will work with stdlib pathlib (probably fine?)

I can try again later when I am home.

twdragon commented 6 months ago

Confirmed for master, fixed by replacement of path.py module name with just path. Need to be fixed ASAP