source: projects/specs/branches/6/p/python-markupsafe/python-markupsafe-vl.spec @ 3793

Revision 3793, 2.9 KB checked in by iwaim, 13 years ago (diff)

python-markupsafe-0.12-1

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.12
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
23Vendor: Project Vine
24Distribution: Vine Linux
25
26%description
27A library for safe markup escaping.
28
29%if 0%{?with_python3}
30%package -n python3-markupsafe
31Summary: Implements a XML/HTML/XHTML Markup safe string for Python
32Group: Development/Languages
33
34%description -n python3-markupsafe
35A library for safe markup escaping.
36%endif #if with_python3
37
38%prep
39%setup -q -n MarkupSafe-%{version}
40
41%if 0%{?with_python3}
42%__rm -rf %{py3dir}
43%__cp -a . %{py3dir}
442to3 --write --nobackups %{py3dir}
45%endif # with_python3
46
47%build
48CFLAGS="$RPM_OPT_FLAGS" %{__python} setup.py build
49
50%if 0%{?with_python3}
51pushd %{py3dir}
52CFLAGS="$RPM_OPT_FLAGS" %{__python3} setup.py build
53popd
54%endif # with_python3
55
56
57%install
58%__rm -rf $RPM_BUILD_ROOT
59%{__python} setup.py install -O1 --skip-build --root $RPM_BUILD_ROOT
60# C code errantly gets installed
61%__rm $RPM_BUILD_ROOT/%{python_sitearch}/markupsafe/*.c
62
63%if 0%{?with_python3}
64pushd %{py3dir}
65%{__python3} setup.py install -O1 --skip-build --root $RPM_BUILD_ROOT
66%__rm $RPM_BUILD_ROOT/%{python3_sitearch}/markupsafe/*.c
67popd
68%endif # with_python3
69
70
71%check
72%{__python} setup.py test
73
74%if 0%{?with_python3}
75pushd %{py3dir}
76%{__python3} setup.py test
77popd
78%endif # with_python3
79
80%clean
81%__rm -rf $RPM_BUILD_ROOT
82
83
84%files
85%defattr(-,root,root,-)
86%doc AUTHORS LICENSE README.rst
87%{python_sitearch}/*
88
89%if 0%{?with_python3}
90%files -n python3-markupsafe
91%defattr(-,root,root,-)
92%doc AUTHORS LICENSE README.rst
93%{python3_sitearch}/*
94%endif # with_python3
95
96
97%changelog
98* Thu May  5 2011 IWAI, Masaharu <iwai@alib.jp> 0.12-1
99- new upstream release
100- add Vendor and Distribution tags
101
102* Mon Aug 23 2010 Munehiro Yamamoto <munepi@vinelinux.org> - 0.9.2-1
103- initial build based on Fedora development
104
105* Fri Jul 23 2010 David Malcolm <dmalcolm@redhat.com> - 0.9.2-4
106- Rebuilt for https://fedoraproject.org/wiki/Features/Python_2.7/MassRebuild
107
108* Thu Jun 24 2010 Kyle VanderBeek <kylev@kylev.com> - 0.9.2-3
109- Fix missing setuptools BuildRequires.
110
111* Thu Jun 24 2010 Kyle VanderBeek <kylev@kylev.com> - 0.9.2-2
112- Fixed sitearch and python3 definitions to work better with older Fedora/RHEL.
113
114* Wed Jun 23 2010 Kyle VanderBeek <kylev@kylev.com> - 0.9.2-1
115- Initial version.
Note: See TracBrowser for help on using the repository browser.