Premiere version : mise en route du suivi.
[auf_roundup.git] / roundup / dist / command / .svn / text-base / bdist_rpm.py.svn-base
CommitLineData
c638d827
CR
1#
2# Copyright (C) 2009 Stefan Seefeld
3# All rights reserved.
4# For license terms see the file COPYING.txt.
5#
6from distutils.command.bdist_rpm import bdist_rpm as base
7from distutils.file_util import write_file
8import os
9
10class bdist_rpm(base):
11
12 def finalize_options(self):
13 base.finalize_options(self)
14 if self.install_script:
15 # install script is overridden. skip default
16 return
17 # install script option must be file name.
18 # create the file in rpm build directory.
19 install_script = os.path.join(self.rpm_base, "install.sh")
20 self.mkpath(self.rpm_base)
21 self.execute(write_file, (install_script, [
22 ("%s setup.py install --root=$RPM_BUILD_ROOT "
23 "--record=ROUNDUP_FILES") % self.python,
24 # allow any additional extension for man pages
25 # (rpm may compress them to .gz or .bz2)
26 # man page here is any file
27 # with single-character extension
28 # in man directory
29 "sed -e 's,\(/man/.*\..\)$,\\1*,' "
30 "<ROUNDUP_FILES >INSTALLED_FILES",
31 ]), "writing '%s'" % install_script)
32 self.install_script = install_script
33