forked from eevans/pycassa
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request pycassa#133 from caruccio/master
forcing setup.py to optimize all files
- Loading branch information
Showing
2 changed files
with
7 additions
and
16 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +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 | ||
# Add .pyo files generated by CentOS. | ||
# 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. | ||
rm -f INSTALLED_PYO_FILES | ||
(cd "$RPM_BUILD_ROOT" | ||
find -type f -name '*.pyc' | cut -b2-|sed -e 's/pyc$/pyo/' | while read pyo | ||
do | ||
if [ -e "$pyo" ]; then | ||
echo "$pyo" >> INSTALLED_PYO_FILES | ||
fi | ||
done) | ||
|
||
if [ -e INSTALLED_PYO_FILES ]; then | ||
sort -u INSTALLED_PYO_FILES >> INSTALLED_FILES | ||
fi | ||
python setup.py install -O1 --single-version-externally-managed --root="$RPM_BUILD_ROOT" --record=INSTALLED_FILES |