From: Carsten Schoenert <c.schoenert@t-online.de>
Date: Sun, 2 Jun 2019 21:07:08 +0200
Subject: Adding a setup.py file

---
 setup.py | 58 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 58 insertions(+)
 create mode 100644 setup.py

diff --git a/setup.py b/setup.py
new file mode 100644
index 0000000..d6cd453
--- /dev/null
+++ b/setup.py
@@ -0,0 +1,58 @@
+import codecs
+import os
+
+from setuptools import setup, find_packages
+
+long_desc = """
+Xerus™ Python client library for JSON-RPC interface
+
+This Python library includes the JSON-RPC interface for interacting with
+the PDU models PX2, PX3, PX4 BCM, EMX and Transfer Switches from Raritan
+and is usable with Python3.
+
+The interface gives you the possibility to request current live data from an
+PDU and their sensors but also to set up various data like SMTP, NTP, system
+and asset data.
+"""
+
+# https://packaging.python.org/single_source_version/
+base_dir = os.path.abspath(os.path.dirname(__file__))
+about = {}
+with open(os.path.join(base_dir, "pdu-python-api/raritan", "version.py"), "rb") as f:
+    exec(f.read(), about)
+
+# currently not used
+def read(fname):
+    return codecs.open(os.path.join(base_dir, fname), encoding="utf-8").read()
+
+setup(
+      name             = "raritan-json-rpc",
+      version          = f"{about['__sdk_version__']}.{about['__sdk_subversion__']}",
+      description      = about["__description__"],
+      long_description = long_desc,
+      license          = about["__license__"],
+      author           = about["__author__"],
+      author_email     = about["__email__"],
+      classifiers = [
+          about["__status__"],
+          f"License :: OSI Approved :: {about['__license__']}",
+          "Natural Language :: English",
+          "Operating System :: OS Independent",
+          "Programming Language :: Python :: 3.4",
+          "Programming Language :: Python :: 3.5",
+          "Programming Language :: Python :: 3.6",
+          "Programming Language :: Python :: 3.7",
+          "Programming Language :: Python :: 3.8",
+          "Programming Language :: Python :: 3.9",
+          "Programming Language :: Python :: 3.10",
+          "Topic :: Utilities",
+      ],
+      keywords    = "Xerus™ BCM EMX PX2 PX3 PX4 JSON-RPC",
+      url         = about["__url__"],
+      packages    = find_packages("pdu-python-api"),
+      platforms   = "any",
+      package_dir = {"": "pdu-python-api"},
+      install_requires = [
+          "uritools",
+          "zeroconf",
+      ])
