Files
MINGW-packages/mingw-w64-inkscape/inkscape-0.48.4-python-extensions-location.patch
Ray Donnelly a5da168c76 inkscape: import os module for Python path changes
.. and add missed bits from last commit.
2014-03-06 00:54:59 +00:00

271 lines
12 KiB
Diff

diff -urN inkscape-0.48.4.orig/share/extensions/guides_creator.py inkscape-0.48.4/share/extensions/guides_creator.py
--- inkscape-0.48.4.orig/share/extensions/guides_creator.py 2014-03-06 00:48:27.919147500 +0000
+++ inkscape-0.48.4/share/extensions/guides_creator.py 2014-03-06 00:49:52.681995600 +0000
@@ -40,8 +40,8 @@
# These two lines are only needed if you don't put the script directly into
# the installation directory
-import sys
-sys.path.append('/usr/share/inkscape/extensions')
+import sys, os
+sys.path.append(sys.prefix+os.sep+'share'+os.sep+'inkscape'+os.sep+'extensions')
# We will use the inkex module with the predefined Effect base class.
import inkex
diff -urN inkscape-0.48.4.orig/share/extensions/jessyInk_autoTexts.py inkscape-0.48.4/share/extensions/jessyInk_autoTexts.py
--- inkscape-0.48.4.orig/share/extensions/jessyInk_autoTexts.py 2014-03-06 00:48:27.929148100 +0000
+++ inkscape-0.48.4/share/extensions/jessyInk_autoTexts.py 2014-03-06 00:50:15.423296400 +0000
@@ -15,13 +15,8 @@
# These lines are only needed if you don't put the script directly into
# the installation directory
-import sys
-# Unix
-sys.path.append('/usr/share/inkscape/extensions')
-# OS X
-sys.path.append('/Applications/Inkscape.app/Contents/Resources/extensions')
-# Windows
-sys.path.append('C:\Program Files\Inkscape\share\extensions')
+import sys, os
+sys.path.append(sys.prefix+os.sep+'share'+os.sep+'inkscape'+os.sep+'extensions')
# We will use the inkex module with the predefined Effect base class.
import inkex
diff -urN inkscape-0.48.4.orig/share/extensions/jessyInk_effects.py inkscape-0.48.4/share/extensions/jessyInk_effects.py
--- inkscape-0.48.4.orig/share/extensions/jessyInk_effects.py 2014-03-06 00:48:27.931148200 +0000
+++ inkscape-0.48.4/share/extensions/jessyInk_effects.py 2014-03-06 00:50:20.893609300 +0000
@@ -15,13 +15,8 @@
# These lines are only needed if you don't put the script directly into
# the installation directory
-import sys
-# Unix
-sys.path.append('/usr/share/inkscape/extensions')
-# OS X
-sys.path.append('/Applications/Inkscape.app/Contents/Resources/extensions')
-# Windows
-sys.path.append('C:\Program Files\Inkscape\share\extensions')
+import sys, os
+sys.path.append(sys.prefix+os.sep+'share'+os.sep+'inkscape'+os.sep+'extensions')
# We will use the inkex module with the predefined Effect base class.
import inkex
diff -urN inkscape-0.48.4.orig/share/extensions/jessyInk_export.py inkscape-0.48.4/share/extensions/jessyInk_export.py
--- inkscape-0.48.4.orig/share/extensions/jessyInk_export.py 2014-03-06 00:48:27.932148200 +0000
+++ inkscape-0.48.4/share/extensions/jessyInk_export.py 2014-03-06 00:50:26.830948800 +0000
@@ -15,13 +15,8 @@
# These lines are only needed if you don't put the script directly into
# the installation directory
-import sys
-# Unix
-sys.path.append('/usr/share/inkscape/extensions')
-# OS X
-sys.path.append('/Applications/Inkscape.app/Contents/Resources/extensions')
-# Windows
-sys.path.append('C:\Program Files\Inkscape\share\extensions')
+import sys, os
+sys.path.append(sys.prefix+os.sep+'share'+os.sep+'inkscape'+os.sep+'extensions')
import inkex, os.path
import subprocess
@@ -158,9 +153,8 @@
# Function to try and find the correct command to invoke Inkscape.
def findInkscapeCommand(self):
commands = []
- commands.append("inkscape")
- commands.append("C:\Program Files\Inkscape\inkscape.exe")
- commands.append("/Applications/Inkscape.app/Contents/Resources/bin/inkscape")
+ commands.append("inkscape.exe")
+ commands.append(sys.path.append(sys.prefix+os.sep+'bin'+os.sep+'inkscape.exe'))
for command in commands:
proc = subprocess.Popen([command + " --without-gui --version"], shell=True, stdout=subprocess.PIPE, stderr=subprocess.PIPE)
diff -urN inkscape-0.48.4.orig/share/extensions/jessyInk_install.py inkscape-0.48.4/share/extensions/jessyInk_install.py
--- inkscape-0.48.4.orig/share/extensions/jessyInk_install.py 2014-03-06 00:48:27.933148300 +0000
+++ inkscape-0.48.4/share/extensions/jessyInk_install.py 2014-03-06 00:49:07.868432400 +0000
@@ -18,12 +18,7 @@
# These lines are only needed if you don't put the script directly into
# the installation directory
import sys
-# Unix
-sys.path.append('/usr/share/inkscape/extensions')
-# OS X
-sys.path.append('/Applications/Inkscape.app/Contents/Resources/extensions')
-# Windows
-sys.path.append('C:\Program Files\Inkscape\share\extensions')
+sys.path.append(sys.prefix+os.sep+'share'+os.sep+'inkscape'+os.sep+'extensions')
# We will use the inkex module with the predefined Effect base class.
import inkex
diff -urN inkscape-0.48.4.orig/share/extensions/jessyInk_keyBindings.py inkscape-0.48.4/share/extensions/jessyInk_keyBindings.py
--- inkscape-0.48.4.orig/share/extensions/jessyInk_keyBindings.py 2014-03-06 00:48:27.934148300 +0000
+++ inkscape-0.48.4/share/extensions/jessyInk_keyBindings.py 2014-03-06 00:51:13.557621500 +0000
@@ -15,13 +15,8 @@
# These lines are only needed if you don't put the script directly into
# the installation directory
-import sys
-# Unix
-sys.path.append('/usr/share/inkscape/extensions')
-# OS X
-sys.path.append('/Applications/Inkscape.app/Contents/Resources/extensions')
-# Windows
-sys.path.append('C:\Program Files\Inkscape\share\extensions')
+import sys, os
+sys.path.append(sys.prefix+os.sep+'share'+os.sep+'inkscape'+os.sep+'extensions')
# We will use the inkex module with the predefined Effect base class.
import inkex
diff -urN inkscape-0.48.4.orig/share/extensions/jessyInk_masterSlide.py inkscape-0.48.4/share/extensions/jessyInk_masterSlide.py
--- inkscape-0.48.4.orig/share/extensions/jessyInk_masterSlide.py 2014-03-06 00:48:27.934148300 +0000
+++ inkscape-0.48.4/share/extensions/jessyInk_masterSlide.py 2014-03-06 00:51:19.415956500 +0000
@@ -15,13 +15,8 @@
# These lines are only needed if you don't put the script directly into
# the installation directory
-import sys
-# Unix
-sys.path.append('/usr/share/inkscape/extensions')
-# OS X
-sys.path.append('/Applications/Inkscape.app/Contents/Resources/extensions')
-# Windows
-sys.path.append('C:\Program Files\Inkscape\share\extensions')
+import sys, os
+sys.path.append(sys.prefix+os.sep+'share'+os.sep+'inkscape'+os.sep+'extensions')
# We will use the inkex module with the predefined Effect base class.
import inkex
diff -urN inkscape-0.48.4.orig/share/extensions/jessyInk_mouseHandler.py inkscape-0.48.4/share/extensions/jessyInk_mouseHandler.py
--- inkscape-0.48.4.orig/share/extensions/jessyInk_mouseHandler.py 2014-03-06 00:48:27.935148400 +0000
+++ inkscape-0.48.4/share/extensions/jessyInk_mouseHandler.py 2014-03-06 00:49:07.875432800 +0000
@@ -18,12 +18,7 @@
# These lines are only needed if you don't put the script directly into
# the installation directory
import sys
-# Unix
-sys.path.append('/usr/share/inkscape/extensions')
-# OS X
-sys.path.append('/Applications/Inkscape.app/Contents/Resources/extensions')
-# Windows
-sys.path.append('C:\Program Files\Inkscape\share\extensions')
+sys.path.append(sys.prefix+os.sep+'share'+os.sep+'inkscape'+os.sep+'extensions')
# We will use the inkex module with the predefined Effect base class.
import inkex
diff -urN inkscape-0.48.4.orig/share/extensions/jessyInk_summary.py inkscape-0.48.4/share/extensions/jessyInk_summary.py
--- inkscape-0.48.4.orig/share/extensions/jessyInk_summary.py 2014-03-06 00:48:27.936148500 +0000
+++ inkscape-0.48.4/share/extensions/jessyInk_summary.py 2014-03-06 00:51:26.417357000 +0000
@@ -15,13 +15,8 @@
# These lines are only needed if you don't put the script directly into
# the installation directory
-import sys
-# Unix
-sys.path.append('/usr/share/inkscape/extensions')
-# OS X
-sys.path.append('/Applications/Inkscape.app/Contents/Resources/extensions')
-# Windows
-sys.path.append('C:\Program Files\Inkscape\share\extensions')
+import sys, os
+sys.path.append(sys.prefix+os.sep+'share'+os.sep+'inkscape'+os.sep+'extensions')
# We will use the inkex module with the predefined Effect base class.
import inkex
diff -urN inkscape-0.48.4.orig/share/extensions/jessyInk_transitions.py inkscape-0.48.4/share/extensions/jessyInk_transitions.py
--- inkscape-0.48.4.orig/share/extensions/jessyInk_transitions.py 2014-03-06 00:48:27.938148600 +0000
+++ inkscape-0.48.4/share/extensions/jessyInk_transitions.py 2014-03-06 00:51:30.778606400 +0000
@@ -15,13 +15,8 @@
# These lines are only needed if you don't put the script directly into
# the installation directory
-import sys
-# Unix
-sys.path.append('/usr/share/inkscape/extensions')
-# OS X
-sys.path.append('/Applications/Inkscape.app/Contents/Resources/extensions')
-# Windows
-sys.path.append('C:\Program Files\Inkscape\share\extensions')
+import sys, os
+sys.path.append(sys.prefix+os.sep+'share'+os.sep+'inkscape'+os.sep+'extensions')
# We will use the inkex module with the predefined Effect base class.
import inkex
diff -urN inkscape-0.48.4.orig/share/extensions/jessyInk_uninstall.py inkscape-0.48.4/share/extensions/jessyInk_uninstall.py
--- inkscape-0.48.4.orig/share/extensions/jessyInk_uninstall.py 2014-03-06 00:48:27.939148600 +0000
+++ inkscape-0.48.4/share/extensions/jessyInk_uninstall.py 2014-03-06 00:51:35.126855100 +0000
@@ -15,13 +15,8 @@
# These lines are only needed if you don't put the script directly into
# the installation directory
-import sys
-# Unix
-sys.path.append('/usr/share/inkscape/extensions')
-# OS X
-sys.path.append('/Applications/Inkscape.app/Contents/Resources/extensions')
-# Windows
-sys.path.append('C:\Program Files\Inkscape\share\extensions')
+import sys, os
+sys.path.append(sys.prefix+os.sep+'share'+os.sep+'inkscape'+os.sep+'extensions')
# We will use the inkex module with the predefined Effect base class.
import inkex
diff -urN inkscape-0.48.4.orig/share/extensions/jessyInk_video.py inkscape-0.48.4/share/extensions/jessyInk_video.py
--- inkscape-0.48.4.orig/share/extensions/jessyInk_video.py 2014-03-06 00:48:27.940148700 +0000
+++ inkscape-0.48.4/share/extensions/jessyInk_video.py 2014-03-06 00:51:38.836067300 +0000
@@ -15,13 +15,8 @@
# These lines are only needed if you don't put the script directly into
# the installation directory
-import sys
-# Unix
-sys.path.append('/usr/share/inkscape/extensions')
-# OS X
-sys.path.append('/Applications/Inkscape.app/Contents/Resources/extensions')
-# Windows
-sys.path.append('C:\Program Files\Inkscape\share\extensions')
+import sys, os
+sys.path.append(sys.prefix+os.sep+'share'+os.sep+'inkscape'+os.sep+'extensions')
# We will use the inkex module with the predefined Effect base class.
import inkex
diff -urN inkscape-0.48.4.orig/share/extensions/jessyInk_view.py inkscape-0.48.4/share/extensions/jessyInk_view.py
--- inkscape-0.48.4.orig/share/extensions/jessyInk_view.py 2014-03-06 00:48:27.941148700 +0000
+++ inkscape-0.48.4/share/extensions/jessyInk_view.py 2014-03-06 00:51:42.436273200 +0000
@@ -15,13 +15,8 @@
# These lines are only needed if you don't put the script directly into
# the installation directory
-import sys
-# Unix
-sys.path.append('/usr/share/inkscape/extensions')
-# OS X
-sys.path.append('/Applications/Inkscape.app/Contents/Resources/extensions')
-# Windows
-sys.path.append('C:\Program Files\Inkscape\share\extensions')
+import sys, os
+sys.path.append(sys.prefix+os.sep+'share'+os.sep+'inkscape'+os.sep+'extensions')
# We will use the inkex module with the predefined Effect base class.
import inkex
diff -urN inkscape-0.48.4.orig/share/extensions/pixelsnap.py inkscape-0.48.4/share/extensions/pixelsnap.py
--- inkscape-0.48.4.orig/share/extensions/pixelsnap.py 2014-03-06 00:48:27.952149400 +0000
+++ inkscape-0.48.4/share/extensions/pixelsnap.py 2014-03-06 00:51:59.986277000 +0000
@@ -60,7 +60,7 @@
from __future__ import division
-import sys
+import sys, os
# *** numpy causes issue #4 on Mac OS 10.6.2. I use it for
# matrix inverse -- my linear algebra's a bit rusty, but I could implement my
# own matrix inverse function if necessary, I guess.
@@ -74,6 +74,7 @@
#sys.path += ['/usr/share/inkscape/extensions'] # If you're using a standard Linux installation
#sys.path += ['/usr/local/share/inkscape/extensions'] # If you're using a custom Linux installation
#sys.path += ['C:\\Program Files\\Inkscape\\share\\extensions'] # If you're using a standard Windows installation
+sys.path.append(sys.prefix+os.sep+'share'+os.sep+'inkscape'+os.sep+'extensions')
try:
import inkex