Fix module names in setup.py, and make data_files use relative paths

This commit is contained in:
Micah Lee 2019-11-27 16:58:03 -08:00
parent 37b09ed28b
commit d78d67adf6
No known key found for this signature in database
GPG Key ID: 403C2657CD994F73

View File

@ -69,42 +69,21 @@ classifiers = [
"Environment :: Web Environment", "Environment :: Web Environment",
] ]
data_files = [ data_files = [
( ("share/applications", ["install/org.onionshare.OnionShare.desktop"],),
os.path.join(sys.prefix, "share/applications"), ("share/icons/hicolor/scalable/apps", ["install/org.onionshare.OnionShare.svg"],),
["install/org.onionshare.OnionShare.desktop"], ("share/metainfo", ["install/org.onionshare.OnionShare.appdata.xml"],),
), ("share/onionshare", file_list("share")),
( ("share/onionshare/images", file_list("share/images")),
os.path.join(sys.prefix, "share/icons/hicolor/scalable/apps"), ("share/onionshare/locale", file_list("share/locale")),
["install/org.onionshare.OnionShare.svg"], ("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"),),
os.path.join(sys.prefix, "share/metainfo"), ("share/onionshare/static/js", file_list("share/static/js"),),
["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"),
),
] ]
if not platform.system().endswith("BSD") and platform.system() != "DragonFly": if not platform.system().endswith("BSD") and platform.system() != "DragonFly":
data_files.append( data_files.append(
( (
"/usr/share/nautilus-python/extensions/", "share/nautilus-python/extensions/",
["install/scripts/onionshare-nautilus.py"], ["install/scripts/onionshare-nautilus.py"],
) )
) )
@ -126,10 +105,11 @@ setup(
"onionshare", "onionshare",
"onionshare.web", "onionshare.web",
"onionshare_gui", "onionshare_gui",
"onionshare_gui.mode", "onionshare_gui.tab",
"onionshare_gui.mode.share_mode", "onionshare_gui.tab.mode",
"onionshare_gui.mode.receive_mode", "onionshare_gui.tab.mode.share_mode",
"onionshare_gui.mode.website_mode", "onionshare_gui.tab.mode.receive_mode",
"onionshare_gui.tab.mode.website_mode",
], ],
include_package_data=True, include_package_data=True,
scripts=["install/scripts/onionshare", "install/scripts/onionshare-gui"], scripts=["install/scripts/onionshare", "install/scripts/onionshare-gui"],