recipes: python/*: adjust outdir for the new python/ series
[dragora.git] / recipes / python / markupsafe / recipe
blobab50d8fcef31bf86a9593a35e6cb51ee6a1fde79
1 # Build recipe for markupsafe.
3 # Copyright (C) 2019 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 program=MarkupSafe
18 version=1.1.1
19 release=2
21 pkgname=markupsafe
23 # Set 'outdir' for a nice and well-organized output directory
24 outdir="${outdir}/${arch}/python"
26 tarname=${program}-${version}.tar.gz
28 # Remote source(s)
29 fetch=http://files.pythonhosted.org/packages/b9/2e/64db92e53b86efccfaea71321f597fa2e1b2bd3853d8ce658568f7a13094/$tarname
31 description="
32 A Python module that implements a XML/HTML/XHTML Markup safe string.
34 MarkupSafe implements a text object that escapes characters so it is
35 safe to use in HTML and XML.  Characters that have special meanings
36 are replaced so that they display as the actual characters.  This
37 mitigates injection attacks, meaning untrusted user input can safely
38 be displayed on a page.  Escaping is implemented in C so it is as
39 efficient as possible.
42 homepage=http://palletsprojects.com/p/markupsafe
43 license="BSD License (BSD-3-Clause)"
45 docs="CHANGES* LICENSE* PKG-INFO README*"
46 docsdir="${docdir}/${pkgname}-${version}"
48 build()
50     set -e
52     unpack "${tardir}/$tarname"
54     cd "$srcdir"
56     # Set sane permissions
57     chmod -R u+w,go-w,a+rX-s .
59     # Install for both, Python versions 2 and 3
61     for i in 2 3
62     do
63         python${i} setup.py build
64         python${i} setup.py install --prefix=/usr --root="$destdir" --optimize=1
65     done
66     unset i
68     # Copy documentation
69     mkdir -p "${destdir}${docsdir}"
70     cp -p $docs "${destdir}${docsdir}"