python-markupsafe-vl.spec 3.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124
  1. %global with_python3 1
  2. Summary: Implements a XML/HTML/XHTML Markup safe string for Python
  3. Name: python-markupsafe
  4. Version: 1.1.1
  5. Release: 2%{?_dist_release}
  6. Group: programming
  7. Vendor: Project Vine
  8. Distribution: Vine Linux
  9. License: BSD
  10. URL: https://pypi.python.org/pypi/MarkupSafe
  11. Source0: https://pypi.python.org/packages/source/M/MarkupSafe/MarkupSafe-%{version}.tar.gz
  12. BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
  13. BuildRequires: python-rpm-macros
  14. BuildRequires: python-devel python-setuptools python2-rpm-macros
  15. %if 0%{?with_python3}
  16. BuildRequires: python3-devel python3-setuptools python3-rpm-macros
  17. %endif # if with_python3
  18. %description
  19. A library for safe markup escaping.
  20. %if 0%{?with_python3}
  21. %package -n python3-markupsafe
  22. Summary: Implements a XML/HTML/XHTML Markup safe string for Python
  23. Group: programming
  24. %description -n python3-markupsafe
  25. A library for safe markup escaping.
  26. %endif #if with_python3
  27. %prep
  28. %setup -q -n MarkupSafe-%{version}
  29. %if 0%{?with_python3}
  30. %__rm -rf %{py3dir}
  31. %__cp -a . %{py3dir}
  32. %endif # with_python3
  33. %build
  34. export CFLAGS="$RPM_OPT_FLAGS"
  35. %py2_build
  36. %if 0%{?with_python3}
  37. %py3_build
  38. %endif # with_python3
  39. %install
  40. %__rm -rf $RPM_BUILD_ROOT
  41. %py2_install
  42. # C code errantly gets installed
  43. %__rm $RPM_BUILD_ROOT/%{python_sitearch}/markupsafe/*.c
  44. %if 0%{?with_python3}
  45. %py3_install
  46. %__rm $RPM_BUILD_ROOT/%{python3_sitearch}/markupsafe/*.c
  47. %endif # with_python3
  48. %check
  49. %{__python2} setup.py test
  50. %if 0%{?with_python3}
  51. %{__python3} setup.py test
  52. %endif # with_python3
  53. %clean
  54. %__rm -rf $RPM_BUILD_ROOT
  55. %files
  56. %defattr(-,root,root,-)
  57. %license LICENSE*
  58. %doc CHANGES* README*
  59. %{python2_sitearch}/*
  60. %if 0%{?with_python3}
  61. %files -n python3-markupsafe
  62. %defattr(-,root,root,-)
  63. %license LICENSE*
  64. %doc CHANGES* README*
  65. %{python3_sitearch}/*
  66. %endif # with_python3
  67. %changelog
  68. * Thu Oct 15 2020 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 1.1.1-2
  69. - rebuilt with python3.8.
  70. * Sun Aug 16 2020 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 1.1.1-1
  71. - new upstream release.
  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.