python-markupsafe-vl.spec 3.0 KB

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