Browse code

Fix python3 does not provide a python3 executable/symlink

Providing symlinks for python binaries

Change-Id: I7d3fdb0abc6422ed15aab351530fdd2777c6ddf1
Reviewed-on: http://photon-jenkins.eng.vmware.com/689
Tested-by: jenkins-photon <wangnan2015@hotmail.com>
Reviewed-by: Mahmoud Bassiouny <mbassiouny@vmware.com>

mbassiouny authored on 2016/04/08 07:44:26
Showing 1 changed files
... ...
@@ -1,7 +1,7 @@
1 1
 Summary:	A high-level scripting language
2 2
 Name:		python3
3 3
 Version:	3.5.1
4
-Release:	1%{?dist}
4
+Release:	2%{?dist}
5 5
 License:	PSF
6 6
 URL:		http://www.python.org/
7 7
 Group:		System Environment/Programming
... ...
@@ -101,7 +101,7 @@ make %{?_smp_mflags}
101 101
 
102 102
 %install
103 103
 [ %{buildroot} != "/"] && rm -rf %{buildroot}/*
104
-make DESTDIR=%{buildroot} altinstall
104
+make DESTDIR=%{buildroot} install
105 105
 chmod -v 755 %{buildroot}%{_libdir}/libpython3.5m.so.1.0
106 106
 %{_fixperms} %{buildroot}/*
107 107
 
... ...
@@ -109,22 +109,24 @@ chmod -v 755 %{buildroot}%{_libdir}/libpython3.5m.so.1.0
109 109
 find %{buildroot}%{_libdir} -name '*.pyc' -delete
110 110
 find %{buildroot}%{_libdir} -name '*.pyo' -delete
111 111
 find %{buildroot}%{_libdir} -name '*.o' -delete
112
+rm %{buildroot}%{_bindir}/2to3
112 113
 
113 114
 %check
114 115
 make -k check |& tee %{_specdir}/%{name}-check-log || %{nocheck}
115 116
 
116 117
 %post
117 118
 /sbin/ldconfig
118
-# Enable below if using 'make install' instead of 'make altinstall'
119 119
 #ln -s %{_bindir}/python3 %{_bindir}/python
120 120
 #ln -s %{_bindir}/python3-config %{_bindir}/python-config
121
-#ln -s %{_libdir}/libpython3.4m.so %{_libdir}/libpython3.4.so
121
+ln -s %{_libdir}/libpython3.5m.so %{_libdir}/libpython3.5.so
122 122
 
123 123
 %post libs
124 124
 export PYTHONHOME=/usr
125
-export PYTHONPATH=/usr/lib/python3.4
125
+export PYTHONPATH=/usr/lib/python3.5
126 126
 
127
-%postun -p /sbin/ldconfig
127
+%postun
128
+rm %{_libdir}/libpython3.5.so
129
+/sbin/ldconfig
128 130
 
129 131
 %clean
130 132
 rm -rf %{buildroot}/*
... ...
@@ -146,9 +148,8 @@ rm -rf %{buildroot}/*
146 146
 %{_libdir}/libpython3.5m.so
147 147
 %{_libdir}/libpython3.5m.so.1.0
148 148
 %{_libdir}/pkgconfig/python-3.5.pc
149
-# Enable below if using 'make install' instead of 'make altinstall'
150
-#%{_libdir}/pkgconfig/python-3.4m.pc
151
-#%{_libdir}/pkgconfig/python3.pc
149
+%{_libdir}/pkgconfig/python-3.5m.pc
150
+%{_libdir}/pkgconfig/python3.pc
152 151
 
153 152
 %exclude %{_libdir}/python3.5/ctypes/test
154 153
 %exclude %{_libdir}/python3.5/distutils/tests
... ...
@@ -181,15 +182,17 @@ rm -rf %{buildroot}/*
181 181
 %defattr(-,root,root,755)
182 182
 %doc Tools/README
183 183
 %{_libdir}/python3.5/lib2to3
184
-%{_bindir}/2to3*
184
+%{_bindir}/2to3-3.5
185 185
 %{_bindir}/idle*
186 186
 
187 187
 %changelog
188
+*   Thu Apr 07 2016 Mahmoud Bassiouny <mbassiouny@vmware.com> 3.5.1-2
189
+-   Providing python3 binaries instead of the minor versions.
188 190
 *   Tue Feb 23 2016 Harish Udaiya Kumar <hudaiyakumar@vmware.com> 3.5.1-1
189 191
 -   Updated to version 3.5.1
190 192
 *	Wed Dec 09 2015 Anish Swaminathan <anishs@vmware.com> 3.4.3-3
191 193
 -	Edit post script.
192
-*	Wed Aug 17 2015 Vinay Kulkarni <kulkarniv@vmware.com> 3.4.3-2
194
+*	Mon Aug 17 2015 Vinay Kulkarni <kulkarniv@vmware.com> 3.4.3-2
193 195
 -	Remove python.o file, and minor cleanups.
194 196
 *	Wed Jul 1 2015 Vinay Kulkarni <kulkarniv@vmware.com> 3.4.3
195 197
 -	Add Python3 package to Photon.