python-cryptography-vl.spec 9.6 KB

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