From 42eca9bd5a21d01bd2bf1e01c074e9f2748a8948 Mon Sep 17 00:00:00 2001 From: Rico Date: Mon, 2 Sep 2019 23:35:47 +0200 Subject: [PATCH] FIX: Broken paths in setup.py --- setup.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/setup.py b/setup.py index 44097fa..3c4dfa4 100644 --- a/setup.py +++ b/setup.py @@ -18,7 +18,9 @@ def requirements(): return requirements_list -with open("README.md", "r", encoding="utf-8") as file: +setup_path = os.path.dirname(os.path.abspath(__file__)) + +with open(os.path.join(setup_path, "README.md"), "r", encoding="utf-8") as file: readme = file.read() # If present, take tag from travis and not locally @@ -30,7 +32,7 @@ def requirements(): else: # Taken from https://packaging.python.org/guides/single-sourcing-package-version/ version_dict = {} - version_file = os.path.join('pastepwn', 'version.py') + version_file = os.path.join(setup_path, 'pastepwn', 'version.py') with open(version_file, "r", encoding="utf-8") as file: exec(file.read(), version_dict) version = version_dict['__version__']