Repository: WeblateOrg/weblate

Issue:
Time to use `build` from `setuptools` instead of `distutils`?
### Describe the problem

The following feature in setuptools has been deprecated for almost 2 years and is about to be removed:

https://github.com/pypa/setuptools/blob/1ed759173983656734c3606e9c97a348895e5e0c/setuptools/command/build.py#L13-L27

It might be a good idea to import `build` directly from setuptools for the following code:

https://github.com/WeblateOrg/weblate/blob/47f9f2870c4ed9fd5429eebfacc61d2267a5bb31/setup.py#L9
https://github.com/WeblateOrg/weblate/blob/47f9f2870c4ed9fd5429eebfacc61d2267a5bb31/setup.py#L51-L58

(`build` is available directly from setuptools, starting on version v62.4.0)

### Describe the solution you would like

Whenever possible, it might be a good idea to import from setuptools (and minimise imports to `distutils` to the minimum viable).

### Describe alternatives you have considered

_No response_

### Screenshots

_No response_

### Additional context

_No response_
Time to use `build` from `setuptools` instead of `distutils`?
### Describe the problem

The following feature in setuptools has been deprecated for almost 2 years and is about to be removed:

https://github.com/pypa/setuptools/blob/1ed759173983656734c3606e9c97a348895e5e0c/setuptools/command/build.py#L13-L27

It might be a good idea to import `build` directly from setuptools for the following code:

https://github.com/WeblateOrg/weblate/blob/47f9f2870c4ed9fd5429eebfacc61d2267a5bb31/setup.py#L9
https://github.com/WeblateOrg/weblate/blob/47f9f2870c4ed9fd5429eebfacc61d2267a5bb31/setup.py#L51-L58

(`build` is available directly from setuptools, starting on version v62.4.0)

### Describe the solution you would like

Whenever possible, it might be a good idea to import from setuptools (and minimise imports to `distutils` to the minimum viable).

### Describe alternatives you have considered

_No response_

### Screenshots

_No response_

### Additional context

_No response_


Discussion:
This issue seems to be a good fit for newbie contributors. You are welcome to contribute to Weblate! Don't hesitate to ask any questions you would have while implementing this.

You can learn about how to get started in our [contributors documentation](https://docs.weblate.org/en/latest/contributing/index.html).
Hey Team ! I would like to work on this issue ! 
This issue seems to be a good fit for newbie contributors. You are welcome to contribute to Weblate! Don't hesitate to ask any questions you would have while implementing this.

You can learn about how to get started in our [contributors documentation](https://docs.weblate.org/en/latest/contributing/index.html).
Hey Team ! I would like to work on this issue ! 

Resolving patch:
diff --git a/setup.py b/setup.py
--- a/setup.py
+++ b/setup.py
@@ -6,12 +6,12 @@
 
 import os
 from distutils import log
-from distutils.command.build import build
 from distutils.core import Command
 from glob import glob
 from itertools import chain
 
 from setuptools import setup
+from setuptools.command.build import build
 from setuptools.command.build_py import build_py
 from setuptools.modified import newer
 from translate.tools.pocompile import convertmo


Test patch: