# Note that the path could itself be a python file, or a directory # Python's compile_all module only works on directories, and requires a max # recursion depth # Usage: # %py_byte_compile <interpereter> <path> # Example: # %py_byte_compile %{__python3} %{buildroot}%{_datadir}/spam/plugins/ # This will terminate build on SyntaxErrors, if you want to avoid that, # use it in a subshell like this: # (%{py_byte_compile <interpereter> <path>}) || : %py_byte_compile()\ python_binary="%1"\ buildroot_path="%2"\ bytecode_compilation_path=".${buildroot_path/#$RPM_BUILD_ROOT}"\ failure=0\ pushd $RPM_BUILD_ROOT\ find $bytecode_compilation_path -type f -a -name "*.py" -print0 | xargs -0 $python_binary -O -m py_compile || failure=1\ find $bytecode_compilation_path -type f -a -name "*.py" -print0 | xargs -0 $python_binary -m py_compile || failure=1\ popd\ test $failure -eq 0
Name | Type | Size | Permission | Actions |
---|---|---|---|---|
macros.dist | File | 66 B | 0644 |
|
macros.dwz | File | 1.76 KB | 0644 |
|
macros.ea-php56-config | File | 714 B | 0644 |
|
macros.ea-php56-php | File | 436 B | 0644 |
|
macros.ea-php70-config | File | 714 B | 0644 |
|
macros.ea-php70-php | File | 436 B | 0644 |
|
macros.ea-php73-config | File | 714 B | 0644 |
|
macros.ea-php73-php | File | 436 B | 0644 |
|
macros.ea-php74-config | File | 714 B | 0644 |
|
macros.ea-php74-php | File | 436 B | 0644 |
|
macros.ea-php80-config | File | 714 B | 0644 |
|
macros.ea-php80-php | File | 436 B | 0644 |
|
macros.ea-php81-config | File | 714 B | 0644 |
|
macros.ea-php81-php | File | 436 B | 0644 |
|
macros.ghc-srpm | File | 215 B | 0644 |
|
macros.gnat-srpm | File | 227 B | 0644 |
|
macros.mono-srpm | File | 121 B | 0644 |
|
macros.nodejs-srpm | File | 228 B | 0644 |
|
macros.ocaml-srpm | File | 115 B | 0644 |
|
macros.perl | File | 5.01 KB | 0644 |
|
macros.perl-srpm | File | 794 B | 0644 |
|
macros.pybytecompile | File | 886 B | 0644 |
|
macros.python | File | 3.27 KB | 0644 |
|
macros.python-srpm | File | 3.75 KB | 0644 |
|
macros.python2 | File | 1.46 KB | 0644 |
|
macros.scl | File | 12.74 KB | 0644 |
|