diff --git a/rust2rpm/__main__.py b/rust2rpm/__main__.py index da1d1a0..81610f3 100644 --- a/rust2rpm/__main__.py +++ b/rust2rpm/__main__.py @@ -537,7 +537,7 @@ def main(): if args.dynamic_buildrequires is None: args.dynamic_buildrequires = args.target == "fedora" - packager_identity = util.detect_packager() + packager = util.detect_packager() conf = configparser.ConfigParser(interpolation=configparser.ExtendedInterpolation()) confs = conf.read([".rust2rpm.conf", "_rust2rpm.conf", "rust2rpm.conf"]) @@ -571,7 +571,7 @@ def main(): metadata = metadata, patch_file_automatic=patch_files[0], patch_file_manual=patch_files[1], - packager_identity = packager_identity, + packager = packager, doc_files = doc_files, license_files = license_files, distconf = conf[args.target], diff --git a/rust2rpm/generator.py b/rust2rpm/generator.py index 9a37912..63b595f 100644 --- a/rust2rpm/generator.py +++ b/rust2rpm/generator.py @@ -32,7 +32,7 @@ def spec_file_render( metadata, patch_file_manual, patch_file_automatic, - packager_identity, + packager, doc_files, license_files, distconf, @@ -97,8 +97,8 @@ def spec_file_render( ([date] if date else [])) kwargs['date'] = time.strftime(*time_args) - if packager_identity is not None: - kwargs['packager'] = packager_identity + if packager is not None: + kwargs['packager'] = packager if metadata.license is not None: license, comments = licensing.translate_license(args.target, metadata.license) diff --git a/rust2rpm/tests/test_generator.py b/rust2rpm/tests/test_generator.py index 68cb28c..e8cb040 100644 --- a/rust2rpm/tests/test_generator.py +++ b/rust2rpm/tests/test_generator.py @@ -62,7 +62,7 @@ def mock_spec_file_render(crate, tomlfile, target, tmpdir): metadata = metadata, patch_file_automatic = f'{crate}-patch1.diff', patch_file_manual = f'{crate}-patch2.diff', - packager_identity = 'Jane Jane ', + packager = 'Jane Jane ', doc_files = ['DOC1', 'DOC2'], license_files = ['LIC1', 'LIC2'], distconf = {}, diff --git a/rust2rpm/util.py b/rust2rpm/util.py index 0c3cd7a..80d7c91 100644 --- a/rust2rpm/util.py +++ b/rust2rpm/util.py @@ -49,9 +49,9 @@ def detect_packager(): return None # If we're supplying packager identity through an environment variable... - packager_identity = os.getenv('RUST2RPM_PACKAGER') - if packager_identity is not None: - return packager_identity + packager = os.getenv('RUST2RPM_PACKAGER') + if packager is not None: + return packager # If we're detecting packager identity through rpmdev-packager... rpmdev_packager = shutil.which('rpmdev-packager')