]> git.lizzy.rs Git - torbrowser-launcher.git/blobdiff - setup.py
Merge pull request #503 from rmsacks/apparmor-libstdc++
[torbrowser-launcher.git] / setup.py
index 31850547c651b9f259a687086ff224ee46baf6d9..a79d3b39898806c3b76c2a6f5757469fc3f4b58a 100644 (file)
--- a/setup.py
+++ b/setup.py
@@ -26,13 +26,18 @@ FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
 OTHER DEALINGS IN THE SOFTWARE.
 """
 
+import os
+import sys
+import platform
+import subprocess
 from distutils.core import setup
-import os, sys, platform, subprocess
+
 SHARE = 'share'
 
 # detect linux distribution
 distro = platform.dist()[0]
 
+
 def file_list(path):
     files = []
     for filename in os.listdir(path):
@@ -40,6 +45,7 @@ def file_list(path):
             files.append(path+'/'+filename)
     return files
 
+
 def create_mo_files():
     po_dir = 'po/'
     if not os.path.exists(po_dir):
@@ -59,13 +65,14 @@ def create_mo_files():
         mo_files.append(mo_dir + mo_file)
     return mo_files
 
+
 with open(os.path.join(SHARE, 'torbrowser-launcher/version')) as buf:
     version = buf.read().strip()
 
 datafiles = []
 for root, dirs, files in os.walk(SHARE):
-    datafiles.append((os.path.join(sys.prefix, root),
-                      [os.path.join(root, f) for f in 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':
@@ -74,12 +81,14 @@ if distro != 'Ubuntu':
         datafiles += [
             ('/etc/apparmor.d/', [
                 'apparmor/torbrowser.Browser.firefox',
-                'apparmor/torbrowser.Browser.plugin-container',
                 '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 += [('/usr/share/locale/', create_mo_files())]
+datafiles += [(os.path.dirname(f), [f]) for f in create_mo_files()]
 
 setup(
     name='torbrowser-launcher',
@@ -91,7 +100,15 @@ setup(
     license='MIT',
     description='A program to help you securely download and run Tor Browser',
     long_description="""
-Tor Browser Launcher is intended to make Tor Browser easier to install and use for GNU/Linux users. You install torbrowser-launcher from your distribution's package manager and it handles securely downloading the most recent version of Tor Browser for you, in your language and for your architecture. It also adds a "Tor Browser" application launcher to your operating system's menu. When you first launch Tor Browser Launcher, it will download Tor Browser from https://www.torproject.org/, verify the PGP signature, extract it in your home directory, and launch it. When you run it after that it will just launch Tor Browser.
+Tor Browser Launcher is intended to make Tor Browser easier to install and use
+for GNU/Linux users. You install torbrowser-launcher from your distribution's
+package manager and it handles securely downloading the most recent version of
+Tor Browser for you, in your language and for your architecture. It also adds a
+"Tor Browser" application launcher to your operating system's menu. When you
+first launch Tor Browser Launcher, it will download Tor Browser from
+https://www.torproject.org/, verify the PGP signature, extract it in your home
+directory, and launch it. When you run it after that it will just launch Tor
+Browser.
 """,
     packages=['torbrowser_launcher'],
     scripts=['torbrowser-launcher'],