Issue building from source on Fedora 37 Python 3.11

Dear maintainers,
 I've recently updated my system to Fedora 37, shipping python 3.11.

I've created and activated a new python venv
```
python3 -m venv skldevenv/
source ~/skldevenv/bin/activate
```
then build main at commit  a7cd0ca44d0af64bc22a7213371e3c11d94dbbe8 in editable mode
```
pip install -e .
```
The build fails with the following error
```trpy
 python setup.py develop did not run successfully.
│ exit code: 1
╰─> [51 lines of output]
    Partial import of sklearn during the build process.
    running develop
    /tmp/pip-build-env-kiiuo3x3/overlay/lib/python3.11/site-packages/setuptools/command/easy_install.py:156: EasyInstallDeprecationWarning: easy_install command is deprecated. Use build and pip and other standards-based tools.
      warnings.warn(
    /tmp/pip-build-env-kiiuo3x3/overlay/lib/python3.11/site-packages/setuptools/command/install.py:34: SetuptoolsDeprecationWarning: setup.py install is deprecated. Use build and pip and other standards-based tools.
 
```

<details><summary>Full traceback</summary>

```trpy
Obtaining file:///home/cmarmo/software/scikit-learn
  Installing build dependencies ... done
  Checking if build backend supports build_editable ... done
  Getting requirements to build wheel ... done
  Preparing metadata (pyproject.toml) ... done
Requirement already satisfied: numpy>=1.17.3 in /home/cmarmo/skldevenv/lib64/python3.11/site-packages (from scikit-learn==1.3.dev0) (1.24.1)
Requirement already satisfied: scipy>=1.3.2 in /home/cmarmo/skldevenv/lib64/python3.11/site-packages (from scikit-learn==1.3.dev0) (1.10.0)
Requirement already satisfied: joblib>=1.1.1 in /home/cmarmo/skldevenv/lib64/python3.11/site-packages (from scikit-learn==1.3.dev0) (1.2.0)
Requirement already satisfied: threadpoolctl>=2.0.0 in /home/cmarmo/skldevenv/lib64/python3.11/site-packages (from scikit-learn==1.3.dev0) (3.1.0)
Installing collected packages: scikit-learn
  Running setup.py develop for scikit-learn
    error: subprocess-exited-with-error
    
    × python setup.py develop did not run successfully.
    │ exit code: 1
    ╰─> [51 lines of output]
        Partial import of sklearn during the build process.
        running develop
        /tmp/pip-build-env-kiiuo3x3/overlay/lib/python3.11/site-packages/setuptools/command/easy_install.py:156: EasyInstallDeprecationWarning: easy_install command is deprecated. Use build and pip and other standards-based tools.
          warnings.warn(
        /tmp/pip-build-env-kiiuo3x3/overlay/lib/python3.11/site-packages/setuptools/command/install.py:34: SetuptoolsDeprecationWarning: setup.py install is deprecated. Use build and pip and other standards-based tools.
          warnings.warn(
        Traceback (most recent call last):
          File "<string>", line 2, in <module>
          File "<pip-setuptools-caller>", line 34, in <module>
          File "/home/cmarmo/software/scikit-learn/setup.py", line 679, in <module>
            setup_package()
          File "/home/cmarmo/software/scikit-learn/setup.py", line 675, in setup_package
            setup(**metadata)
          File "/tmp/pip-build-env-kiiuo3x3/overlay/lib/python3.11/site-packages/setuptools/__init__.py", line 153, in setup
            return distutils.core.setup(**attrs)
                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
          File "/tmp/pip-build-env-kiiuo3x3/overlay/lib/python3.11/site-packages/setuptools/_distutils/core.py", line 148, in setup
            return run_commands(dist)
                   ^^^^^^^^^^^^^^^^^^
          File "/tmp/pip-build-env-kiiuo3x3/overlay/lib/python3.11/site-packages/setuptools/_distutils/core.py", line 163, in run_commands
            dist.run_commands()
          File "/tmp/pip-build-env-kiiuo3x3/overlay/lib/python3.11/site-packages/setuptools/_distutils/dist.py", line 967, in run_commands
            self.run_command(cmd)
          File "/tmp/pip-build-env-kiiuo3x3/overlay/lib/python3.11/site-packages/setuptools/_distutils/dist.py", line 985, in run_command
            cmd_obj.ensure_finalized()
          File "/tmp/pip-build-env-kiiuo3x3/overlay/lib/python3.11/site-packages/setuptools/_distutils/cmd.py", line 107, in ensure_finalized
            self.finalize_options()
          File "/tmp/pip-build-env-kiiuo3x3/overlay/lib/python3.11/site-packages/setuptools/command/develop.py", line 52, in finalize_options
            easy_install.finalize_options(self)
          File "/tmp/pip-build-env-kiiuo3x3/overlay/lib/python3.11/site-packages/setuptools/command/easy_install.py", line 268, in finalize_options
            self._expand(
          File "/tmp/pip-build-env-kiiuo3x3/overlay/lib/python3.11/site-packages/setuptools/command/easy_install.py", line 1344, in _expand
            config_vars = self.get_finalized_command('install').config_vars
                          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
          File "/tmp/pip-build-env-kiiuo3x3/overlay/lib/python3.11/site-packages/setuptools/_distutils/cmd.py", line 299, in get_finalized_command
            cmd_obj.ensure_finalized()
          File "/tmp/pip-build-env-kiiuo3x3/overlay/lib/python3.11/site-packages/setuptools/_distutils/cmd.py", line 107, in ensure_finalized
            self.finalize_options()
          File "/tmp/pip-build-env-kiiuo3x3/overlay/lib/python3.11/site-packages/setuptools/command/install.py", line 45, in finalize_options
            orig.install.finalize_options(self)
          File "/tmp/pip-build-env-kiiuo3x3/overlay/lib/python3.11/site-packages/setuptools/_distutils/command/install.py", line 325, in finalize_options
            self.finalize_unix()
          File "/tmp/pip-build-env-kiiuo3x3/overlay/lib/python3.11/site-packages/setuptools/_distutils/command/install.py", line 498, in finalize_unix
            self.select_scheme("posix_prefix")
          File "/tmp/pip-build-env-kiiuo3x3/overlay/lib/python3.11/site-packages/setuptools/_distutils/command/install.py", line 528, in select_scheme
            return self._select_scheme(resolved)
                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
          File "/tmp/pip-build-env-kiiuo3x3/overlay/lib/python3.11/site-packages/setuptools/_distutils/command/install.py", line 537, in _select_scheme
            setattr(self, attrname, scheme[key])
                                    ~~~~~~^^^^^
        KeyError: 'headers'
        [end of output]
    
    note: This error originates from a subprocess, and is likely not a problem with pip.
error: subprocess-exited-with-error

× python setup.py develop did not run successfully.
│ exit code: 1
╰─> [51 lines of output]
    Partial import of sklearn during the build process.
    running develop
    /tmp/pip-build-env-kiiuo3x3/overlay/lib/python3.11/site-packages/setuptools/command/easy_install.py:156: EasyInstallDeprecationWarning: easy_install command is deprecated. Use build and pip and other standards-based tools.
      warnings.warn(
    /tmp/pip-build-env-kiiuo3x3/overlay/lib/python3.11/site-packages/setuptools/command/install.py:34: SetuptoolsDeprecationWarning: setup.py install is deprecated. Use build and pip and other standards-based tools.
      warnings.warn(
    Traceback (most recent call last):
      File "<string>", line 2, in <module>
      File "<pip-setuptools-caller>", line 34, in <module>
      File "/home/cmarmo/software/scikit-learn/setup.py", line 679, in <module>
        setup_package()
      File "/home/cmarmo/software/scikit-learn/setup.py", line 675, in setup_package
        setup(**metadata)
      File "/tmp/pip-build-env-kiiuo3x3/overlay/lib/python3.11/site-packages/setuptools/__init__.py", line 153, in setup
        return distutils.core.setup(**attrs)
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
      File "/tmp/pip-build-env-kiiuo3x3/overlay/lib/python3.11/site-packages/setuptools/_distutils/core.py", line 148, in setup
        return run_commands(dist)
               ^^^^^^^^^^^^^^^^^^
      File "/tmp/pip-build-env-kiiuo3x3/overlay/lib/python3.11/site-packages/setuptools/_distutils/core.py", line 163, in run_commands
        dist.run_commands()
      File "/tmp/pip-build-env-kiiuo3x3/overlay/lib/python3.11/site-packages/setuptools/_distutils/dist.py", line 967, in run_commands
        self.run_command(cmd)
      File "/tmp/pip-build-env-kiiuo3x3/overlay/lib/python3.11/site-packages/setuptools/_distutils/dist.py", line 985, in run_command
        cmd_obj.ensure_finalized()
      File "/tmp/pip-build-env-kiiuo3x3/overlay/lib/python3.11/site-packages/setuptools/_distutils/cmd.py", line 107, in ensure_finalized
        self.finalize_options()
      File "/tmp/pip-build-env-kiiuo3x3/overlay/lib/python3.11/site-packages/setuptools/command/develop.py", line 52, in finalize_options
        easy_install.finalize_options(self)
      File "/tmp/pip-build-env-kiiuo3x3/overlay/lib/python3.11/site-packages/setuptools/command/easy_install.py", line 268, in finalize_options
        self._expand(
      File "/tmp/pip-build-env-kiiuo3x3/overlay/lib/python3.11/site-packages/setuptools/command/easy_install.py", line 1344, in _expand
        config_vars = self.get_finalized_command('install').config_vars
                      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
      File "/tmp/pip-build-env-kiiuo3x3/overlay/lib/python3.11/site-packages/setuptools/_distutils/cmd.py", line 299, in get_finalized_command
        cmd_obj.ensure_finalized()
      File "/tmp/pip-build-env-kiiuo3x3/overlay/lib/python3.11/site-packages/setuptools/_distutils/cmd.py", line 107, in ensure_finalized
        self.finalize_options()
      File "/tmp/pip-build-env-kiiuo3x3/overlay/lib/python3.11/site-packages/setuptools/command/install.py", line 45, in finalize_options
        orig.install.finalize_options(self)
      File "/tmp/pip-build-env-kiiuo3x3/overlay/lib/python3.11/site-packages/setuptools/_distutils/command/install.py", line 325, in finalize_options
        self.finalize_unix()
      File "/tmp/pip-build-env-kiiuo3x3/overlay/lib/python3.11/site-packages/setuptools/_distutils/command/install.py", line 498, in finalize_unix
        self.select_scheme("posix_prefix")
      File "/tmp/pip-build-env-kiiuo3x3/overlay/lib/python3.11/site-packages/setuptools/_distutils/command/install.py", line 528, in select_scheme
        return self._select_scheme(resolved)
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
      File "/tmp/pip-build-env-kiiuo3x3/overlay/lib/python3.11/site-packages/setuptools/_distutils/command/install.py", line 537, in _select_scheme
        setattr(self, attrname, scheme[key])
                                ~~~~~~^^^^^
    KeyError: 'headers'
    [end of output]

note: This error originates from a subprocess, and is likely not a problem with pip.
```

</details>

This is due to the fact that when creating the virtual environment setuptools 62.6.0 is installed
```
Python 3.11.1 (main, Jan  6 2023, 00:00:00) [GCC 12.2.1 20221121 (Red Hat 12.2.1-4)] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import setuptools
>>> setuptools.__version__
'62.6.0'
```
while scikit-learn asks for setuptools<60.0

Uninstalling setuptools
```
pip uninstall setuptools
```
and rebuilding
```
pip install -e .
```
fixes the issue.

Sharing here if anyone else experiences the same, and like me doesn't know setuptools is installed by default in the venv (maybe in Fedora?) ... and also naively assumes pyproject.toml directive is enough to rectify the installed version of setuptools....

COMMENT:
This also happens with macOS/ARM64 when using python 3.11 and virtualenvs.

Labels: Build / CI