Subversion Repositories configs

Rev

Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
132 - 1
# Note that the path could itself be a python file, or a directory
2
 
3
# Python's compile_all module only works on directories, and requires a max
4
# recursion depth
5
 
6
%py_byte_compile()\
7
python_binary="%1"\
8
bytecode_compilation_path="%2"\
9
find $bytecode_compilation_path -type f -a -name "*.py" -print0 | xargs -0 $python_binary -c 'import py_compile, sys; [py_compile.compile(f, dfile=f.partition("$RPM_BUILD_ROOT")[2]) for f in sys.argv[1:]]' || :\
10
\
11
find $bytecode_compilation_path -type f -a -name "*.py" -print0 | xargs -0 $python_binary -O -c 'import py_compile, sys; [py_compile.compile(f, dfile=f.partition("$RPM_BUILD_ROOT")[2]) for f in sys.argv[1:]]' || :\
12
%{nil}