From 1fc1c18fd9af86fce4e29b640c0158b4890754fe Mon Sep 17 00:00:00 2001 From: Tomas Hrnciar Date: Tue, 4 Aug 2020 15:03:32 +0200 Subject: [PATCH] Removes bindir parameter from script This parameter is not necessary anymore with +auto argument replacing +bindir. --- macros.pyproject | 1 - pyproject_save_files.py | 8 +++----- test_pyproject_save_files.py | 2 -- 3 files changed, 3 insertions(+), 8 deletions(-) diff --git a/macros.pyproject b/macros.pyproject index e4f3d62..ba53f4a 100644 --- a/macros.pyproject +++ b/macros.pyproject @@ -60,7 +60,6 @@ fi --buildroot "%{buildroot}" \\ --sitelib "%{python3_sitelib}" \\ --sitearch "%{python3_sitearch}" \\ - --bindir "%{_bindir}" \\ --python-version "%{python3_version}" \\ %{*} } diff --git a/pyproject_save_files.py b/pyproject_save_files.py index 8125625..84b7fc2 100755 --- a/pyproject_save_files.py +++ b/pyproject_save_files.py @@ -167,7 +167,7 @@ def add_file_to_module(paths, module_name, module_type, *files): def classify_paths( - record_path, parsed_record_content, sitedirs, bindir, python_version + record_path, parsed_record_content, sitedirs, python_version ): """ For each BuildrootPath in parsed_record_content classify it to a dict structure @@ -352,7 +352,7 @@ def parse_varargs(varargs): return globs, include_auto -def pyproject_save_files(buildroot, sitelib, sitearch, bindir, python_version, varargs): +def pyproject_save_files(buildroot, sitelib, sitearch, python_version, varargs): """ Takes arguments from the %{pyproject_save_files} macro @@ -368,7 +368,7 @@ def pyproject_save_files(buildroot, sitelib, sitearch, bindir, python_version, v parsed_record = parse_record(record_path, read_record(record_path_real)) paths_dict = classify_paths( - record_path, parsed_record, sitedirs, bindir, python_version + record_path, parsed_record, sitedirs, python_version ) return generate_file_list(paths_dict, globs, include_auto) @@ -378,7 +378,6 @@ def main(cli_args): cli_args.buildroot, cli_args.sitelib, cli_args.sitearch, - cli_args.bindir, cli_args.python_version, cli_args.varargs, ) @@ -393,7 +392,6 @@ def argparser(): r.add_argument("--buildroot", type=PosixPath, required=True) r.add_argument("--sitelib", type=BuildrootPath, required=True) r.add_argument("--sitearch", type=BuildrootPath, required=True) - r.add_argument("--bindir", type=BuildrootPath, required=True) r.add_argument("--python-version", type=str, required=True) parser.add_argument("varargs", nargs="+") return parser diff --git a/test_pyproject_save_files.py b/test_pyproject_save_files.py index 43d715f..d349e85 100755 --- a/test_pyproject_save_files.py +++ b/test_pyproject_save_files.py @@ -192,8 +192,6 @@ def default_options(output, mock_root): str(SITELIB), "--sitearch", str(SITEARCH), - "--bindir", - str(BINDIR), "--python-version", "3.7", # test data are for 3.7 ]