Browse code

Fixed rpm check errors in python-numpy, python-packaging, python-atomicwrites

Fixed run time dependencies in python-packaging

Change-Id: I1c12126a2d36f6a9905d5af1c9d1dc50db27e125
Reviewed-on: http://photon-jenkins.eng.vmware.com:8082/3346
Tested-by: gerrit-photon <photon-checkins@vmware.com>
Reviewed-by: Xiaolin Li <xiaolinl@vmware.com>

dthaluru authored on 2017/07/27 04:25:24
Showing 3 changed files
... ...
@@ -4,7 +4,7 @@
4 4
 Summary:        Python Atomic file writes
5 5
 Name:           python-atomicwrites
6 6
 Version:        1.1.5
7
-Release:        1%{?dist}
7
+Release:        2%{?dist}
8 8
 License:        MIT
9 9
 Group:          Development/Languages/Python
10 10
 Vendor:         VMware, Inc.
... ...
@@ -16,7 +16,9 @@ Source0:        https://pypi.python.org/packages/a1/e1/2d9bc76838e6e6667fde5814a
16 16
 BuildRequires:  python-setuptools
17 17
 BuildRequires:  python2-devel
18 18
 BuildRequires:  python-xml
19
+%if %{with_check}
19 20
 BuildRequires:  python-pytest
21
+%endif
20 22
 Requires:       python2
21 23
 BuildArch:      noarch
22 24
 
... ...
@@ -28,7 +30,9 @@ Summary:        Python Atomic file writes
28 28
 BuildRequires:  python3-devel
29 29
 BuildRequires:  python3-setuptools
30 30
 BuildRequires:  python3-xml
31
+%if %{with_check}
31 32
 BuildRequires:  python3-pytest
33
+%endif
32 34
 Requires:       python3
33 35
 
34 36
 %description -n python3-atomicwrites
... ...
@@ -52,9 +56,9 @@ popd
52 52
 python2 setup.py install --prefix=%{_prefix} --root=%{buildroot}
53 53
 
54 54
 %check
55
-py.test-2
55
+PYTHONPATH=./ py.test2
56 56
 pushd ../p3dir
57
-py.test-3
57
+PYTHONPATH=./ py.test3
58 58
 popd
59 59
 
60 60
 %files
... ...
@@ -70,5 +74,7 @@ popd
70 70
 %{python3_sitelib}/*
71 71
 
72 72
 %changelog
73
+*   Wed Jul 26 2017 Divya Thaluru <dthaluru@vmware.com> 1.1.5-2
74
+-   Fixed rpm check errors
73 75
 *   Fri Jul 07 2017 Dheeraj Shetty <dheerajs@vmware.com> 1.1.5-1
74 76
 -   Initial packaging for Photon
... ...
@@ -4,7 +4,7 @@
4 4
 Summary:        Array processing for numbers, strings, records, and objects
5 5
 Name:           python-numpy
6 6
 Version:        1.12.1
7
-Release:        3%{?dist}
7
+Release:        4%{?dist}
8 8
 License:        BSD
9 9
 Group:          Development/Languages/Python
10 10
 Vendor:         VMware, Inc.
... ...
@@ -50,9 +50,20 @@ python3 setup.py install --prefix=%{_prefix} --root=%{buildroot}
50 50
 python2 setup.py install --prefix=%{_prefix} --root=%{buildroot}
51 51
 
52 52
 %check
53
-easy_install py
54
-python2 setup.py test
55
-python3 setup.py test
53
+easy_install_2=$(ls /usr/bin |grep easy_install |grep 2)
54
+$easy_install_2 nose
55
+mkdir test
56
+pushd test
57
+PYTHONPATH=%{buildroot}%{python2_sitelib} PATH=$PATH:%{buildroot}%{_bindir} python2 -c "import numpy; numpy.test()"
58
+popd
59
+
60
+easy_install_3=$(ls /usr/bin |grep easy_install |grep 3)
61
+$easy_install_3 nose
62
+pushd test
63
+PYTHONPATH=%{buildroot}%{python3_sitelib} PATH=$PATH:%{buildroot}%{_bindir} python3 -c "import numpy; numpy.test()"
64
+popd
65
+
66
+rm -rf test
56 67
 
57 68
 %files
58 69
 %defattr(-,root,root,-)
... ...
@@ -65,6 +76,8 @@ python3 setup.py test
65 65
 %{_bindir}/f2py3
66 66
 
67 67
 %changelog
68
+*   Wed Jul 26 2017 Divya Thaluru <dthaluru@vmware.com> 1.12.1-4
69
+-   Fixed rpm check errors
68 70
 *   Wed Jun 07 2017 Xiaolin Li <xiaolinl@vmware.com> 1.12.1-3
69 71
 -   Add python3-setuptools and python3-xml to python3 sub package Buildrequires.
70 72
 *   Thu May 04 2017 Sarah Choi <sarahc@vmware.com> 1.12.1-2
... ...
@@ -4,7 +4,7 @@
4 4
 Summary:        Core utilities for Python packages
5 5
 Name:           python-packaging
6 6
 Version:        16.8
7
-Release:        3%{?dist}
7
+Release:        4%{?dist}
8 8
 Url:            https://pypi.python.org/pypi/packaging
9 9
 License:        BSD or ASL 2.0
10 10
 Group:          Development/Languages/Python
... ...
@@ -15,9 +15,16 @@ Source0:        pypi.python.org/packages/source/p/packaging/packaging-%{version}
15 15
 BuildRequires:  python2
16 16
 BuildRequires:  python2-libs
17 17
 BuildRequires:  python2-devel
18
+%if %{with_check}
19
+BuildRequires:  python-pytest
20
+BuildRequires:  python-pyparsing
21
+BuildRequires:  python-six
22
+%endif
18 23
 
19 24
 Requires:       python2
20 25
 Requires:       python2-libs
26
+Requires:       python-pyparsing
27
+Requires:       python-six
21 28
 
22 29
 BuildArch:      noarch
23 30
 
... ...
@@ -29,9 +36,18 @@ Summary:        python-packaging
29 29
 BuildRequires:  python3
30 30
 BuildRequires:  python3-devel
31 31
 BuildRequires:  python3-libs
32
+%if %{with_check}
33
+BuildRequires:  python3-setuptools
34
+BuildRequires:  python3-xml
35
+BuildRequires:  python3-pytest
36
+BuildRequires:  python3-pyparsing
37
+BuildRequires:  python3-six
38
+%endif
32 39
 
33 40
 Requires:       python3
34 41
 Requires:       python3-libs
42
+Requires:       python3-pyparsing
43
+Requires:       python3-six
35 44
 
36 45
 %description -n python3-packaging
37 46
 
... ...
@@ -55,8 +71,13 @@ python3 setup.py install --prefix=%{_prefix} --root=%{buildroot}
55 55
 popd
56 56
 
57 57
 %check
58
-python2 setup.py test
59
-python3 setup.py test
58
+easy_install_2=$(ls /usr/bin |grep easy_install |grep 2)
59
+$easy_install_2 pretend
60
+PYTHONPATH=./ py.test2
61
+
62
+easy_install_3=$(ls /usr/bin |grep easy_install |grep 3)
63
+$easy_install_3 pretend
64
+PYTHONPATH=./ py.test3
60 65
 
61 66
 %files
62 67
 %defattr(-,root,root)
... ...
@@ -67,6 +88,9 @@ python3 setup.py test
67 67
 %{python3_sitelib}/*
68 68
 
69 69
 %changelog
70
+*   Wed Jul 26 2017 Divya Thaluru <dthaluru@vmware.com> 16.8-4
71
+-   Fixed rpm check errors
72
+-   Fixed runtime dependencies
70 73
 *   Tue Apr 25 2017 Priyesh Padmavilasom <ppadmavilasom@vmware.com> 16.8-3
71 74
 -   Fix arch
72 75
 *   Wed Apr 05 2017 Sarah Choi <sarahc@vmware.com> 16.8-2