recipes: Upgrade of meson and setuptools
[dragora.git] / recipes / python / setuptools / recipe
blobc20b519f217fcaa5da681b17a1a93be9eefc3f24
1 # Build recipe for setuptools.
3 # Copyright (C) 2020-2023 Matias Fonzo, <selk@dragora.org>.
5 # Licensed under the Apache License, Version 2.0 (the "License");
6 # you may not use this file except in compliance with the License.
7 # You may obtain a copy of the License at
9 #    http://www.apache.org/licenses/LICENSE-2.0
11 # Unless required by applicable law or agreed to in writing, software
12 # distributed under the License is distributed on an "AS IS" BASIS,
13 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 # See the License for the specific language governing permissions and
15 # limitations under the License.
17 # Exit immediately on any error
18 set -e
20 program=setuptools
21 version=67.6.1
22 release=1
24 pkgname=python-${program}
26 # Define a category for the output of the package name
27 pkgcategory=python
29 tarname=${program}-${version}.tar.gz
31 # Remote source(s)
32 fetch=https://files.pythonhosted.org/packages/b6/21/cb9a8d0b2c8597c83fce8e9c02884bce3d4951e41e807fc35791c6b23d9a/$tarname
34 description="
35 Easily build and distribute Python packages.
37 Setuptools is a fully-featured, actively-maintained, and stable library
38 designed to facilitate packaging Python projects, where packaging
39 includes:
41 - Python package and module definitions
42 - Distribution package metadata
43 - Test hooks
44 - Project installation
45 - Platform-specific details
46 - Python 3 support
48 For more information, see https://setuptools.readthedocs.io/en/latest/
51 homepage=https://pypi.org/project/setuptools/
52 license=MIT
54 docs="CHANGES* LICENSE* PKG-INFO README*"
55 docsdir="${docdir}/${pkgname}-${version}"
57 build()
59     unpack "${tardir}/$tarname"
61     cd "$srcdir"
63     # Set sane permissions
64     chmod -R u+w,go-w,a+rX-s .
66     python3 setup.py build
67     python3 setup.py install --prefix=/usr --root="$destdir" --optimize=1
69     # Copy documentation
70     mkdir -p "${destdir}/$docsdir"
71     cp -p $docs "${destdir}/$docsdir"