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
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
[project]
name = "torbrowser-launcher"
dynamic = ["version", "description", "dependencies", "authors", "license", "readme"]

[build-system]
requires = ["setuptools"]
build-backend = "setuptools.build_meta"
25 changes: 1 addition & 24 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -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 = []
Expand Down Expand Up @@ -74,33 +70,14 @@ 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(
name="torbrowser-launcher",
version=version,
author="Micah Lee",
author_email="[email protected]",
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",
Expand Down