From 870589e8fe36f2393b678027d8bab004cb592fa5 Mon Sep 17 00:00:00 2001 From: kpcyrd Date: Fri, 27 Oct 2023 17:47:36 +0200 Subject: [PATCH 1/2] Add a pyproject.toml for PEP-517 --- pyproject.toml | 7 +++++++ setup.py | 2 +- 2 files changed, 8 insertions(+), 1 deletion(-) create mode 100644 pyproject.toml diff --git a/pyproject.toml b/pyproject.toml new file mode 100644 index 00000000..46fc81a7 --- /dev/null +++ b/pyproject.toml @@ -0,0 +1,7 @@ +[project] +name = "torbrowser-launcher" +dynamic = ["version", "description", "dependencies", "authors", "license", "readme"] + +[build-system] +requires = ["setuptools"] +build-backend = "setuptools.build_meta" diff --git a/setup.py b/setup.py index 8d8fa7dd..1151a35f 100644 --- a/setup.py +++ b/setup.py @@ -100,7 +100,7 @@ def create_mo_files(): version=version, author="Micah Lee", author_email="micah@micahflee.com", - url="https://www.github.com/micahflee/torbrowser-launcher", + url="https://www.github.com/torproject/torbrowser-launcher", platforms=["GNU/Linux"], license="MIT", description="A program to help you securely download and run Tor Browser", From 27cb52b5cc5840a1a13d8d37910d99882f9f4738 Mon Sep 17 00:00:00 2001 From: kpcyrd Date: Fri, 27 Oct 2023 19:07:37 +0200 Subject: [PATCH 2/2] Writing to /etc from data_files is not allowed anymore --- setup.py | 23 ----------------------- 1 file changed, 23 deletions(-) diff --git a/setup.py b/setup.py index 1151a35f..2bd7546a 100644 --- a/setup.py +++ b/setup.py @@ -28,15 +28,11 @@ import os import sys -import distro import subprocess from distutils.core import setup SHARE = "share" -# detect linux distribution -distro = distro.linux_distribution()[0] - def file_list(path): files = [] @@ -74,25 +70,6 @@ def create_mo_files(): if files: datafiles.append((root, [os.path.join(root, f) for f in files])) -# disable shipping apparmor profiles until they work in ubuntu (#128) -if distro != "Ubuntu": - if not hasattr(sys, "real_prefix"): - # we're not in a virtualenv, so we can probably write to /etc - datafiles += [ - ( - "/etc/apparmor.d/", - ["apparmor/torbrowser.Browser.firefox", "apparmor/torbrowser.Tor.tor"], - ), - ( - "/etc/apparmor.d/local/", - [ - "apparmor/local/torbrowser.Browser.firefox", - "apparmor/local/torbrowser.Tor.tor", - ], - ), - ("/etc/apparmor.d/tunables/", ["apparmor/tunables/torbrowser"]), - ] - datafiles += [(os.path.dirname(f), [f]) for f in create_mo_files()] setup(