python-cryptography-vl.spec 9.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305
  1. %global with_python3 1
  2. %{!?python3_pkgversion:%global python3_pkgversion 3}
  3. %global srcname cryptography
  4. Summary: PyCA's cryptography library
  5. Name: python-%{srcname}
  6. Version: 3.0
  7. Release: 1%{?_dist_release}
  8. Group: programming
  9. Vendor: Project Vine
  10. Distribution: Vine Linux
  11. License: ASL 2.0 or BSD
  12. URL: https://cryptography.io/en/latest/
  13. Source0: https://pypi.io/packages/source/c/%{srcname}/%{srcname}-%{version}.tar.gz
  14. Requires: openssl
  15. Requires: python-idna >= 2.1
  16. Requires: python-asn1crypto >= 0.21
  17. Requires: python-six >= 1.4.1
  18. Requires: python-cffi >= 1.7
  19. Requires: python-enum34
  20. Requires: python-ipaddress
  21. BuildRequires: openssl-devel
  22. BuildRequires: gcc
  23. BuildRequires: python-rpm-macros
  24. BuildRequires: python2-rpm-macros
  25. BuildRequires: python-devel
  26. BuildRequires: python-setuptools
  27. BuildRequires: python-asn1crypto >= 0.21
  28. BuildRequires: python-idna >= 2.1
  29. BuildRequires: python-six >= 1.4.1
  30. BuildRequires: python-cffi >= 1.7
  31. BuildRequires: python-enum34
  32. BuildRequires: python-ipaddress
  33. %if 0%{?with_python3}
  34. BuildRequires: python%{python3_pkgversion}-rpm-macros
  35. BuildRequires: python%{python3_pkgversion}-devel
  36. BuildRequires: python%{python3_pkgversion}-setuptools
  37. BuildRequires: python%{python3_pkgversion}-asn1crypto >= 0.21
  38. BuildRequires: python%{python3_pkgversion}-idna >= 2.1
  39. BuildRequires: python%{python3_pkgversion}-six >= 1.4.1
  40. BuildRequires: python%{python3_pkgversion}-cffi >= 1.7
  41. %endif
  42. %description
  43. cryptography is a package designed to expose cryptographic primitives and
  44. recipes to Python developers.
  45. %if 0%{?with_python3}
  46. %{?python_provide:%python_provide python2-%{srcname}}
  47. %else
  48. Provides: python-%{srcname}
  49. %endif
  50. %if 0%{?with_python3}
  51. %package -n python%{python3_pkgversion}-%{srcname}
  52. Group: programming
  53. Summary: PyCA's cryptography library
  54. %{?python_provide:%python_provide python%{python3_pkgversion}-%{srcname}}
  55. Requires: openssl
  56. Requires: python%{python3_pkgversion}-idna >= 2.1
  57. Requires: python%{python3_pkgversion}-asn1crypto >= 0.21
  58. Requires: python%{python3_pkgversion}-six >= 1.4.1
  59. Requires: python%{python3_pkgversion}-cffi >= 1.7
  60. %description -n python%{python3_pkgversion}-%{srcname}
  61. cryptography is a package designed to expose cryptographic primitives and
  62. recipes to Python developers.
  63. %endif
  64. %prep
  65. %autosetup -p1 -n %{srcname}-%{version}
  66. %if 0%{?with_python3}
  67. rm -rf %{py3dir}
  68. cp -a . %{py3dir}
  69. find %{py3dir} -name '*.py' | xargs sed -i '1s|^#!/usr/bin/python|#!%{__python3}|'
  70. %endif
  71. %build
  72. %if 0%{?with_python3}
  73. %py_build
  74. pushd %{py3dir}
  75. %py3_build
  76. popd
  77. %else
  78. %{__python} setup.py build
  79. %endif # with_python3
  80. %install
  81. # Actually other *.c and *.h are appropriate
  82. # see https://github.com/pyca/cryptography/issues/1463
  83. find . -name .keep -print -delete
  84. %if 0%{?with_python3}
  85. %py_install
  86. pushd %{py3dir}
  87. %py3_install
  88. popd
  89. %else
  90. %{__python} setup.py install --skip-build --prefix=%{_prefix} --root %{buildroot}
  91. %endif # with_python3
  92. %check
  93. # workaround for pytest 3.2.0 bug https://github.com/pytest-dev/pytest/issues/2644
  94. rm -f tests/hazmat/primitives/test_padding.py
  95. #%{__python} setup.py test
  96. %if 0%{?with_python3}
  97. pushd %{py3dir}
  98. # workaround for pytest 3.2.0 bug https://github.com/pytest-dev/pytest/issues/2644
  99. rm -f tests/hazmat/primitives/test_padding.py
  100. #%{__python3} setup.py test
  101. popd
  102. %endif
  103. %files
  104. %license LICENSE*
  105. %doc README.rst docs
  106. %{python2_sitearch}/%{srcname}
  107. %{python2_sitearch}/%{srcname}-%{version}-py*.egg-info
  108. %if 0%{?with_python3}
  109. %files -n python%{python3_pkgversion}-%{srcname}
  110. %license LICENSE*
  111. %doc README.rst docs
  112. %{python3_sitearch}/*
  113. %{python3_sitearch}/%{srcname}-%{version}-py*.egg-info
  114. %endif
  115. %changelog
  116. * Sat Aug 15 2020 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> - 3.0-1
  117. - new upstream release.
  118. * Mon Nov 19 2018 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> - 2.4.1-1
  119. - initial build for Vine Linux.
  120. - new upstream release.
  121. * Mon Aug 13 2018 Christian Heimes <cheimes@redhat.com> - 2.3-2
  122. - Use TLSv1.2 in test as workaround for RHBZ#1615143
  123. * Wed Jul 18 2018 Christian Heimes <cheimes@redhat.com> - 2.3-1
  124. - New upstream release 2.3
  125. - Fix AEAD tag truncation bug, RHBZ#1602752
  126. * Fri Jul 13 2018 Fedora Release Engineering <releng@fedoraproject.org> - 2.2.1-3
  127. - Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
  128. * Fri Jun 15 2018 Miro Hrončok <mhroncok@redhat.com> - 2.2.1-2
  129. - Rebuilt for Python 3.7
  130. * Wed Mar 21 2018 Christian Heimes <cheimes@redhat.com> - 2.2.1-1
  131. - New upstream release 2.2.1
  132. * Sun Feb 18 2018 Christian Heimes <cheimes@redhat.com> - 2.1.4-1
  133. - New upstream release 2.1.4
  134. * Sun Feb 18 2018 Christian Heimes <cheimes@redhat.com> - 2.1.3-4
  135. - Build requires gcc
  136. * Mon Feb 12 2018 Iryna Shcherbina <ishcherb@redhat.com> - 2.1.3-3
  137. - Update Python 2 dependency declarations to new packaging standards
  138. (See https://fedoraproject.org/wiki/FinalizingFedoraSwitchtoPython3)
  139. * Fri Feb 09 2018 Fedora Release Engineering <releng@fedoraproject.org> - 2.1.3-2
  140. - Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
  141. * Thu Nov 23 2017 Haïkel Guémar <hguemar@fedoraproject.org> - 2.1.3-1
  142. - Upstream 2.1.3
  143. * Tue Oct 24 2017 Christian Heimes <cheimes@redhat.com> - 2.1-2
  144. - Change Requires to openssl-libs
  145. * Thu Oct 12 2017 Christian Heimes <cheimes@redhat.com> - 2.1-1
  146. - New upstream release 2.1
  147. * Wed Sep 27 2017 Troy Dawson <tdawson@redhat.com> - 2.0.2-3
  148. - Cleanup spec file conditionals
  149. * Thu Aug 03 2017 Christian Heimes <cheimes@redhat.com> - 2.0.2-2
  150. - Add workaround for pytest bug
  151. * Thu Aug 03 2017 Christian Heimes <cheimes@redhat.com> - 2.0.2-1
  152. - New upstream release 2.0.2
  153. - Modernize spec
  154. * Thu Aug 03 2017 Fedora Release Engineering <releng@fedoraproject.org> - 1.9-3
  155. - Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild
  156. * Thu Jul 27 2017 Fedora Release Engineering <releng@fedoraproject.org> - 1.9-2
  157. - Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild
  158. * Tue Jun 27 2017 Christian Heimes <cheimes@redhat.com> - 1.9-1
  159. - Upstream release 1.9
  160. * Wed Feb 15 2017 Christian Heimes <cheimes@redhat.com> - 1.7.2-1
  161. - Update to latest upstream
  162. * Sat Feb 11 2017 Fedora Release Engineering <releng@fedoraproject.org> - 1.7.1-2
  163. - Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild
  164. * Thu Jan 05 2017 Matěj Cepl <mcepl@redhat.com> - 1.7.1-1
  165. - Update to the latest upstream.
  166. - Add a patch from https://github.com/pyca/cryptography/pull/3328
  167. * Tue Dec 13 2016 Charalampos Stratakis <cstratak@redhat.com> - 1.5.3-5
  168. - Enable tests
  169. * Mon Dec 12 2016 Charalampos Stratakis <cstratak@redhat.com> - 1.5.3-4
  170. - Rebuild for Python 3.6
  171. - Disable python3 tests for now
  172. * Thu Nov 10 2016 Nathaniel McCallum <npmccallum@redhat.com> - 1.5.3-3
  173. - Revert previous change
  174. * Thu Nov 10 2016 Nathaniel McCallum <npmccallum@redhat.com> - 1.5.3-2
  175. - Disable tests on releases earlier than 24
  176. * Mon Nov 07 2016 Nathaniel McCallum <npmccallum@redhat.com> - 1.5.3-1
  177. - Update to v1.5.3
  178. - Update source URL
  179. - Add BR for pytz
  180. * Tue Jul 19 2016 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.3.1-4
  181. - https://fedoraproject.org/wiki/Changes/Automatic_Provides_for_Python_RPM_Packages
  182. * Tue May 10 2016 Nathaniel McCallum <npmccallum@redhat.com> - 1.3.1-3
  183. - Remove versioned setuptools dependency
  184. * Tue May 10 2016 Nathaniel McCallum <npmccallum@redhat.com> - 1.3.1-2
  185. - Make it easier to build on EL7
  186. * Tue May 03 2016 Nathaniel McCallum <npmccallum@redhat.com> - 1.3.1-1
  187. - Update to v1.3.1
  188. * Thu Feb 04 2016 Fedora Release Engineering <releng@fedoraproject.org> - 1.2.1-3
  189. - Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
  190. * Mon Jan 11 2016 Nathaniel McCallum <npmccallum@redhat.com> - 1.2.1-2
  191. - Move python-cryptograph => python2-cryptography
  192. * Sat Jan 09 2016 Nathaniel McCallum <npmccallum@redhat.com> - 1.2.1-1
  193. - Update to v1.2.1
  194. * Wed Nov 11 2015 Robert Kuska <rkuska@redhat.com> - 1.1-1
  195. - Update to v1.1
  196. * Wed Nov 04 2015 Robert Kuska <rkuska@redhat.com> - 1.0.2-2
  197. - Rebuilt for Python3.5 rebuild
  198. * Wed Sep 30 2015 Matěj Cepl <mcepl@redhat.com> - 1.0.2-1
  199. - New upstream release (fix #1267548)
  200. * Wed Aug 12 2015 Nathaniel McCallum <npmccallum@redhat.com> - 1.0-1
  201. - New upstream release
  202. * Thu Jun 18 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.9-2
  203. - Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild
  204. * Thu May 14 2015 Nathaniel McCallum <npmccallum@redhat.com> - 0.9-1
  205. - New upstream release
  206. - Run tests on RHEL
  207. - New deps: python-idna, python-ipaddress
  208. * Fri Apr 17 2015 Nathaniel McCallum <npmccallum@redhat.com> - 0.8.2-1
  209. - New upstream release
  210. - Add python3-pyasn1 Requires (#1211073)
  211. * Tue Apr 14 2015 Matej Cepl <mcepl@redhat.com> - 0.8-2
  212. - Add python-pyasn1 Requires (#1211073)
  213. * Fri Mar 13 2015 Nathaniel McCallum <npmccallum@redhat.com> - 0.8-1
  214. - New upstream release
  215. - Remove upstreamed patch
  216. * Wed Mar 04 2015 Nathaniel McCallum <npmccallum@redhat.com> - 0.7.2-2
  217. - Add python3-cryptography-vectors build requires
  218. - Add python-enum34 requires
  219. * Tue Feb 03 2015 Nathaniel McCallum <npmccallum@redhat.com> - 0.7.2-1
  220. - New upstream release. BSD is now an optional license.
  221. - Fix test running on python3
  222. - Add upstream patch to fix test paths
  223. * Fri Nov 07 2014 Matej Cepl <mcepl@redhat.com> - 0.6.1-2
  224. - Fix requires, for reasons why other development files were not
  225. eliminated see https://github.com/pyca/cryptography/issues/1463.
  226. * Wed Nov 05 2014 Matej Cepl <mcepl@redhat.com> - 0.6.1-1
  227. - New upstream release.
  228. * Sun Jun 29 2014 Terry Chia <terrycwk1994@gmail.com> 0.4-1
  229. - initial version