source: projects/specs/trunk/p/python-markupsafe/python-markupsafe-vl.spec @ 1741

Revision 1741, 2.7 KB checked in by munepi, 14 years ago (diff)

NEW calibre: updated/added calibre's dependencies

Line 
1%global with_python3 0
2%{!?python_sitearch: %global python_sitearch %(%{__python} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib(1))")}
3
4Name: python-markupsafe
5Version: 0.9.2
6Release: 1%{?_dist_release}
7Summary: Implements a XML/HTML/XHTML Markup safe string for Python
8
9Group: Development/Languages
10License: BSD
11URL: http://pypi.python.org/pypi/MarkupSafe
12Source0: http://pypi.python.org/packages/source/M/MarkupSafe/MarkupSafe-%{version}.tar.gz
13BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
14
15BuildRequires: python-devel python-setuptools
16
17%if 0%{?with_python3}
18BuildRequires: python3-devel python3-setuptools
19# For /usr/bin/2to3
20BuildRequires: python-tools
21%endif # if with_python3
22
23
24%description
25A library for safe markup escaping.
26
27%if 0%{?with_python3}
28%package -n python3-markupsafe
29Summary: Implements a XML/HTML/XHTML Markup safe string for Python
30Group: Development/Languages
31
32%description -n python3-markupsafe
33A library for safe markup escaping.
34%endif #if with_python3
35
36%prep
37%setup -q -n MarkupSafe-%{version}
38
39%if 0%{?with_python3}
40%__rm -rf %{py3dir}
41%__cp -a . %{py3dir}
422to3 --write --nobackups %{py3dir}
43%endif # with_python3
44
45%build
46CFLAGS="$RPM_OPT_FLAGS" %{__python} setup.py build
47
48%if 0%{?with_python3}
49pushd %{py3dir}
50CFLAGS="$RPM_OPT_FLAGS" %{__python3} setup.py build
51popd
52%endif # with_python3
53
54
55%install
56%__rm -rf $RPM_BUILD_ROOT
57%{__python} setup.py install -O1 --skip-build --root $RPM_BUILD_ROOT
58# C code errantly gets installed
59%__rm $RPM_BUILD_ROOT/%{python_sitearch}/markupsafe/*.c
60
61%if 0%{?with_python3}
62pushd %{py3dir}
63%{__python3} setup.py install -O1 --skip-build --root $RPM_BUILD_ROOT
64%__rm $RPM_BUILD_ROOT/%{python3_sitearch}/markupsafe/*.c
65popd
66%endif # with_python3
67
68
69%check
70%{__python} setup.py test
71
72%if 0%{?with_python3}
73pushd %{py3dir}
74%{__python3} setup.py test
75popd
76%endif # with_python3
77
78%clean
79%__rm -rf $RPM_BUILD_ROOT
80
81
82%files
83%defattr(-,root,root,-)
84%doc AUTHORS LICENSE README.rst
85%{python_sitearch}/*
86
87%if 0%{?with_python3}
88%files -n python3-markupsafe
89%defattr(-,root,root,-)
90%doc AUTHORS LICENSE README.rst
91%{python3_sitearch}/*
92%endif # with_python3
93
94
95%changelog
96* Mon Aug 23 2010 Munehiro Yamamoto <munepi@vinelinux.org> - 0.9.2-1
97- initial build based on Fedora development
98
99* Fri Jul 23 2010 David Malcolm <dmalcolm@redhat.com> - 0.9.2-4
100- Rebuilt for https://fedoraproject.org/wiki/Features/Python_2.7/MassRebuild
101
102* Thu Jun 24 2010 Kyle VanderBeek <kylev@kylev.com> - 0.9.2-3
103- Fix missing setuptools BuildRequires.
104
105* Thu Jun 24 2010 Kyle VanderBeek <kylev@kylev.com> - 0.9.2-2
106- Fixed sitearch and python3 definitions to work better with older Fedora/RHEL.
107
108* Wed Jun 23 2010 Kyle VanderBeek <kylev@kylev.com> - 0.9.2-1
109- Initial version.
Note: See TracBrowser for help on using the repository browser.