Start mass upgrade
[dragora.git] / recipes / python / markupsafe / recipe
blob24f1841ab327363fbde9597ea2c69b511c4be8e1
1 # Build recipe for markupsafe.
3 # Copyright (C) 2019-2022 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=MarkupSafe
21 version=2.0.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/bf/10/ff66fea6d1788c458663a84d88787bae15d45daa16f6b3ef33322a51fc7e/$tarname
34 description="
35 A Python module that implements a XML/HTML/XHTML Markup safe string.
37 MarkupSafe implements a text object that escapes characters so it is
38 safe to use in HTML and XML.  Characters that have special meanings
39 are replaced so that they display as the actual characters.  This
40 mitigates injection attacks, meaning untrusted user input can safely
41 be displayed on a page.  Escaping is implemented in C so it is as
42 efficient as possible.
45 homepage=https://palletsprojects.com/p/markupsafe
46 license="BSD License (BSD-3-Clause)"
48 docs="CHANGES* LICENSE* PKG-INFO README*"
49 docsdir="${docdir}/${pkgname}-${version}"
51 build()
53     unpack "${tardir}/$tarname"
55     cd "$srcdir"
57     # Set sane permissions
58     chmod -R u+w,go-w,a+rX-s .
60     python3 setup.py build
61     python3 setup.py install --prefix=/usr --root="$destdir" --optimize=1
63     # Copy documentation
64     mkdir -p "${destdir}${docsdir}"
65     cp -p $docs "${destdir}${docsdir}"