akamhy / waybackpy

Wayback Machine API interface & a command-line tool
https://pypi.org/project/waybackpy/
MIT License
453 stars 32 forks source link

Fix syntax for opening the README.md and __version__.py #116

Closed akamhy closed 2 years ago

akamhy commented 2 years ago

For some reason updates made at https://github.com/akamhy/waybackpy/pull/114 are breaking the build using setup, caught while deploying to a cloud service provider.

The exact error is:

$  pip install git+https://github.com/akamhy/waybackpy.git
Collecting git+https://github.com/akamhy/waybackpy.git
  Cloning https://github.com/akamhy/waybackpy.git to /tmp/pip-req-build-n3b9e5pj
    ERROR: Command errored out with exit status 1:
     command: /tmp/ppp/venv/bin/python -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-req-build-n3b9e5pj/setup.py'"'"'; __file__='"'"'/tmp/pip-req-build-n3b9e5pj/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-pip-egg-info-dczej0bv
         cwd: /tmp/pip-req-build-n3b9e5pj/
    Complete output (6 lines):
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "/tmp/pip-req-build-n3b9e5pj/setup.py", line 5
        os.path.join(os.path.dirname(__file__), "README.md"), encoding="utf-8"),
                                                                                ^
    SyntaxError: invalid syntax
    ----------------------------------------
ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.
WARNING: You are using pip version 20.2.3; however, version 21.3.1 is available.
You should consider upgrading via the '/tmp/ppp/venv/bin/python -m pip install --upgrade pip' command.

See also : https://github.com/conda-forge/staged-recipes/pull/17634

akamhy commented 2 years ago

also related https://github.com/akamhy/waybackpy/issues/111

akamhy commented 2 years ago

See also https://github.com/akamhy/waybackpy/pull/114/files#r791431485