From ec55ffaddc6b0f7fae4c1f6b8b6c0a9528e36e88 Mon Sep 17 00:00:00 2001
From: lukken <lukken@astron.nl>
Date: Wed, 9 Jun 2021 11:37:43 +0000
Subject: [PATCH] Add setup.py/cfg for project metadata and packaging.

This uses pbr for setup.py which automatically extracts features
and entrypoints out of setup.cfg otherwise you would have to type
this by hand.

Some fields of setup.cfg still need changing the have been
commented out in the meantime.
---
 devices/setup.cfg | 13 -------------
 requirements.txt  |  5 +++++
 setup.cfg         | 33 +++++++++++++++++++++++++++++++++
 setup.py          |  3 +++
 4 files changed, 41 insertions(+), 13 deletions(-)
 delete mode 100644 devices/setup.cfg
 create mode 100644 requirements.txt
 create mode 100644 setup.cfg
 create mode 100644 setup.py

diff --git a/devices/setup.cfg b/devices/setup.cfg
deleted file mode 100644
index c67fdf70f..000000000
--- a/devices/setup.cfg
+++ /dev/null
@@ -1,13 +0,0 @@
-
-# See the docstring in versioneer.py for instructions. Note that you must
-# re-run 'versioneer.py setup' after changing this section, and commit the
-# resulting files.
-
-[versioneer]
-#VCS = git
-#style = pep440
-#versionfile_source =
-#versionfile_build =
-#tag_prefix =
-#parentdir_prefix =
-
diff --git a/requirements.txt b/requirements.txt
new file mode 100644
index 000000000..c37479ddd
--- /dev/null
+++ b/requirements.txt
@@ -0,0 +1,5 @@
+# The order of packages is significant, because pip processes them in the order
+# of appearance. Changing the order has an impact on the overall integration
+# process, which may cause wedges in the gate later.
+
+pbr>=2.0 # Apache-2.0
\ No newline at end of file
diff --git a/setup.cfg b/setup.cfg
new file mode 100644
index 000000000..46b24fd8e
--- /dev/null
+++ b/setup.cfg
@@ -0,0 +1,33 @@
+[metadata]
+name = Tango Station Control
+summary = LOFAR 2.0 Station Control
+#description-file =
+#    README.rst
+description-content-type = text/x-rst; charset=UTF-8
+author = ASTRON
+#home-page = https://dantalion.nl
+#project_urls =
+#    Bug Tracker = https://github.com/Dantali0n/RadLoggerPy/issues
+#    Documentation = https://docs.openstack.org/pbr/
+#    Source Code = https://github.com/Dantali0n/radloggerpy
+license = Apache-2
+classifier =
+    Environment :: Console
+    License :: Apache Software License
+    Operating System :: POSIX :: Linux
+    Programming Language :: Python
+    Programming Language :: Python :: 3
+    Programming Language :: Python :: 3.6
+    Programming Language :: Python :: 3.7
+    Programming Language :: Python :: 3.8
+    Programming Language :: Python :: 3.9
+
+[files]
+packages =
+    devices
+
+[entry_points]
+console_scripts =
+    SDP = devices.SDP:main
+    PCC = devices.PCC:main
+
diff --git a/setup.py b/setup.py
new file mode 100644
index 000000000..41c6476e1
--- /dev/null
+++ b/setup.py
@@ -0,0 +1,3 @@
+import setuptools
+
+setuptools.setup(setup_requires=['pbr>=2.0.0'], pbr=True)
\ No newline at end of file
-- 
GitLab