python-markupsafe-vl.spec 3.0 KB

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