setup.py: Adjust to new Inkscape command line

inkscape -x no longer is supported. There are now separate commands for
the system and user data directories.
This commit is contained in:
Florian Festi 2021-04-20 22:32:37 +02:00
parent f4f3855976
commit c32706adc3
1 changed files with 2 additions and 1 deletions

View File

@ -58,7 +58,8 @@ class CustomBuildExtCommand(build_py):
# we are surely not building a Debian package
# then here is the default behavior:
try:
path = check_output(["inkscape", "-x"]).decode().strip()
path = check_output(["inkscape", "--system-data-directory"]).decode().strip()
path = os.path.join(path, "extensions")
if not os.access(path, os.W_OK): # Can we install globally
# Not tested on Windows and Mac
path = os.path.expanduser("~/.config/inkscape/extensions")