1 | %global with_python3 1 |
---|
2 | |
---|
3 | Name: python-markupsafe |
---|
4 | Version: 1.1.0 |
---|
5 | Release: 1%{?_dist_release} |
---|
6 | Summary: Implements a XML/HTML/XHTML Markup safe string for Python |
---|
7 | |
---|
8 | Group: Development/Languages |
---|
9 | License: BSD |
---|
10 | URL: http://pypi.python.org/pypi/MarkupSafe |
---|
11 | Source0: http://pypi.python.org/packages/source/M/MarkupSafe/MarkupSafe-%{version}.tar.gz |
---|
12 | BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) |
---|
13 | |
---|
14 | BuildRequires: python-devel python-setuptools python-rpm-macros |
---|
15 | |
---|
16 | %if 0%{?with_python3} |
---|
17 | BuildRequires: python3-devel python3-setuptools python3-rpm-macros |
---|
18 | %endif # if with_python3 |
---|
19 | |
---|
20 | Vendor: Project Vine |
---|
21 | Distribution: Vine Linux |
---|
22 | |
---|
23 | %description |
---|
24 | A library for safe markup escaping. |
---|
25 | |
---|
26 | %if 0%{?with_python3} |
---|
27 | %package -n python3-markupsafe |
---|
28 | Summary: Implements a XML/HTML/XHTML Markup safe string for Python |
---|
29 | Group: Development/Languages |
---|
30 | |
---|
31 | %description -n python3-markupsafe |
---|
32 | A library for safe markup escaping. |
---|
33 | %endif #if with_python3 |
---|
34 | |
---|
35 | %prep |
---|
36 | %setup -q -n MarkupSafe-%{version} |
---|
37 | |
---|
38 | %if 0%{?with_python3} |
---|
39 | %__rm -rf %{py3dir} |
---|
40 | %__cp -a . %{py3dir} |
---|
41 | %endif # with_python3 |
---|
42 | |
---|
43 | %build |
---|
44 | CFLAGS="$RPM_OPT_FLAGS" %{__python} setup.py build |
---|
45 | |
---|
46 | %if 0%{?with_python3} |
---|
47 | pushd %{py3dir} |
---|
48 | CFLAGS="$RPM_OPT_FLAGS" %{__python3} setup.py build |
---|
49 | popd |
---|
50 | %endif # with_python3 |
---|
51 | |
---|
52 | |
---|
53 | %install |
---|
54 | %__rm -rf $RPM_BUILD_ROOT |
---|
55 | %{__python} setup.py install -O1 --skip-build --root $RPM_BUILD_ROOT |
---|
56 | # C code errantly gets installed |
---|
57 | %__rm $RPM_BUILD_ROOT/%{python_sitearch}/markupsafe/*.c |
---|
58 | |
---|
59 | %if 0%{?with_python3} |
---|
60 | pushd %{py3dir} |
---|
61 | %{__python3} setup.py install -O1 --skip-build --root $RPM_BUILD_ROOT |
---|
62 | %__rm $RPM_BUILD_ROOT/%{python3_sitearch}/markupsafe/*.c |
---|
63 | popd |
---|
64 | %endif # with_python3 |
---|
65 | |
---|
66 | |
---|
67 | %check |
---|
68 | %{__python} setup.py test |
---|
69 | |
---|
70 | %if 0%{?with_python3} |
---|
71 | pushd %{py3dir} |
---|
72 | %{__python3} setup.py test |
---|
73 | popd |
---|
74 | %endif # with_python3 |
---|
75 | |
---|
76 | %clean |
---|
77 | %__rm -rf $RPM_BUILD_ROOT |
---|
78 | |
---|
79 | |
---|
80 | %files |
---|
81 | %defattr(-,root,root,-) |
---|
82 | %license LICENSE* |
---|
83 | %doc CHANGES* README* |
---|
84 | %{python_sitearch}/* |
---|
85 | |
---|
86 | %if 0%{?with_python3} |
---|
87 | %files -n python3-markupsafe |
---|
88 | %defattr(-,root,root,-) |
---|
89 | %license LICENSE* |
---|
90 | %doc CHANGES* README* |
---|
91 | %{python3_sitearch}/* |
---|
92 | %endif # with_python3 |
---|
93 | |
---|
94 | |
---|
95 | %changelog |
---|
96 | * Tue Nov 27 2018 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 1.1.0-1 |
---|
97 | - new upstream release. |
---|
98 | - added python3 support. |
---|
99 | |
---|
100 | * Sun Jan 12 2014 Yoji TOYODA <bsyamato@sea.plala.or.jp> 0.12-3 |
---|
101 | - rebuild with VineSeed environment |
---|
102 | |
---|
103 | * Sun Feb 19 2012 Yoji TOYODA <bsyamato@sea.plala.or.jp> 0.12-2 |
---|
104 | - rebuild with python-2.7.2 |
---|
105 | |
---|
106 | * Thu May 5 2011 IWAI, Masaharu <iwai@alib.jp> 0.12-1 |
---|
107 | - new upstream release |
---|
108 | - add Vendor and Distribution tags |
---|
109 | |
---|
110 | * Mon Aug 23 2010 Munehiro Yamamoto <munepi@vinelinux.org> - 0.9.2-1 |
---|
111 | - initial build based on Fedora development |
---|
112 | |
---|
113 | * Fri Jul 23 2010 David Malcolm <dmalcolm@redhat.com> - 0.9.2-4 |
---|
114 | - Rebuilt for https://fedoraproject.org/wiki/Features/Python_2.7/MassRebuild |
---|
115 | |
---|
116 | * Thu Jun 24 2010 Kyle VanderBeek <kylev@kylev.com> - 0.9.2-3 |
---|
117 | - Fix missing setuptools BuildRequires. |
---|
118 | |
---|
119 | * Thu Jun 24 2010 Kyle VanderBeek <kylev@kylev.com> - 0.9.2-2 |
---|
120 | - Fixed sitearch and python3 definitions to work better with older Fedora/RHEL. |
---|
121 | |
---|
122 | * Wed Jun 23 2010 Kyle VanderBeek <kylev@kylev.com> - 0.9.2-1 |
---|
123 | - Initial version. |
---|