Skip to content

Commit

Permalink
Merge pull request pycassa#133 from caruccio/master
Browse files Browse the repository at this point in the history
forcing setup.py to optimize all files
  • Loading branch information
thobbs committed Apr 26, 2012
2 parents 2390363 + dd22bfd commit 2c266ae
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 16 deletions.
7 changes: 5 additions & 2 deletions pycassa/columnfamily.py
Expand Up @@ -507,8 +507,11 @@ def xget(self, key, column_start="", column_finish="", column_reversed=False,
buffer_size = self.column_buffer_size

count = i = 0
last_name = self._pack_name(column_start) if column_start != "" else ""
finish = self._pack_name(column_finish) if column_finish != "" else ""
last_name = finish = ""
if column_start != "":
last_name = self._pack_name(column_start)
if column_finish != "":
finish = self._pack_name(column_finish)
while True:
if column_count is not None:
if i == 0 and column_count <= buffer_size:
Expand Down
16 changes: 2 additions & 14 deletions rpm-install-script.sh
@@ -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

0 comments on commit 2c266ae

Please sign in to comment.