wustho / epy

CLI Ebook (epub2, epub3, fb2, mobi) Reader
GNU General Public License v3.0
971 stars 53 forks source link

Can't install #1

Closed SolidSneky closed 4 years ago

SolidSneky commented 4 years ago

I'm on Linux. When I try to install with pip3, it throws a syntax error:

File "/tmp/pip-req-build-xh4bvalo/epy.py", line 1113 PROGRESSTR = f"{int(PROGRESS*100)}%"

Full error: ` ERROR: Command errored out with exit status 1: command: /usr/bin/python3 -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-req-build-xh4bvalo/setup.py'"'"'; file='"'"'/tmp/pip-req-build-xh4bvalo/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(file);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, file, '"'"'exec'"'"'))' egg_info --egg-base /tmp/pip-req-build-xh4bvalo/pip-egg-info cwd: /tmp/pip-req-build-xh4bvalo/ Complete output (8 lines): Traceback (most recent call last): File "", line 1, in File "/tmp/pip-req-build-xh4bvalo/setup.py", line 3, in from epy import version, author, url, license File "/tmp/pip-req-build-xh4bvalo/epy.py", line 1113 PROGRESSTR = f"{int(PROGRESS*100)}%" ^ SyntaxError: invalid syntax

ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output. `

SolidSneky commented 4 years ago

So I edited the line to not use f-string, and the same error popped up except on a different line (1207), so f-string seems to be the problem. I edited line 1207 too, and it sucessfully installed! So you should probably fix it on here too. Although it might have been a problem with my system somehow, I don't know

wustho commented 4 years ago

Whoa sorry. I deliberately ignored f string error warning in my editor since it still runs well in my laptop... I all fixed this. Thanks for debugging

wustho commented 4 years ago

https://github.com/wustho/epy/commit/2dd2bf341f18998165f67c12edd22ce94dae5ac5

Just learned that f-string is only supported for python v6 and above...

SolidSneky commented 4 years ago

Haha, okay. Thanks for taking care of this, keep up the good work!