Skip to content

Conversation

mcepl
Copy link

@mcepl mcepl commented Aug 8, 2025

This refactors the packaging to follow modern setuptools/PEP 517 practices:

  • Move package metadata (name, version, author, description, license, classifiers) into setup.cfg for declarative builds.
  • Use version = attr: servicereportpkg.get_version to retrieve version dynamically.
  • Add console_scripts entry point for servicereport CLI instead of installing a standalone wrapper script.
  • Drop data_files entries for manpages, docs, and systemd unit — these should be installed by distro packaging, not via pip/wheels, to ensure correct FHS placement.
  • Remove obsolete RPM compression workaround.
  • Simplify setup.py to a single setup() call.

This improves PyPI compatibility, wheel portability, and distro packaging integration.

…ed data_files

This refactors the packaging to follow modern setuptools/PEP 517
practices:

- Move package metadata (name, version, author, description,
  license, classifiers) into setup.cfg for declarative builds.
- Use `version = attr: servicereportpkg.get_version` to retrieve
  version dynamically.
- Add `console_scripts` entry point for `servicereport` CLI
  instead of installing a standalone wrapper script.
- Drop `data_files` entries for manpages, docs, and systemd
  unit — these should be installed by distro packaging, not via
  pip/wheels, to ensure correct FHS placement.
- Remove obsolete RPM compression workaround.
- Simplify setup.py to a single `setup()` call.

This improves PyPI compatibility, wheel portability, and distro
packaging integration.

Signed-off-by: Matěj Cepl <[email protected]>
@hramrach
Copy link

This should also update the sample spec file provided in the git repository.

@mcepl
Copy link
Author

mcepl commented Aug 11, 2025 via email

@hramrach
Copy link

Providing an example is useful, especially since python install system is no longer usable for fully installing the tool, and missing bits need to be supplemented by the spec file.

@mcepl
Copy link
Author

mcepl commented Aug 11, 2025

Feel free to modify them (you have openSUSE ones, after all), I said, what I would do.

@hramrach
Copy link

hramrach commented Oct 13, 2025

I don't follow python packaging so I will trust you when you say that current up-to-date python packaging practices do not account for data files.

Unfortunately, distribution packaging does need installation of data files.

You could say that the party that does not care about distribution packaging in the first place is python upstream maintaining those python packaging schemes.

Also you could say that before your change the spec file was redundant, and not particularly useful.

However, after your change the python packaging no longer installs the data files.

Then some other place should track the data files to install. Given that there already is a spec file it is the natural place to track the files to install that python refuses to. Even if it is unlikely to be usable as is the list of files not tracked by python can be there.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants