Skip to content

Commit

Permalink
Removed bdist_rpm from setup.cfg #1222 (#1227)
Browse files Browse the repository at this point in the history
  • Loading branch information
joachimmetz committed Mar 11, 2024
1 parent db06f92 commit 677b4ea
Show file tree
Hide file tree
Showing 4 changed files with 2 additions and 39 deletions.
7 changes: 0 additions & 7 deletions data/templates/setup.cfg/bdist_rpm

This file was deleted.

2 changes: 0 additions & 2 deletions data/templates/setup.cfg/bdist_rpm_requires

This file was deleted.

22 changes: 2 additions & 20 deletions l2tdevtools/dependency_writers/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand All @@ -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'
Expand Down Expand Up @@ -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}

Expand Down Expand Up @@ -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)

Expand Down
10 changes: 0 additions & 10 deletions setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -42,15 +42,5 @@ exclude =
utils
where = .

[bdist_rpm]
release = 1
packager = Log2Timeline maintainers <[email protected]>
doc_files =
ACKNOWLEDGEMENTS
AUTHORS
LICENSE
README
build_requires = python3-setuptools

[bdist_wheel]
universal = 1

0 comments on commit 677b4ea

Please sign in to comment.