Use macro that are now ready
This commit is contained in:
		
							parent
							
								
									ea453a5d2b
								
							
						
					
					
						commit
						c204f15425
					
				@ -1,8 +1,5 @@
 | 
			
		||||
%if 0%{?rhel}
 | 
			
		||||
%global with_python3 0
 | 
			
		||||
%{!?__python2: %global __python2 /usr/bin/python2}
 | 
			
		||||
%{!?python2_sitelib: %global python2_sitelib %(%{__python2} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib())")}
 | 
			
		||||
%{!?python2_sitearch: %global python2_sitearch %(%{__python2} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib(1))")}
 | 
			
		||||
%else
 | 
			
		||||
%global with_python3 1
 | 
			
		||||
%endif
 | 
			
		||||
@ -56,14 +53,14 @@ rm -rf %{name}.egg-info
 | 
			
		||||
%if 0%{?with_python3}
 | 
			
		||||
%py3_build
 | 
			
		||||
%else
 | 
			
		||||
CFLAGS="%{optflags}" %{__python2} setup.py %{?py_setup_args} build --executable="%{__python2} -s"
 | 
			
		||||
%py2_build
 | 
			
		||||
%endif # with_python3
 | 
			
		||||
 | 
			
		||||
%install
 | 
			
		||||
%if 0%{?with_python3}
 | 
			
		||||
%py3_install
 | 
			
		||||
%else
 | 
			
		||||
CFLAGS="%{optflags}" %{__python2} setup.py %{?py_setup_args} install -O1 --skip-build --root %{buildroot}
 | 
			
		||||
%py2_install
 | 
			
		||||
%endif # with_python3
 | 
			
		||||
# Fix path and permissions for bash completition
 | 
			
		||||
%global bash_completion_dir /etc/bash_completion.d
 | 
			
		||||
 | 
			
		||||
		Loading…
	
		Reference in New Issue
	
	Block a user