Repository: cobbler/cobbler

Issue:
Support pip install
### Is your feature request related to a problem?

Currently we are not able to do a `pip install .` due to the fact that we are using non standard packages in our `setup.py`.

### The Behaviour you'd like

`pip install .` works without any knowledge of the user about the requirements of the package.

### Alternatives you've considered

The discussion which we are concerned of has happened in #2412 and #2414 

This needs to be done when either RHEL 7 is EOL of it has a pip version of > 18 at least.

### Additional context

The patch of @nodeg can be found underneath in case he deletes his fork or the branch:

```patch
From c977bca9b5abf170065ae1e0d4a6e981befc47b0 Mon Sep 17 00:00:00 2001
From: Dominik Gedon <dgedon@suse.de>
Date: Fri, 18 Sep 2020 15:08:17 +0200
Subject: [PATCH] Switch to build system according to PEP 517/518

---
 pyproject.toml | 2 ++
 setup.py       | 6 ------
 2 files changed, 2 insertions(+), 6 deletions(-)
 create mode 100644 pyproject.toml

diff --git a/pyproject.toml b/pyproject.toml
new file mode 100644
index 000000000..b6a787879
--- /dev/null
+++ b/pyproject.toml
@@ -0,0 +1,2 @@
+[build-system]
+requires = ["coverage", "distro", "sphinx", "setuptools", "wheel"]
diff --git a/setup.py b/setup.py
index bd37a5a6e..13a3f91a4 100644
--- a/setup.py
+++ b/setup.py
@@ -504,12 +504,6 @@ def run(self):
         author_email="cobbler.project@gmail.com",
         url="https://cobbler.github.io",
         license="GPLv2+",
-        setup_requires=[
-            "coverage",
-            "distro",
-            "setuptools",
-            "sphinx",
-        ],
         install_requires=[
             "mod_wsgi",
             "requests",
```



Discussion:
According to https://access.redhat.com/support/policy/updates/errata#Life_Cycle_Dates the EOL of RHEL 7 is not yet defined. Thus we need to hope that the version of pip in RHEL 7 will increase soon.

However we know that the normal support for RHEL 7 will end at the 30th of June 2024. Thus this will be the latest point when we can tackle this.
@Conan-Kudo How can I monitor the version of pip in RHEL? I don't have a RHEL subscription at hand sadly.
@SchoolGuy CentOS and RHEL versions of pip are identical.
> According to https://access.redhat.com/support/policy/updates/errata#Life_Cycle_Dates the EOL of RHEL 7 is not yet defined. Thus we need to hope that the version of pip in RHEL 7 will increase soon.
> 
> However we know that the normal support for RHEL 7 will end at the 30th of June 2024. Thus this will be the latest point when we can tackle this.

The end of "normal support" is the effective EOL for all intents and purposes.
Perfect then I can monitor the CentOS and we are good.
Pip version will be monitored through this: https://pkgs.org/search/?q=pip

Sadly one cannot filter via GET parameters the rest of the information.
Since we don't support CentOS 7 due to the missing full Python 3 stack we can now do this. CentOS 8 and all other distros seem to have the appropriate pip version available.
@nodeg Would you please be so kind and redo your PR. I would also love if you could add to the then open PR that we build packages for openSUSE Leap 15.3 & openSUSE Tumbleweed in the pipeline so we build all packages on a PR.
> [...] that we build packages for openSUSE Leap 15.3 & openSUSE Tumbleweed in the pipeline so we build all packages on a PR.

~~What do you exactly mean by that?~~ I am on it.


Resolving patch:
diff --git a/setup.py b/setup.py
--- a/setup.py
+++ b/setup.py
@@ -531,12 +531,6 @@ def run(self):
             "Tracker": "https://github.com/cobbler/cobbler/issues",
         },
         license="GPLv2+",
-        setup_requires=[
-            "coverage",
-            "distro",
-            "setuptools",
-            "sphinx",
-        ],
         install_requires=[
             "mod_wsgi",
             "requests",


Test patch: