Skip to content

Commit

Permalink
Install script to build rpm under CentOS 5.x: $ python setup.py --ins…
Browse files Browse the repository at this point in the history
…tall-script rpm-install-script.sh
  • Loading branch information
Mateus Caruccio committed Mar 7, 2012
1 parent 681905c commit bb29fe6
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions rpm-install-script.sh
@@ -0,0 +1,8 @@
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

0 comments on commit bb29fe6

Please sign in to comment.