From 677b4ea60dc029ebba35547d9e315efa33c72030 Mon Sep 17 00:00:00 2001 From: Joachim Metz Date: Mon, 11 Mar 2024 18:55:44 +0100 Subject: [PATCH] Removed bdist_rpm from setup.cfg #1222 (#1227) --- data/templates/setup.cfg/bdist_rpm | 7 ------- data/templates/setup.cfg/bdist_rpm_requires | 2 -- l2tdevtools/dependency_writers/setup.py | 22 ++------------------- setup.cfg | 10 ---------- 4 files changed, 2 insertions(+), 39 deletions(-) delete mode 100644 data/templates/setup.cfg/bdist_rpm delete mode 100644 data/templates/setup.cfg/bdist_rpm_requires diff --git a/data/templates/setup.cfg/bdist_rpm b/data/templates/setup.cfg/bdist_rpm deleted file mode 100644 index bc6de5d3..00000000 --- a/data/templates/setup.cfg/bdist_rpm +++ /dev/null @@ -1,7 +0,0 @@ - -[bdist_rpm] -release = 1 -packager = ${maintainer} -doc_files = -${doc_files} -build_requires = python3-setuptools diff --git a/data/templates/setup.cfg/bdist_rpm_requires b/data/templates/setup.cfg/bdist_rpm_requires deleted file mode 100644 index 55723a31..00000000 --- a/data/templates/setup.cfg/bdist_rpm_requires +++ /dev/null @@ -1,2 +0,0 @@ -requires = -${rpm_requires} diff --git a/l2tdevtools/dependency_writers/setup.py b/l2tdevtools/dependency_writers/setup.py index 08894fbd..41e42fda 100644 --- a/l2tdevtools/dependency_writers/setup.py +++ b/l2tdevtools/dependency_writers/setup.py @@ -118,12 +118,8 @@ def Write(self): if self._project_definition.name.endswith('-kb'): python_module_name = ''.join([python_module_name[:-3], 'rc']) - python3_dependencies = self._dependency_helper.GetRPMRequires() + # TODO: handle data directory without yaml files. - formatted_rpm_requires = [ - f' {dependency:s}' for dependency in python3_dependencies] - - has_data_directory = False package_data = [] for data_file in glob.glob( f'{python_module_name:s}/**/*.yaml', recursive=True): @@ -134,17 +130,12 @@ def Write(self): if data_file_directory: data_file = '/'.join([data_file_directory, data_file]) - if data_file_directory == 'data': - has_data_directory = True - elif data_file not in package_data: + if data_file not in package_data: package_data.append(data_file) formatted_package_data = [ f' {data_file:s}' for data_file in sorted(package_data)] - # TODO: add support for has_data_directory - _ = has_data_directory - scripts_directory = None if os.path.isdir('scripts'): scripts_directory = 'scripts' @@ -177,7 +168,6 @@ def Write(self): 'maintainer_name': maintainer_name, 'package_data': '\n'.join(formatted_package_data), 'python_module_name': python_module_name, - 'rpm_requires': '\n'.join(formatted_rpm_requires), 'scripts': '\n'.join(formatted_scripts), 'version': version} @@ -205,14 +195,6 @@ def Write(self): 'sdist_test_data', template_mappings) file_content.append(template_data) - template_data = self._GenerateFromTemplate('bdist_rpm', template_mappings) - file_content.append(template_data) - - if python3_dependencies: - template_data = self._GenerateFromTemplate( - 'bdist_rpm_requires', template_mappings) - file_content.append(template_data) - template_data = self._GenerateFromTemplate('bdist_wheel', template_mappings) file_content.append(template_data) diff --git a/setup.cfg b/setup.cfg index f6ce3cb4..7f3d7c3d 100644 --- a/setup.cfg +++ b/setup.cfg @@ -42,15 +42,5 @@ exclude = utils where = . -[bdist_rpm] -release = 1 -packager = Log2Timeline maintainers -doc_files = - ACKNOWLEDGEMENTS - AUTHORS - LICENSE - README -build_requires = python3-setuptools - [bdist_wheel] universal = 1