commit 2ef7e36ba261e9a0f43979d10f120806546ae1bb
Author: Jan Pokorný <jpokorny(a)redhat.com>
Date: Sat Feb 25 20:27:27 2012 +0100
setup_prepare: fix inconsistent value usage + duplicate
Signed-off-by: Jan Pokorný <jpokorny(a)redhat.com>
prepare-common.py | 6 ++++--
prepare-devel.py | 9 ---------
setup_prepare.py | 4 ++--
3 files changed, 6 insertions(+), 13 deletions(-)
---
diff --git a/prepare-common.py b/prepare-common.py
index 17e1890..1f9d4ad 100644
--- a/prepare-common.py
+++ b/prepare-common.py
@@ -12,14 +12,16 @@ from os.path import join, basename
# parametrization
#
-# basic setup
-# TODO
+# this can be used instead of ./setup wrapper, e.g.: python setup.py cfg build
+# where "cfg" is a standard alias to "prepare --gen defaultcfg", but
only
+# once any setup.cfg already exists (initally use "cp dist-files/setup.cfg .")
gen_file('defaultcfg',
join('dist-files','setup.cfg'),
'setup.cfg',
incl=False,
)
+# basic setup
nonoptions(
package = PACKAGE,
)
diff --git a/prepare-devel.py b/prepare-devel.py
index ec5c4e4..f18cba0 100644
--- a/prepare-devel.py
+++ b/prepare-devel.py
@@ -11,15 +11,6 @@ from os.path import join, exists, isfile, basename, splitext, normpath,
sep
from shutil import copy2
from fnmatch import fnmatch
-# this can be used instead of ./setup wrapper, e.g.: python setup.py cfg build
-# where "cfg" is a standard alias to "prepare --gen defaultcfg", but
only
-# once any setup.cfg already exists (initally use "cp dist-files/setup.cfg .")
-gen_file('defaultcfg',
- join('dist-files','setup.cfg'),
- 'setup.cfg',
- incl=False,
-)
-
#
# JavaScript and stylesheets
#
diff --git a/setup_prepare.py b/setup_prepare.py
index 5c326ef..9a79790 100644
--- a/setup_prepare.py
+++ b/setup_prepare.py
@@ -400,7 +400,7 @@ class PrepareFile(object):
self.dst_getter = lambda dst,getter: getter(dst, 'w')
self.incl = incl
- self.private = kwargs
+ self.private = kwargs # mainly to keep data between prepare and attach
self._prepared = False
def prepare(self, getter, distribution=None):
src, dst = self.do_prepare(getter, distribution)
@@ -425,7 +425,7 @@ class PreparePackageData(PrepareFile):
def do_prepare(self, getter, distribution):
# upon build
dst_top = (distribution.package_dir or {}).get('', '')
- pkg = self.private['package'] # fail if not passed from constructor
+ pkg = self.package
dst_pkg = path.join(
dst_top,
(distribution.package_dir or {}).get(pkg, pkg)
Show replies by date