Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add a pyproject.toml for PEP-517 #717

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

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
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.

@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