From d78d67adf6c05ea6431d25dc025408249a6981dd Mon Sep 17 00:00:00 2001 From: Micah Lee Date: Wed, 27 Nov 2019 16:58:03 -0800 Subject: [PATCH] Fix module names in setup.py, and make data_files use relative paths --- setup.py | 52 ++++++++++++++++------------------------------------ 1 file changed, 16 insertions(+), 36 deletions(-) diff --git a/setup.py b/setup.py index 9af72fc1..e6953370 100644 --- a/setup.py +++ b/setup.py @@ -69,42 +69,21 @@ classifiers = [ "Environment :: Web Environment", ] data_files = [ - ( - os.path.join(sys.prefix, "share/applications"), - ["install/org.onionshare.OnionShare.desktop"], - ), - ( - os.path.join(sys.prefix, "share/icons/hicolor/scalable/apps"), - ["install/org.onionshare.OnionShare.svg"], - ), - ( - os.path.join(sys.prefix, "share/metainfo"), - ["install/org.onionshare.OnionShare.appdata.xml"], - ), - (os.path.join(sys.prefix, "share/onionshare"), file_list("share")), - (os.path.join(sys.prefix, "share/onionshare/images"), file_list("share/images")), - (os.path.join(sys.prefix, "share/onionshare/locale"), file_list("share/locale")), - ( - os.path.join(sys.prefix, "share/onionshare/templates"), - file_list("share/templates"), - ), - ( - os.path.join(sys.prefix, "share/onionshare/static/css"), - file_list("share/static/css"), - ), - ( - os.path.join(sys.prefix, "share/onionshare/static/img"), - file_list("share/static/img"), - ), - ( - os.path.join(sys.prefix, "share/onionshare/static/js"), - file_list("share/static/js"), - ), + ("share/applications", ["install/org.onionshare.OnionShare.desktop"],), + ("share/icons/hicolor/scalable/apps", ["install/org.onionshare.OnionShare.svg"],), + ("share/metainfo", ["install/org.onionshare.OnionShare.appdata.xml"],), + ("share/onionshare", file_list("share")), + ("share/onionshare/images", file_list("share/images")), + ("share/onionshare/locale", file_list("share/locale")), + ("share/onionshare/templates", file_list("share/templates"),), + ("share/onionshare/static/css", file_list("share/static/css"),), + ("share/onionshare/static/img", file_list("share/static/img"),), + ("share/onionshare/static/js", file_list("share/static/js"),), ] if not platform.system().endswith("BSD") and platform.system() != "DragonFly": data_files.append( ( - "/usr/share/nautilus-python/extensions/", + "share/nautilus-python/extensions/", ["install/scripts/onionshare-nautilus.py"], ) ) @@ -126,10 +105,11 @@ setup( "onionshare", "onionshare.web", "onionshare_gui", - "onionshare_gui.mode", - "onionshare_gui.mode.share_mode", - "onionshare_gui.mode.receive_mode", - "onionshare_gui.mode.website_mode", + "onionshare_gui.tab", + "onionshare_gui.tab.mode", + "onionshare_gui.tab.mode.share_mode", + "onionshare_gui.tab.mode.receive_mode", + "onionshare_gui.tab.mode.website_mode", ], include_package_data=True, scripts=["install/scripts/onionshare", "install/scripts/onionshare-gui"],