Skip to content

Commit

Permalink
Fix syntax for opening the README.md and __version__.py
Browse files Browse the repository at this point in the history
For some reason updates made at #114
are breaking the build using setup, caught while deploying to a cloud service
provider.

The exact error is:
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.

See also :
conda-forge/staged-recipes#17634
  • Loading branch information
akamhy committed Jan 25, 2022
1 parent 15c7244 commit 7ac9353
Showing 1 changed file with 7 additions and 8 deletions.
15 changes: 7 additions & 8 deletions setup.py
Original file line number Diff line number Diff line change
@@ -1,21 +1,20 @@
import os.path
from setuptools import setup

with open(
os.path.join(os.path.dirname(__file__), "README.md"), encoding="utf-8"),
as f:
readme_path = os.path.join(os.path.dirname(__file__), "README.md")
with open(readme_path, encoding="utf-8") as f:
long_description = f.read()

about = {}
with open(
os.path.join(os.path.dirname(__file__), "waybackpy", "__version__.py"),
encoding="utf-8")
as f:
version_path = os.path.join(os.path.dirname(__file__), "waybackpy", "__version__.py")
with open(version_path, encoding="utf-8") as f:
exec(f.read(), about)

version = str(about["__version__"])

download_url = "https://github.com/akamhy/waybackpy/archive/{version}.tar.gz".format(version=version)
download_url = "https://github.com/akamhy/waybackpy/archive/{version}.tar.gz".format(
version=version
)

setup(
name=about["__title__"],
Expand Down

0 comments on commit 7ac9353

Please sign in to comment.