forked from rpms/kernel
		
	Mangle Python shebangs to Python 3 only
This commit is contained in:
		
							parent
							
								
									f1461c1d71
								
							
						
					
					
						commit
						1a08114a16
					
				
							
								
								
									
										12
									
								
								kernel.spec
									
									
									
									
									
								
							
							
						
						
									
										12
									
								
								kernel.spec
									
									
									
									
									
								
							| @ -385,6 +385,8 @@ BuildRequires: kmod, patch, bash, tar, git-core | ||||
| BuildRequires: bzip2, xz, findutils, gzip, m4, perl-interpreter, perl-Carp, perl-devel, perl-generators, make, diffutils, gawk | ||||
| BuildRequires: gcc, binutils, redhat-rpm-config, hmaccalc, bison, flex | ||||
| BuildRequires: net-tools, hostname, bc, elfutils-devel | ||||
| # Used to mangle unversioned shebangs to be Python 3 | ||||
| BuildRequires: /usr/bin/pathfix.py | ||||
| %if %{with_sparse} | ||||
| BuildRequires: sparse | ||||
| %endif | ||||
| @ -1153,6 +1155,16 @@ find . \( -name "*.orig" -o -name "*~" \) -delete >/dev/null | ||||
| # remove unnecessary SCM files | ||||
| find . -name .gitignore -delete >/dev/null | ||||
| 
 | ||||
| # Mangle /usr/bin/python shebangs to /usr/bin/python3 | ||||
| # Mangle all Python shebangs to be Python 3 explicitly | ||||
| # -p preserves timestamps | ||||
| # -n prevents creating ~backup files | ||||
| # -i specifies the interpreter for the shebang | ||||
| pathfix.py -pni "%{__python3} %{py3_shbang_opts}" scripts/ | ||||
| pathfix.py -pni "%{__python3} %{py3_shbang_opts}" scripts/diffconfig | ||||
| pathfix.py -pni "%{__python3} %{py3_shbang_opts}" scripts/bloat-o-meter | ||||
| pathfix.py -pni "%{__python3} %{py3_shbang_opts}" scripts/show_delta | ||||
| 
 | ||||
| cd .. | ||||
| 
 | ||||
| ### | ||||
|  | ||||
		Loading…
	
		Reference in New Issue
	
	Block a user