recipes: Adjust 'docsdir' variable to be consistent with the current recipe format
[dragora.git] / recipes / python / six / recipe
blob5aa01cf5ab88c8749126ec88696d344777145c85
1 # Build recipe for six.
3 # Copyright (C) 2018, MMPG <mmpg@vp.pl>
4 # Copyright (C) 2018-2022 Matias Fonzo, <selk@dragora.org>.
6 # Licensed under the Apache License, Version 2.0 (the "License");
7 # you may not use this file except in compliance with the License.
8 # You may obtain a copy of the License at
10 #    http://www.apache.org/licenses/LICENSE-2.0
12 # Unless required by applicable law or agreed to in writing, software
13 # distributed under the License is distributed on an "AS IS" BASIS,
14 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15 # See the License for the specific language governing permissions and
16 # limitations under the License.
18 # Exit immediately on any error
19 set -e
21 program=six
22 version=1.16.0
23 release=1
25 pkgname=python-${program}
27 # Define a category for the output of the package name
28 pkgcategory=python
30 tarname=${program}-${version}.tar.gz
32 # Remote source(s)
33 fetch=https://files.pythonhosted.org/packages/71/39/171f1c67cd00715f190ba0b100d606d440a28c93c7714febeca8b79af85e/$tarname
35 description="
36 A Python 2 and 3 compatibility library.
38 It provides utility functions for smoothing over the differences
39 between the Python versions with the goal of writing Python code
40 that is compatible on both Python versions.
43 homepage=https://github.com/benjaminp/six
44 license=MIT
46 docs="CHANGES LICENSE PKG-INFO README.rst"
47 docsdir="${docdir}/${program}-${version}"
49 build()
51     unpack "${tardir}/$tarname"
53     cd "$srcdir"
55     # Set sane permissions
56     chmod -R u+w,go-w,a+rX-s .
58     python3 setup.py build
59     python3 setup.py install --prefix=/usr --root="$destdir" --optimize=1
61     # Copy documentation
62     mkdir -p "${destdir}/$docsdir"
63     cp -p $docs "${destdir}/$docsdir"