""" Install file for Postgres Elasticsearch Foreign Data Wrapper """
# pylint: disable=line-too-long
from pathlib import Path
from setuptools import setup

if __name__ == "__main__":
    setup(
        name="pg_es_fdw",
        packages=["pg_es_fdw"],
        version="0.5.1",
        description="Connect PostgreSQL and Elastic Search with this Foreign Data Wrapper",
        long_description=(Path(__file__).parent / "README.md").read_text(),
        long_description_content_type="text/markdown",
        author="Matthew Franglen",
        author_email="matthew@franglen.org",
        url="https://github.com/matthewfranglen/postgres-elasticsearch-fdw",
        download_url="https://github.com/matthewfranglen/postgres-elasticsearch-fdw/archive/0.5.1.zip",
        keywords=["postgres", "postgresql", "elastic", "elastic search", "fdw"],
        install_requires=["elasticsearch"],
    )

@@ -103,23 +103,23 @@
 rom 
+os.
 path
-lib
  import 
 Path
@@ -114,20 +114,29 @@
  import 
-Path
+dirname, join
 %0Afrom se
@@ -158,16 +158,144 @@
  setup%0A%0A
+README_FILE = join(dirname(__file__), %22README.md%22)%0Awith open(README_FILE, %22r%22) as handle:%0A    LONG_DESCRIPTION = handle.read()%0A%0A
 if __nam
@@ -528,57 +528,24 @@
 ion=
-(Path(__file__).parent / %22README.md%22).read_text()
+LONG_DESCRIPTION
 ,%0A  

Fix issue with building setup.py for tests