diff options
author | Dirk Baechle <dl9obn@darc.de> | 2015-02-26 23:44:19 (GMT) |
---|---|---|
committer | Dirk Baechle <dl9obn@darc.de> | 2015-02-26 23:44:19 (GMT) |
commit | 354388a26c7ff2ed69e4e34f41880e0e1bfb0cb1 (patch) | |
tree | e4e8f3ef044c39a930235a39bb7301d35b0300ff /src/engine/SCons/Tool/packaging/rpm.py | |
parent | 8447a9187ac80c0a7e980510154542b49577ddaa (diff) | |
download | SCons-354388a26c7ff2ed69e4e34f41880e0e1bfb0cb1.zip SCons-354388a26c7ff2ed69e4e34f41880e0e1bfb0cb1.tar.gz SCons-354388a26c7ff2ed69e4e34f41880e0e1bfb0cb1.tar.bz2 |
- switching Node class and NodeInfo/Binfo to using slots
- memoizer subsystem now uses decorators instead of the metaclass approach
Diffstat (limited to 'src/engine/SCons/Tool/packaging/rpm.py')
-rw-r--r-- | src/engine/SCons/Tool/packaging/rpm.py | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/engine/SCons/Tool/packaging/rpm.py b/src/engine/SCons/Tool/packaging/rpm.py index 2bc3063..656d8fb 100644 --- a/src/engine/SCons/Tool/packaging/rpm.py +++ b/src/engine/SCons/Tool/packaging/rpm.py @@ -130,8 +130,7 @@ def build_specfile(target, source, env): """ Builds a RPM specfile from a dictionary with string metadata and by analyzing a tree of nodes. """ - file = open(target[0].abspath, 'w') - str = "" + file = open(target[0].get_abspath(), 'w') try: file.write( build_specfile_header(env) ) @@ -279,7 +278,9 @@ def build_specfile_filesection(spec, files): tags = {} for k in supported_tags.keys(): try: - tags[k]=getattr(file, k) + v = file.GetTag(k) + if v: + tags[k] = v except AttributeError: pass @@ -287,7 +288,7 @@ def build_specfile_filesection(spec, files): str = str + SimpleTagCompiler(supported_tags, mandatory=0).compile( tags ) str = str + ' ' - str = str + file.PACKAGING_INSTALL_LOCATION + str = str + file.GetTag('PACKAGING_INSTALL_LOCATION') str = str + '\n\n' return str |