diff --git a/setup.py b/setup.py index 583a91e..b80ac42 100755 --- a/setup.py +++ b/setup.py @@ -95,8 +95,12 @@ else: ) +def abspath(rel): + return os.path.join(os.path.dirname(__file__), rel) + + def get_greenlet_version(): - with open('src/greenlet/__init__.py') as f: + with open(abspath('src/greenlet/__init__.py')) as f: looking_for = '__version__ = \'' for line in f: if line.startswith(looking_for): @@ -109,7 +113,7 @@ setup( name="greenlet", version=get_greenlet_version(), description='Lightweight in-process concurrent programming', - long_description=readfile("README.rst"), + long_description=readfile(abspath("README.rst")), long_description_content_type="text/x-rst", url="https://greenlet.readthedocs.io/", keywords="greenlet coroutine concurrency threads cooperative",