Skip to content

Commit

Permalink
using only -O1 to add .pyo files
Browse files Browse the repository at this point in the history
  • Loading branch information
caruccio committed Apr 23, 2012
1 parent d813423 commit b023123
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions rpm-install-script.sh
@@ -1,8 +1,5 @@
python setup.py install --single-version-externally-managed --root="$RPM_BUILD_ROOT" --record=INSTALLED_FILES

# Add .pyo files generated on CentOS 5.x
# This is a workaround until someone comes with a better fix, like avoiding
# /usr/lib/rpm/brp-python-bytecompile to run or convincing people that CentOS is pure evil.
(cd "$RPM_BUILD_ROOT" && find -type f -name '*.pyc' | cut -b2-|sed -e 's/pyc$/pyo/') >> INSTALLED_FILES
sort -u INSTALLED_FILES > .INSTALLED_FILES
mv .INSTALLED_FILES INSTALLED_FILES

python setup.py install -O1 --single-version-externally-managed --root="$RPM_BUILD_ROOT" --record=INSTALLED_FILES

0 comments on commit b023123

Please sign in to comment.