Browse code

fix python pyinstall make check

Change-Id: I8ec430838f60932451cd49a86b55ddc0e7bc8e99
Reviewed-on: http://photon-jenkins.eng.vmware.com:8082/3871
Tested-by: gerrit-photon <photon-checkins@vmware.com>
Reviewed-by: Bo Gan <ganb@vmware.com>

Bo Gan authored on 2017/09/26 09:55:56
Showing 1 changed files
... ...
@@ -4,7 +4,7 @@
4 4
 Summary:        PyInstaller bundles a Python application and all its dependencies into a single package.
5 5
 Name:           python-pyinstaller
6 6
 Version:        3.2.1
7
-Release:        1%{?dist}
7
+Release:        2%{?dist}
8 8
 Url:            https://pypi.python.org/pypi/PyInstaller/3.2.1
9 9
 License:        GPLv2+
10 10
 Group:          Development/Languages/Python
... ...
@@ -21,6 +21,7 @@ BuildRequires:  python-setuptools
21 21
 BuildRequires:  python-six
22 22
 BuildRequires:  python-pytest
23 23
 BuildRequires:  python-psutil
24
+BuildRequires:  python-pip
24 25
 %endif
25 26
 Requires:       python2
26 27
 Requires:       python2-libs
... ...
@@ -80,10 +81,16 @@ python2 setup.py install --single-version-externally-managed -O1 --root=%{buildr
80 80
 
81 81
 
82 82
 %check
83
-py.test2 tests/unit tests/functional
84
-pushd ../p3dir
85
-python3 setup.py test
86
-popd
83
+# future is required for python2 make check
84
+pip2 install -U future
85
+
86
+# Skip tkinter and idlelib related test
87
+# as our python is not compiled with Tcl/Tk.
88
+# We don't have Tk.
89
+LANG=en_US.UTF-8 py.test2 tests/unit tests/functional \
90
+    -k "not test_tkinter and not test_idlelib"
91
+
92
+# Skip python3 make check, as python3.6 is not supported by 3.2.1
87 93
 
88 94
 %files
89 95
 %defattr(-,root,root)
... ...
@@ -116,5 +123,7 @@ popd
116 116
 %exclude %{python3_sitelib}/PyInstaller/bootloader/Windows-64bit
117 117
 
118 118
 %changelog
119
+*   Mon Sep 25 2017 Bo Gan <ganb@vmware.com> 3.2.1-2
120
+-   Fix make check issues.
119 121
 *   Tue Feb 14 2017 Xiaolin Li <xiaolinl@vmware.com> 3.2.1-1
120 122
 -   Initial packaging for Photon