From 07c96626cb8bb34a6e573d3526528ca7888a37ec Mon Sep 17 00:00:00 2001
From: Marko Mecina <marko.mecina@univie.ac.at>
Date: Wed, 25 May 2022 18:09:23 +0200
Subject: [PATCH] update Makefiles and Python requirements

---
 Makefile                 | 26 ++++++++++++++++++++++++--
 README                   |  4 ++--
 Tst/confignator/Makefile |  2 +-
 requirements.txt         | 19 +++++++++++++++++++
 4 files changed, 46 insertions(+), 5 deletions(-)
 create mode 100644 requirements.txt

diff --git a/Makefile b/Makefile
index b57a915..b7b7b38 100644
--- a/Makefile
+++ b/Makefile
@@ -12,7 +12,19 @@ install-confignator:
 	@echo "+---------------------------------------+"
 	@echo "| installing confignator Python package |"
 	@echo "+---------------------------------------+"
-	    $(MAKE) reinstall -C $(CURDIR)/Tst/confignator
+	    $(MAKE) build -C $(CURDIR)/Tst/confignator
+	    pip install -U $(CURDIR)/Tst/confignator/dist/*.whl
+	@echo "+--------------------------------------+"
+	@echo "| installed confignator Python package |"
+	@echo "+--------------------------------------+"
+	@echo
+	
+install-confignator-userspace:
+	@echo "+---------------------------------------+"
+	@echo "| installing confignator Python package |"
+	@echo "+---------------------------------------+"
+	    $(MAKE) build -C $(CURDIR)/Tst/confignator
+	    pip install --user -U $(CURDIR)/Tst/confignator/dist/*.whl
 	@echo "+--------------------------------------+"
 	@echo "| installed confignator Python package |"
 	@echo "+--------------------------------------+"
@@ -42,7 +54,17 @@ install-python-env:
 	@echo "+-----------------------------+"
 	@echo "| installing Python modules   |"
 	@echo "+-----------------------------+"
-	python -m pip install --user --upgrade numpy scipy matplotlib cairocffi mysqlclient sqlalchemy wheel sphinx sphinx_rtd_theme astropy crcmod psutil
+	    python -m pip install --user --upgrade numpy scipy matplotlib cairocffi mysqlclient sqlalchemy wheel sphinx sphinx_rtd_theme astropy crcmod psutil
+	@echo "+-----------------------------+"
+	@echo "| installed Python modules    |"
+	@echo "+-----------------------------+"
+	@echo
+
+install-python-requirements:
+	@echo "+-----------------------------+"
+	@echo "| installing Python modules   |"
+	@echo "+-----------------------------+"
+	    pip install -U -r $(CURDIR)/requirements.txt
 	@echo "+-----------------------------+"
 	@echo "| installed Python modules    |"
 	@echo "+-----------------------------+"
diff --git a/README b/README
index 318c9ca..c50ccbc 100644
--- a/README
+++ b/README
@@ -19,11 +19,11 @@ manjaro-xfce-21.0.5 linux5.10
 
 3) install packages/devtools
     - gtksourceview3 [<=3.24.11-1]
-    - ipython [<=7.31]
+    - ipython [<=7.*]
     - python-pip
     - make
 
-4) install python modules (to install the modules with pip in ~/.local, you can run 'make install-python-env' in the CCS base directory)
+4) install python modules (to install the modules with pip in ~/.local, you can run 'make install-python-env' in the CCS base directory or use 'pip install [--user] -r requirements.txt')
     - python-numpy
     - python-scipy
     - python-matplotlib
diff --git a/Tst/confignator/Makefile b/Tst/confignator/Makefile
index 5a6bdb9..28b5a7e 100644
--- a/Tst/confignator/Makefile
+++ b/Tst/confignator/Makefile
@@ -17,7 +17,7 @@ clean: clean-build clean-doc-build
 
 reinstall: clean uninstall build install
 
-build:
+build:	clean
 	@echo "\e[1m=====================================\e[0m"
 	@echo "\e[1m building confignator Python package \e[0m"
 	@echo "\e[1m=====================================\e[0m"
diff --git a/requirements.txt b/requirements.txt
new file mode 100644
index 0000000..4008252
--- /dev/null
+++ b/requirements.txt
@@ -0,0 +1,19 @@
+# requirements for running CCS/TST
+# markupsafe < 2.1.0
+wheel
+ipython >= 7, < 8
+numpy
+scipy
+matplotlib
+cairocffi
+mysqlclient
+sqlalchemy
+sphinx
+sphinx_rtd_theme
+astropy
+crcmod
+psutil
+
+# for TASTE, which also needs libdbus-1-dev, gir1.2-notify-0.7, libgirepository1.0-dev, libgtk-3-dev
+# pygobject
+# dbus-python
-- 
GitLab