You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

28 lines
1.2 KiB

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

--- a/setup.py
+++ b/setup.py
@@ -33,23 +33,7 @@
# Use per-user */share directory if the global one is not writable or if a per-user installation
# is attempted
user_share = os.environ.get('XDG_DATA_HOME', os.path.expanduser('~/.local/share'))
- system_share = os.path.join(opts.prefix_path, "share")
- if not opts.is_user:
- # Not neccarily a per-user installation try system directories
- if os.access(opts.root_path + system_share, os.W_OK):
- # Global /usr/share is writable for us so just use that
- share_dir = system_share
- elif not os.path.exists(opts.root_path + system_share) and os.access(opts.root_path, os.W_OK):
- # Global /usr/share does not exist, but / is writable keep using the global directory
- # (happens during packaging)
- share_dir = system_share
- else:
- # Neither /usr/share (nor / if /usr/share doesn't exist) is writable, use the
- # per-user */share directory
- share_dir = user_share
- else:
- # Per-user installation
- share_dir = user_share
+ share_dir = os.path.join(opts.prefix_path, "share")
data_files += [
# Menu icon
# Menu entry