Browse code

Add python3-configparser, python3-urllib3, and python3-cryptography (bug 1805837)

Change-Id: I8129d7b9348a2abcfc18fcab24cc63becc1c0d5b
Reviewed-on: http://photon-jenkins.eng.vmware.com:8082/2046
Tested-by: gerrit-photon <photon-checkins@vmware.com>
Reviewed-by: suezzelur <anishs@vmware.com>

xiaolin-vmware authored on 2017/02/04 08:00:23
Showing 5 changed files
... ...
@@ -1,18 +1,23 @@
1
+%{!?python_sitelib: %define python_sitelib %(python -c "from distutils.sysconfig import get_python_lib;print(get_python_lib())")}
2
+%{!?python3_sitelib: %define python3_sitelib %(python3 -c "from distutils.sysconfig import get_python_lib;print(get_python_lib())")}
3
+
1 4
 Summary:        Interface for Python to call C code
2 5
 Name:           python-cffi
3 6
 Version:        1.5.2
4
-Release:        3%{?dist}
7
+Release:        4%{?dist}
5 8
 Url:            https://pypi.python.org/pypi/cffi
6 9
 License:        MIT
7 10
 Group:          Development/Languages/Python
11
+Vendor:         VMware, Inc.
12
+Distribution:   Photon
8 13
 Source0:        https://pypi.python.org/packages/source/c/cffi/cffi-%{version}.tar.gz
9
-%define sha1 cffi=5239b3aa4f67eed3559c09778096ecd4faeca876
14
+%define sha1    cffi=5239b3aa4f67eed3559c09778096ecd4faeca876
10 15
 
11
-BuildRequires: python2
12
-BuildRequires: python2-libs
13
-BuildRequires: python2-devel
14
-BuildRequires: python-setuptools
15
-BuildRequires: libffi
16
+BuildRequires:  python2
17
+BuildRequires:  python2-libs
18
+BuildRequires:  python2-devel
19
+BuildRequires:  python-setuptools
20
+BuildRequires:  libffi
16 21
 BuildRequires:  python-pycparser
17 22
 Requires:       python2
18 23
 Requires:       python2-libs
... ...
@@ -21,30 +26,52 @@ Requires:       python-pycparser
21 21
 %description
22 22
 Foreign Function Interface for Python, providing a convenient and reliable way of calling existing C code from Python. The interface is based on LuaJIT’s FFI.
23 23
 
24
+%package -n     python3-cffi
25
+Summary:        python-cffi
26
+BuildRequires:  python3
27
+BuildRequires:  python3-devel
28
+BuildRequires:  python3-libs
29
+BuildRequires:  python3-pycparser
30
+Requires:       python3
31
+Requires:       python3-libs
32
+Requires:       python3-pycparser
33
+
34
+%description -n python3-cffi
35
+Python 3 version.
36
+
24 37
 %prep
25 38
 %setup -q -n cffi-%{version}
26 39
 
27 40
 %build
28 41
 python setup.py build
42
+python3 setup.py build
29 43
 
30 44
 %install
31 45
 python setup.py install --prefix=%{_prefix} --root=%{buildroot}
46
+python3 setup.py install --prefix=%{_prefix} --root=%{buildroot}
32 47
 
33 48
 %check
34 49
 python setup.py test
50
+python3 setup.py test
35 51
 
36 52
 %files
37 53
 %defattr(-,root,root)
38 54
 %{python_sitelib}/*
39 55
 
56
+%files -n python3-cffi
57
+%defattr(-,root,root,-)
58
+%{python3_sitelib}/*
59
+
40 60
 %changelog
41
-*       Mon Oct 03 2016 ChangLee <changLee@vmware.com> 1.5.2-3
42
--       Modified %check
43
-*	Tue May 24 2016 Priyesh Padmavilasom <ppadmavilasom@vmware.com> 1.5.2-2
44
--	GA - Bump release of all rpms
61
+*   Thu Feb 02 2017 Xiaolin Li <xiaolinl@vmware.com> 1.5.2-4
62
+-   Added python3 site-packages.
63
+*   Mon Oct 03 2016 ChangLee <changLee@vmware.com> 1.5.2-3
64
+-   Modified %check
65
+*   Tue May 24 2016 Priyesh Padmavilasom <ppadmavilasom@vmware.com> 1.5.2-2
66
+-   GA - Bump release of all rpms
45 67
 *   Tue Feb 23 2016 Harish Udaiya Kumar <hudaiyakumar@vmware.com> 1.5.2-1
46 68
 -   Updated to version 1.5.2
47
-*	Thu Jan 21 2016 Anish Swaminathan <anishs@vmware.com> 1.5.0-1
48
--	Upgrade version
49
-* 	Wed Nov 18 2015 Divya Thaluru <dthaluru@vmware.com> 1.3.0-1
50
-- 	nitial packaging for Photon
69
+*   Thu Jan 21 2016 Anish Swaminathan <anishs@vmware.com> 1.5.0-1
70
+-   Upgrade version
71
+*   Wed Nov 18 2015 Divya Thaluru <dthaluru@vmware.com> 1.3.0-1
72
+-   nitial packaging for Photon
51 73
new file mode 100644
... ...
@@ -0,0 +1,65 @@
0
+%{!?python_sitelib: %define python_sitelib %(python -c "from distutils.sysconfig import get_python_lib;print(get_python_lib())")}
1
+%{!?python3_sitelib: %define python3_sitelib %(python3 -c "from distutils.sysconfig import get_python_lib;print(get_python_lib())")}
2
+
3
+Summary:        This library brings the updated configparser from Python 3.5 to Python 2.6-3.5.
4
+Name:           python-configparser
5
+Version:        3.5.0
6
+Release:        1%{?dist}
7
+License:        MIT
8
+Group:          Development/Languages/Python
9
+Vendor:         VMware, Inc.
10
+Distribution:   Photon
11
+Url:            https://pypi.python.org/pypi/configparser
12
+Source0:        configparser-%{version}.tar.gz
13
+%define sha1    configparser=8ee6b29c6a11977c0e094da1d4f5f71e7e7ac78b
14
+
15
+BuildRequires:  python2
16
+BuildRequires:  python2-libs
17
+BuildRequires:  python-setuptools
18
+
19
+Requires:       python2
20
+Requires:       python2-libs
21
+
22
+BuildArch:      noarch
23
+
24
+%description
25
+The ancient ConfigParser module available in the standard library 2.x has seen a major update in Python 3.2. This is a backport of those changes so that they can be used directly in Python 2.6 - 3.5.
26
+
27
+%package -n     python3-configparser
28
+Summary:        python-configparser
29
+BuildRequires:  python3
30
+BuildRequires:  python3-devel
31
+BuildRequires:  python3-libs
32
+Requires:       python3
33
+Requires:       python3-libs
34
+
35
+%description -n python3-configparser
36
+Python 3 version.
37
+
38
+%prep
39
+%setup -q -n configparser-%{version}
40
+
41
+%build
42
+python setup.py build
43
+python3 setup.py build
44
+
45
+%install
46
+python setup.py install --prefix=%{_prefix} --root=%{buildroot}
47
+python3 setup.py install --prefix=%{_prefix} --root=%{buildroot}
48
+
49
+%check
50
+easy_install py
51
+python setup.py test
52
+python3 setup.py test
53
+
54
+%files
55
+%defattr(-,root,root,-)
56
+%{python_sitelib}/*
57
+
58
+%files -n python3-configparser
59
+%defattr(-,root,root,-)
60
+%{python3_sitelib}/*
61
+
62
+%changelog
63
+*   Thu Feb 02 2017 Xiaolin Li <xiaolinl@vmware.com> 3.5.0-1
64
+-   Initial packaging for Photon
... ...
@@ -1,36 +1,57 @@
1
+%{!?python_sitelib: %define python_sitelib %(python -c "from distutils.sysconfig import get_python_lib;print(get_python_lib())")}
2
+%{!?python3_sitelib: %define python3_sitelib %(python3 -c "from distutils.sysconfig import get_python_lib;print(get_python_lib())")}
3
+
1 4
 Summary:        Python cryptography library
2 5
 Name:           python-cryptography
3
-Version:        1.2.3
4
-Release:        3%{?dist}
5
-Url:            https://cryptography.io
6
+Version:        1.7.2
7
+Release:        1%{?dist}
8
+Url:            https://pypi.python.org/pypi/cryptography
6 9
 License:        ASL 2.0
7 10
 Group:          Development/Languages/Python
8
-Source0:        https://pypi.python.org/packages/source/c/cryptography/cryptography-%{version}.tar.gz
9
-%define sha1 cryptography=a8a8083e70875423bd72899ca99890b788189205
10
-BuildRequires: python2
11
-BuildRequires: python2-libs
12
-BuildRequires: python2-devel
13
-BuildRequires: python-setuptools
14
-Requires:      python-cffi
15
-BuildRequires: python-cffi
16
-BuildRequires: openssl-devel
17
-Requires:      openssl
11
+Vendor:         VMware, Inc.
12
+Distribution:   Photon
13
+Source0:        https://pypi.io/packages/source/c/cryptography/cryptography-%{version}.tar.gz
14
+%define sha1    cryptography=2b5bc62fda71992633f83164b1a74c16a784acdf
15
+BuildRequires:  python2
16
+BuildRequires:  python2-libs
17
+BuildRequires:  python2-devel
18
+BuildRequires:  python-setuptools
19
+BuildRequires:  python-cffi
20
+BuildRequires:  openssl-devel
18 21
 
22
+Requires:       python-cffi
23
+Requires:       openssl
19 24
 Requires:       python2
20 25
 Requires:       python2-libs
21 26
 
22 27
 %description
23 28
 Cryptography is a Python library which exposes cryptographic recipes and primitives.
24 29
 
30
+%package -n     python3-cryptography
31
+Summary:        python-cryptography
32
+BuildRequires:  python3
33
+BuildRequires:  python3-devel
34
+BuildRequires:  python3-libs
35
+BuildRequires:  python3-cffi
36
+
37
+Requires:       python3
38
+Requires:       python3-libs
39
+Requires:       python3-cffi
40
+
41
+%description -n python3-cryptography
42
+
43
+Python 3 version.
25 44
 
26 45
 %prep
27 46
 %setup -q -n cryptography-%{version}
28 47
 
29 48
 %build
30 49
 python setup.py build
50
+python3 setup.py build
31 51
 
32 52
 %install
33 53
 python setup.py install --prefix=%{_prefix} --root=%{buildroot}
54
+python3 setup.py install --prefix=%{_prefix} --root=%{buildroot}
34 55
 
35 56
 %check
36 57
 openssl req \
... ...
@@ -45,21 +66,28 @@ openssl req \
45 45
 openssl rsa -in photon.key -out photon.pem
46 46
 mv photon.pem /etc/ssl/certs
47 47
 python setup.py test
48
+python3 setup.py test
48 49
 
49 50
 %files
50 51
 %defattr(-,root,root)
51 52
 %{python_sitelib}/*
52 53
 
54
+%files -n python3-cryptography
55
+%defattr(-,root,root,-)
56
+%{python3_sitelib}/*
57
+
53 58
 %changelog
54
-*       Mon Oct 03 2016 ChangLee <changLee@vmware.com> 1.2.3-3
55
--       Modified %check
56
-*	Tue May 24 2016 Priyesh Padmavilasom <ppadmavilasom@vmware.com> 1.2.3-2
57
--	GA - Bump release of all rpms
58
-*	Mon Mar 07 2016 Anish Swaminathan <anishs@vmware.com> 1.2.3-1
59
--	Upgrade to 1.2.3
60
-*	Fri Feb 26 2016 Anish Swaminathan <anishs@vmware.com> 1.2.2-1
61
--	Upgrade version to 1.2.2
62
-*	Thu Jan 21 2016 Anish Swaminathan <anishs@vmware.com> 1.2.1-1
63
--	Upgrade version
64
-* 	Wed Nov 18 2015 Divya Thaluru <dthaluru@vmware.com> 1.1-1
65
-- 	Initial packaging for Photon
59
+*   Thu Feb 02 2017 Xiaolin Li <xiaolinl@vmware.com> 1.7.2-1
60
+-   Updated to version 1.7.2 and added python3 package.
61
+*   Mon Oct 03 2016 ChangLee <changLee@vmware.com> 1.2.3-3
62
+-   Modified %check
63
+*   Tue May 24 2016 Priyesh Padmavilasom <ppadmavilasom@vmware.com> 1.2.3-2
64
+-   GA - Bump release of all rpms
65
+*   Mon Mar 07 2016 Anish Swaminathan <anishs@vmware.com> 1.2.3-1
66
+-   Upgrade to 1.2.3
67
+*   Fri Feb 26 2016 Anish Swaminathan <anishs@vmware.com> 1.2.2-1
68
+-   Upgrade version to 1.2.2
69
+*   Thu Jan 21 2016 Anish Swaminathan <anishs@vmware.com> 1.2.1-1
70
+-   Upgrade version
71
+*   Wed Nov 18 2015 Divya Thaluru <dthaluru@vmware.com> 1.1-1
72
+-   Initial packaging for Photon
... ...
@@ -1,17 +1,21 @@
1
+%{!?python_sitelib: %define python_sitelib %(python -c "from distutils.sysconfig import get_python_lib;print(get_python_lib())")}
2
+%{!?python3_sitelib: %define python3_sitelib %(python3 -c "from distutils.sysconfig import get_python_lib;print(get_python_lib())")}
1 3
 Summary:        Python C parser
2 4
 Name:           python-pycparser
3 5
 Version:        2.14
4
-Release:        3%{?dist}
6
+Release:        4%{?dist}
5 7
 Url:            https://pypi.python.org/pypi/pycparser
6 8
 License:        BSD
7 9
 Group:          Development/Languages/Python
10
+Vendor:         VMware, Inc.
11
+Distribution:   Photon
8 12
 Source0:        https://pypi.python.org/packages/source/p/pycparser/pycparser-2.14.tar.gz
9
-%define sha1 pycparser=922162bad4aa8503988035506c1c65bbf8690ba4
13
+%define sha1    pycparser=922162bad4aa8503988035506c1c65bbf8690ba4
10 14
 
11
-BuildRequires: python2
12
-BuildRequires: python2-libs
13
-BuildRequires: python2-devel
14
-BuildRequires: python-setuptools
15
+BuildRequires:  python2
16
+BuildRequires:  python2-libs
17
+BuildRequires:  python2-devel
18
+BuildRequires:  python-setuptools
15 19
 
16 20
 Requires:       python2
17 21
 Requires:       python2-libs
... ...
@@ -20,14 +24,27 @@ Requires:       python2-libs
20 20
 %description
21 21
 pycparser is a complete parser of the C language, written in pure Python using the PLY parsing library. It parses C code into an AST and can serve as a front-end for C compilers or analysis tools. 
22 22
 
23
+%package -n     python3-pycparser
24
+Summary:        python-pycparser
25
+BuildRequires:  python3
26
+BuildRequires:  python3-devel
27
+BuildRequires:  python3-libs
28
+Requires:       python3
29
+Requires:       python3-libs
30
+
31
+%description -n python3-pycparser
32
+Python 3 version.
33
+
23 34
 %prep
24 35
 %setup -q -n pycparser-%{version}
25 36
 
26 37
 %build
27 38
 python setup.py build
39
+python3 setup.py build
28 40
 
29 41
 %install
30 42
 python setup.py install --prefix=%{_prefix} --root=%{buildroot}
43
+python3 setup.py install --prefix=%{_prefix} --root=%{buildroot}
31 44
 
32 45
 %check
33 46
 cd tests
... ...
@@ -37,11 +54,16 @@ python all_tests.py
37 37
 %defattr(-,root,root)
38 38
 %{python_sitelib}/*
39 39
 
40
+%files -n python3-pycparser
41
+%defattr(-,root,root,-)
42
+%{python3_sitelib}/*
40 43
 
41 44
 %changelog
42
-*       Mon Oct 04 2016 ChangLee <changlee@vmware.com> 2.14-3
43
--       Modified %check
44
-*	Tue May 24 2016 Priyesh Padmavilasom <ppadmavilasom@vmware.com> 2.14-2
45
--	GA - Bump release of all rpms
46
-* Wed Nov 18 2015 Divya Thaluru <dthaluru@vmware.com> 2.14-1
47
-- Initial packaging for Photon
45
+*   Thu Feb 02 2017 Xiaolin Li <xiaolinl@vmware.com> 2.14-4
46
+-   Added python3 site-packages.
47
+*   Mon Oct 04 2016 ChangLee <changlee@vmware.com> 2.14-3
48
+-   Modified %check
49
+*   Tue May 24 2016 Priyesh Padmavilasom <ppadmavilasom@vmware.com> 2.14-2
50
+-   GA - Bump release of all rpms
51
+*   Wed Nov 18 2015 Divya Thaluru <dthaluru@vmware.com> 2.14-1
52
+-   Initial packaging for Photon
48 53
new file mode 100644
... ...
@@ -0,0 +1,64 @@
0
+%{!?python_sitelib: %define python_sitelib %(python -c "from distutils.sysconfig import get_python_lib;print(get_python_lib())")}
1
+%{!?python3_sitelib: %define python3_sitelib %(python3 -c "from distutils.sysconfig import get_python_lib;print(get_python_lib())")}
2
+Summary:        A powerful, sanity-friendly HTTP client for Python.
3
+Name:           python-urllib3
4
+Version:        1.20
5
+Release:        1%{?dist}
6
+Url:            https://pypi.python.org/pypi/urllib3
7
+License:        MIT
8
+Group:          Development/Languages/Python
9
+Vendor:         VMware, Inc.
10
+Distribution:   Photon
11
+Source0:        https://github.com/shazow/urllib3/archive/urllib3-1.20.tar.gz
12
+%define sha1    urllib3=2608f2069d3bb1be36da9483c24aa2a0ada38501
13
+
14
+BuildRequires:  python2
15
+BuildRequires:  python2-libs
16
+BuildRequires:  python2-devel
17
+BuildRequires:  python-setuptools
18
+
19
+Requires:       python2
20
+Requires:       python2-libs
21
+
22
+BuildArch:      noarch
23
+
24
+%description
25
+urllib3 is a powerful, sanity-friendly HTTP client for Python. Much of the Python ecosystem already uses urllib3 and you should too.
26
+
27
+%package -n     python3-urllib3
28
+Summary:        python-urllib3
29
+BuildRequires:  python3
30
+BuildRequires:  python3-devel
31
+BuildRequires:  python3-libs
32
+Requires:       python3
33
+Requires:       python3-libs
34
+
35
+%description -n python3-urllib3
36
+Python 3 version.
37
+
38
+%prep
39
+%setup -q -n urllib3-%{version}
40
+
41
+%build
42
+python setup.py build
43
+python3 setup.py build
44
+
45
+%install
46
+python setup.py install --prefix=%{_prefix} --root=%{buildroot}
47
+python3 setup.py install --prefix=%{_prefix} --root=%{buildroot}
48
+
49
+%check
50
+python setup.py test
51
+python3 setup.py test
52
+
53
+%files
54
+%defattr(-,root,root)
55
+%{python_sitelib}/*
56
+
57
+%files -n python3-urllib3
58
+%defattr(-,root,root,-)
59
+%{python3_sitelib}/*
60
+
61
+%changelog
62
+*   Thu Feb 02 2017 Xiaolin Li <xiaolinl@vmware.com> 1.20-1
63
+-   Initial packaging for Photon