torbrowser-launcher icon indicating copy to clipboard operation
torbrowser-launcher copied to clipboard

Add a pyproject.toml for PEP-517

Open kpcyrd opened this issue 8 months ago • 1 comments

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 avatar Oct 27 '23 15:10 kpcyrd

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 avatar Oct 27 '23 17:10 kpcyrd