Commit 927b8e91 authored by Sean Davis's avatar Sean Davis
Browse files

Merge branch 'newhoa/catfish-allow-pip-install'

parents 91fb799d 8a7e5a77
Pipeline #8985 passed with stage
in 13 seconds
......@@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2021-05-08 15:38-0400\n"
"POT-Creation-Date: 2021-05-08 15:44-0400\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
......
......@@ -21,6 +21,7 @@ import os
import shutil
import sys
import subprocess
import site
__version__ = '4.16.0'
__url__ = 'https://docs.xfce.org/apps/catfish/start'
......@@ -186,6 +187,8 @@ class InstallAndUpdateDataDirectory(DistUtilsExtra.auto.install_auto):
(self.distribution.get_name(),
self.distribution.get_version())))
using_pip = os.path.basename(os.path.dirname(__file__)).startswith('pip-')
if not self.prefix:
self.prefix = '' # pylint: disable=W0201
......@@ -196,6 +199,19 @@ class InstallAndUpdateDataDirectory(DistUtilsExtra.auto.install_auto):
data_dir = os.path.join(self.prefix, 'share', 'catfish', '')
script_path = os.path.join(self.prefix, 'bin')
if using_pip:
target_data = os.path.relpath(self.install_data) + os.sep
target_pkgdata = os.path.join(site.getuserbase(), 'share', 'catfish')
target_scripts = os.path.join(site.getuserbase(), 'bin')
# Use absolute paths
target_data = os.path.realpath(target_data)
target_pkgdata = os.path.realpath(target_pkgdata)
target_scripts = os.path.realpath(target_scripts)
data_dir = target_pkgdata
script_path = target_scripts
else:
# --user install
self.root = '' # pylint: disable=W0201
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment