Repository: cobbler/cobbler

Issue:
Changes needed to accomodate Sphinx 7.x
### Describe the bug

If Sphinx 7.x is installed, during builds, the build fails with an error such as the following:

````(venv) [cinnion@wing-1 cobbler]$ make webtest
rm -rf //usr/share/cobbler
make savestate
Traceback (most recent call last):
  File "/home/cinnion/git.github/cobbler/setup.py", line 17, in <module>
    from sphinx.setup_command import BuildDoc
ModuleNotFoundError: No module named 'sphinx.setup_command'
make[1]: *** [Makefile:137: savestate] Error 1
make: *** [Makefile:132: devinstall] Error 2
````

The problem is caused by the removal of setup_command from Sphinx 7.x as a part of the removal of support for Setuptools.

<!--- HINT: You can paste gist.github.com links for long logs or larger files -->

### Steps to reproduce

1. Install/upgrade to Sphinx 7.x
2. Attempt to build (e.g. `make webtest`)
3.

### Expected behavior

The build should have proceeded without an error.

### Cobbler version

<!--- Paste output from `cobbler version` -->
````
Cobbler 3.3.3
  source: fcabb2b7, Wed Jun 21 08:53:01 2023 +0200
  build time: Wed Jun 21 23:57:10 2023
````

### Operating system

Rocky Linux release 9.2 (Blue Onyx)

### Cobbler log

<!--- Paste (partial) output from `/var/log/cobbler/cobbler.log` -->
````paste below
````

### Screenshots

<!--- If applicable, add screenshots to help explain your problem. -->

### Additional information

The build works fine up to Sphinx 6.2.1.



Discussion:

Resolving patch:
diff --git a/setup.py b/setup.py
--- a/setup.py
+++ b/setup.py
@@ -14,7 +14,6 @@
 from distutils.command.build import build as _build
 from configparser import ConfigParser
 from setuptools import find_packages
-from sphinx.setup_command import BuildDoc
 
 import codecs
 from coverage import Coverage
@@ -149,16 +148,6 @@ class build(_build):
     def run(self):
         _build.run(self)
 
-#####################################################################
-# # Build man pages using Sphinx  ###################################
-#####################################################################
-
-
-class build_man(BuildDoc):
-    def initialize_options(self):
-        BuildDoc.initialize_options(self)
-        self.builder = 'man'
-
 #####################################################################
 # # Configure files ##################################################
 #####################################################################
@@ -285,15 +274,7 @@ def has_configure_files(build):
     return bool(build.distribution.configure_files)
 
 
-def has_man_pages(build):
-    """Check if the distribution has configuration files to work on."""
-    return bool(build.distribution.man_pages)
-
-
-build.sub_commands.extend((
-    ('build_man', has_man_pages),
-    ('build_cfg', has_configure_files)
-))
+_build.sub_commands.extend((("build_cfg", has_configure_files),))
 
 
 #####################################################################
@@ -476,7 +457,6 @@ def run(self):
             'savestate': savestate,
             'restorestate': restorestate,
             'build_cfg': build_cfg,
-            'build_man': build_man
         },
         name="cobbler",
         version=VERSION,


Test patch: