From 4d202efe504c98fa8eab8d122f40214270f63ad2 Mon Sep 17 00:00:00 2001 From: Ben Longbons Date: Wed, 25 Sep 2013 21:42:16 -0700 Subject: Use keyword splats in ctors --- attoconf/_version.py | 4 ++-- attoconf/lib/install.py | 12 ++++++++++-- attoconf/lib/make.py | 12 ++++++++---- 3 files changed, 20 insertions(+), 8 deletions(-) diff --git a/attoconf/_version.py b/attoconf/_version.py index 414ed65..6aaa0c1 100644 --- a/attoconf/_version.py +++ b/attoconf/_version.py @@ -7,11 +7,11 @@ major = 0 # Incremented for releases with compatible API additions. # This is the number that is usually incremented. -minor = 6 +minor = 7 # Incremented if there is a bugfix release. # Might not be contiguous. -patch = 3 +patch = 0 # Reserved for distributors and forks. # Contains arbitrary text, but no parentheses or newlines. diff --git a/attoconf/lib/install.py b/attoconf/lib/install.py index b32ebe0..85e0de5 100644 --- a/attoconf/lib/install.py +++ b/attoconf/lib/install.py @@ -186,9 +186,17 @@ class Install(ClassyProject): return super(Install, cls).slots() + ( 'package', 'package_name') - def set_package(self, package, name): + # Compatibility with configure written for attoconf < 0.7 + # In attoconf 1.0, the positional srcdir argument will go away, + # the None default and the .set_package function will be removed. + # (Note: when bisecting, always force checkout attoconf!) + def __init__(self, srcdir, package=None, package_name=None, **kwargs): + super(Install, self).__init__(srcdir=srcdir, **kwargs) + self.set_package(package, package_name) + + def set_package(self, package, package_name): self.package = package - self.package_name = name + self.package_name = package_name def general(self): super(Install, self).general() diff --git a/attoconf/lib/make.py b/attoconf/lib/make.py index 8bcd3b5..c63cb61 100644 --- a/attoconf/lib/make.py +++ b/attoconf/lib/make.py @@ -65,10 +65,14 @@ class Make(ClassyProject): def slots(cls): return super(Make, cls).slots() + ('make_in', 'make_out') - def __init__(self, srcdir): - super(Make, self).__init__(srcdir) - self.set_make_infile('Makefile.in') - self.set_make_outfile('Makefile') # relative to build dir + # compatibility with attoconf < 0.7 + def __init__(self, srcdir, + make_infile='Makefile.in', + make_outfile='Makefile', + **kwargs): + super(Make, self).__init__(srcdir=srcdir, **kwargs) + self.set_make_infile(make_infile) + self.set_make_outfile(make_outfile) # relative to build dir def set_make_infile(self, ipath): self.make_in = ipath -- cgit v1.2.3-70-g09d2