python3.5/macros.pybytecompile3.5
Charalampos Stratakis 9dab8a4c1f Rebased to 3.5.3 from F25
Enable profile guided optimizations for x86_64 and i686 architectures

Sync with python3 package from F25:

- Rebased patch250
- Make pip installable in a new venv when using the --system-site-packages flag
- Fix syntax error in %%py_byte_compile macro
- Add patch 259 to work around magic number bump in Python 3.5.3
2017-05-11 14:57:29 +02:00

11 lines
491 B
Groff

# 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
%py_byte_compile()\
python_binary="%1"\
bytecode_compilation_path="%2"\
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], optimize=opt) for opt in range(2) for f in sys.argv[1:]]' || :\
%{nil}