From 3782932e751573dba83501764ed8da5bbf109483 Mon Sep 17 00:00:00 2001
From: Dantali0n <info@dantalion.nl>
Date: Mon, 10 Jul 2023 10:18:24 +0200
Subject: [PATCH] L2SS-1428: Ensure installing package also install
 requirements.txt dependencies

This also fixes the legacy method of installing PyTango
---
 pyproject.toml   |  2 +-
 requirements.txt | 13 +++++++++----
 setup.cfg        |  4 +---
 tox.ini          |  4 ----
 4 files changed, 11 insertions(+), 12 deletions(-)

diff --git a/pyproject.toml b/pyproject.toml
index 68345be..b6e0be7 100644
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -1,6 +1,6 @@
 [build-system]
 requires = [
-    "setuptools>=45",
+    "setuptools>=62.6",
     "setuptools_scm[toml]>=6.2",
     "wheel"
 ]
diff --git a/requirements.txt b/requirements.txt
index 198420c..2ef853c 100644
--- a/requirements.txt
+++ b/requirements.txt
@@ -1,4 +1,9 @@
-numpy >= 1.19.5 # BSD
-stestr>=3.0.0 # Apache-2.0
-testscenarios>=0.5.0 # Apache-2.0/BSD
-testtools>=2.4.0 # MIT
+importlib-metadata>=0.12; python_version<"3.8"
+pip >= 1.5
+pytango >= 9.4.0
+numpy >= 1.19.3; python_version >"3.9" and python_version <"3.10" # BSD
+numpy >= 1.21.6; python_version >"3.10" and python_version <"3.11" # BSD
+numpy >= 1.23.2; python_version >"3.11" and python_version <"3.12" # BSD
+stestr >= 3.0.0 # Apache-2.0
+testscenarios >= 0.5.0 # Apache-2.0/BSD
+testtools >= 2.4.0 # MIT
diff --git a/setup.cfg b/setup.cfg
index edd4715..a56b824 100644
--- a/setup.cfg
+++ b/setup.cfg
@@ -29,9 +29,7 @@ classifiers =
 include_package_data = true
 packages = find:
 python_requires = >=3.7
-install_requires =
-    importlib-metadata>=0.12;python_version<"3.8"
-    pip >= 1.5
+install_requires = file: requirements.txt
 
 [flake8]
 max-line-length = 88
diff --git a/tox.ini b/tox.ini
index 621d914..f8a25c0 100644
--- a/tox.ini
+++ b/tox.ini
@@ -14,10 +14,6 @@ setenv =
 deps =
     -r{toxinidir}/requirements.txt
     -r{toxinidir}/tests/requirements.txt
-commands_pre =
-    # required until https://gitlab.com/tango-controls/pytango/-/issues/468 is resolved
-    pip install 'numpy>=1.19.5'
-    pip install --no-cache 'PyTango>=9.3.6,<9.4.0'
 commands =
     {envpython} --version
     {envpython} -m pytest {posargs}
-- 
GitLab