recipes: python/*: adjust outdir for the new python/ series
[dragora.git] / recipes / python / six / recipe
blob250399082eb58dc05269fe639d218fec94a8f745
1 # Build recipe for six.
3 # Copyright (C) 2018, MMPG <mmpg@vp.pl>
4 # Copyright (C) 2018-2019 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 program=six
19 version=1.12.0
20 release=2
22 # Set 'outdir' for a nice and well-organized output directory
23 outdir="${outdir}/${arch}/python"
25 tarname=${program}-${version}.tar.gz
27 # Remote source(s)
28 fetch=http://files.pythonhosted.org/packages/dd/bf/4138e7bfb757de47d1f4b6994648ec67a51efe58fa907c1e11e350cddfca/$tarname
30 description="
31 A Python 2 and 3 compatibility library.
33 It provides utility functions for smoothing over the differences
34 between the Python versions with the goal of writing Python code
35 that is compatible on both Python versions.
38 homepage=http://github.com/benjaminp/six
39 license=MIT
41 docs="CHANGES LICENSE PKG-INFO README.rst"
42 docsdir="${docdir}/${program}-${version}"
44 build()
46     set -e
48     unpack "${tardir}/$tarname"
50     cd "$srcdir"
52     # Set sane permissions
53     chmod -R u+w,go-w,a+rX-s .
55     # Install for both, Python versions 2 and 3
57     for i in 2 3
58     do
59         python${i} setup.py build
60         python${i} setup.py install --prefix=/usr --root="$destdir" --optimize=1
61     done
62     unset i
64     # Copy documentation
65     mkdir -p "${destdir}${docsdir}"
66     cp -p $docs "${destdir}${docsdir}"