Skip to content

Conversation

@kpcyrd
Copy link
Contributor

@kpcyrd kpcyrd commented Oct 27, 2023

This configures pyproject.toml to read from setup.py. One caveat I've noticed, the apparmor profile is getting installed to /usr/lib/python3.11/site-packages/etc instead of /etc, not sure how to fix this.

@kpcyrd kpcyrd requested a review from micahflee as a code owner October 27, 2023 15:50
@kpcyrd
Copy link
Contributor Author

kpcyrd commented Oct 27, 2023

It seems writing to /etc through data_files is not really supported anymore, since this was already excluded on ubuntu anyway I added another commit to remove it for everybody. The wheel otherwise attempts to write to /usr/lib/python3.11/site-packages/etc.

I'm not sure how to add it back in for bdist_deb and bdist_rpm, but data_files is likely the wrong way.

Also fixes this deprecation warning on Python 3.11:

<string>:38: DeprecationWarning: distro.linux_distribution() is deprecated. It should only be used as a compatibility shim with Python's platform.linux_distribution(). Please use distro.id(), distro.version() and distro.name() instead.

For the Arch Linux package, this would be added to the PKGBUILD:

install -d "${pkgdir}/etc/apparmor.d"
cp -a apparmor/* "${pkgdir}/etc/apparmor.d"
rm "${pkgdir}/etc/apparmor.d/license.txt"

Ideally the apparmor/license.txt could be merged with the LICENSE file or moved to the project root as license.apparmor.txt, so apparmor/ could be copied as-is into the package.

@kpcyrd kpcyrd force-pushed the PEP-517-pyproject-toml branch from a81a8f1 to 27cb52b Compare October 27, 2023 17:09
@boklm boklm requested review from boklm and removed request for micahflee November 23, 2023 10:12
Copy link

@A1exKH A1exKH left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please fix conflicts for this PR.

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