Browse code

Updated python-pyOpenSSL to version 17.2.0 and fixed make check. Updated python-cryptography to 2.03.

Change-Id: Ic640d4618f6ea9f7b12877e095e83fa2eb7c6861
Reviewed-on: http://photon-jenkins.eng.vmware.com:8082/3678
Tested-by: gerrit-photon <photon-checkins@vmware.com>
Reviewed-by: Chang Lee <changlee@vmware.com>

xiaolin-vmware authored on 2017/08/31 08:11:59
Showing 2 changed files
... ...
@@ -3,15 +3,15 @@
3 3
 
4 4
 Summary:        Python cryptography library
5 5
 Name:           python-cryptography
6
-Version:        1.8.1
7
-Release:        4%{?dist}
6
+Version:        2.0.3
7
+Release:        1%{?dist}
8 8
 Url:            https://pypi.python.org/pypi/cryptography
9 9
 License:        ASL 2.0
10 10
 Group:          Development/Languages/Python
11 11
 Vendor:         VMware, Inc.
12 12
 Distribution:   Photon
13 13
 Source0:        https://pypi.io/packages/source/c/cryptography/cryptography-%{version}.tar.gz
14
-%define sha1    cryptography=d15ffd42ca41260a61bc80cbeccf24e2dbf44253
14
+%define sha1    cryptography=918c788a03142e5058e23c3711fc3e6618f38a61
15 15
 BuildRequires:  python2
16 16
 BuildRequires:  python2-libs
17 17
 BuildRequires:  python2-devel
... ...
@@ -98,6 +98,8 @@ python3 setup.py test
98 98
 %{python3_sitelib}/*
99 99
 
100 100
 %changelog
101
+*   Mon Aug 14 2017 Xiaolin Li <xiaolinl@vmware.com> 2.0.3-1
102
+-   Updated to version 2.0.3.
101 103
 *   Tue Jul 25 2017 Divya Thaluru <dthaluru@vmware.com> 1.8.1-4
102 104
 -   Added missing requires python-six and python-enum34
103 105
 -   Removed python-enum from requires
... ...
@@ -2,20 +2,35 @@
2 2
 %{!?python3_sitelib: %define python3_sitelib %(python3 -c "from distutils.sysconfig import get_python_lib;print(get_python_lib())")}
3 3
 Summary:        Python wrapper module around the OpenSSL library
4 4
 Name:           python-pyOpenSSL
5
-Version:        16.2.0
6
-Release:        5%{?dist}
5
+Version:        17.2.0
6
+Release:        1%{?dist}
7 7
 Url:            https://github.com/pyca/pyopenssl
8 8
 License:        ASL 2.0
9 9
 Group:          Development/Languages/Python
10 10
 Vendor:         VMware, Inc.
11 11
 Distribution:   Photon
12
-Source0:        pyopenssl-%{version}.tar.gz
13
-%define sha1    pyopenssl=fdcaa88c9cf814b35cb9e1f6065adca6110cedcc
12
+Source0:        https://files.pythonhosted.org/packages/source/p/pyOpenSSL/pyOpenSSL-%{version}.tar.gz
13
+%define sha1    pyOpenSSL=ab5454f2d297c642c7c3dffeeca359f914a11dd3
14 14
 BuildRequires:  python2
15 15
 BuildRequires:  python2-libs
16 16
 BuildRequires:  python2-devel
17 17
 BuildRequires:  python-setuptools
18
-
18
+%if %{with_check}
19
+BuildRequires:  python-pytest
20
+BuildRequires:  python-cryptography
21
+BuildRequires:  python-enum
22
+BuildRequires:  python-ipaddress
23
+BuildRequires:  python-six
24
+BuildRequires:  python-pycparser
25
+BuildRequires:  python-cffi
26
+BuildRequires:  openssl
27
+BuildRequires:  python-idna
28
+BuildRequires:  python-pyasn1
29
+BuildRequires:  python-setuptools
30
+BuildRequires:  python-packaging
31
+BuildRequires:  python-enum34
32
+BuildRequires:  python-asn1crypto
33
+%endif
19 34
 Requires:       python2
20 35
 Requires:       python2-libs
21 36
 Requires:       python-cryptography
... ...
@@ -35,6 +50,18 @@ BuildRequires:  python3-devel
35 35
 BuildRequires:  python3-libs
36 36
 BuildRequires:  python3-setuptools
37 37
 BuildRequires:  python3-xml
38
+%if %{with_check}
39
+BuildRequires:  python3-pytest
40
+BuildRequires:  python3-cryptography
41
+BuildRequires:  python3-six
42
+BuildRequires:  python3-pycparser
43
+BuildRequires:  python3-cffi
44
+BuildRequires:  python3-idna
45
+BuildRequires:  python3-pyasn1
46
+BuildRequires:  python3-six
47
+BuildRequires:  python3-packaging
48
+BuildRequires:  python3-asn1crypto
49
+%endif
38 50
 Requires:       python3
39 51
 Requires:       python3-libs
40 52
 Requires:       python3-cryptography
... ...
@@ -44,19 +71,38 @@ Requires:       python3-six
44 44
 Python 3 version.
45 45
 
46 46
 %prep
47
-%setup -q -n pyopenssl-%{version}
47
+%setup -q -n pyOpenSSL-%{version}
48
+rm -rf ../p3dir
49
+cp -a . ../p3dir
48 50
 
49 51
 %build
50 52
 python2 setup.py build
53
+pushd ../p3dir
51 54
 python3 setup.py build
55
+popd
52 56
 
53 57
 %install
54 58
 python2 setup.py install --prefix=%{_prefix} --root=%{buildroot}
59
+pushd ../p3dir
55 60
 python3 setup.py install --prefix=%{_prefix} --root=%{buildroot}
61
+popd
56 62
 
57 63
 %check
58
-python2 setup.py test
59
-python3 setup.py test
64
+easy_install_2=$(ls /usr/bin |grep easy_install |grep 2)
65
+$easy_install_2 pretend
66
+$easy_install_2 flaky
67
+PATH=%{buildroot}%{_bindir}:${PATH} \
68
+LANG=en_US.UTF-8  PYTHONPATH=%{buildroot}%{python2_sitelib} \
69
+    py.test2
70
+
71
+easy_install_3=$(ls /usr/bin |grep easy_install |grep 3)
72
+$easy_install_3 pretend
73
+$easy_install_3 flaky
74
+pushd ../p3dir
75
+PATH=%{buildroot}%{_bindir}:${PATH} \
76
+LANG=en_US.UTF-8  PYTHONPATH=%{buildroot}%{python3_sitelib} \
77
+    py.test3
78
+popd
60 79
 
61 80
 %files
62 81
 %defattr(-,root,root)
... ...
@@ -67,6 +113,8 @@ python3 setup.py test
67 67
 %{python3_sitelib}/*
68 68
 
69 69
 %changelog
70
+*   Mon Aug 14 2017 Xiaolin Li <xiaolinl@vmware.com> 17.2.0-1
71
+-   Updated to version 17.2.0 and fixed make check.
70 72
 *   Fri Jul 21 2017 Divya Thaluru <dthaluru@vmware.com> 16.2.0-5
71 73
 -   Fixed runtime dependencies
72 74
 *   Wed Jun 07 2017 Xiaolin Li <xiaolinl@vmware.com> 16.2.0-4