Mercurial > p > roundup > code
view roundup/dist/command/bdist_rpm.py @ 4764:d273e59b487b
roundup.demo: Use relative tracker home directory
Introduced in commit a0654b1283a4 when it was not known
that source demo.py is copied to roundup.demo during the
build phase. demo.py migrated to roundup.demo in the
previous commit.
| author | anatoly techtonik <techtonik@gmail.com> |
|---|---|
| date | Thu, 21 Feb 2013 19:08:40 +0300 |
| parents | e233d7a66343 |
| children | 42bf0a707763 |
line wrap: on
line source
# # Copyright (C) 2009 Stefan Seefeld # All rights reserved. # For license terms see the file COPYING.txt. # from distutils.command.bdist_rpm import bdist_rpm as base from distutils.file_util import write_file import os class bdist_rpm(base): def finalize_options(self): base.finalize_options(self) if self.install_script: # install script is overridden. skip default return # install script option must be file name. # create the file in rpm build directory. install_script = os.path.join(self.rpm_base, "install.sh") self.mkpath(self.rpm_base) self.execute(write_file, (install_script, [ ("%s setup.py install --root=$RPM_BUILD_ROOT " "--record=ROUNDUP_FILES") % self.python, # allow any additional extension for man pages # (rpm may compress them to .gz or .bz2) # man page here is any file # with single-character extension # in man directory "sed -e 's,\(/man/.*\..\)$,\\1*,' " "<ROUNDUP_FILES >INSTALLED_FILES", ]), "writing '%s'" % install_script) self.install_script = install_script
