summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorScore_Under2019-01-10 14:54:38 +0000
committerScore_Under2019-01-10 14:54:47 +0000
commitbfb5253cb6f464ba37ab48e6c84f2408549d9267 (patch)
treed70889d1023181b91eca05745cac07af5bbf07d4
parent2cbe0c183e9f39f09dbfb098d28c1eea5cd5316a (diff)
downloadaur-bfb5253cb6f464ba37ab48e6c84f2408549d9267.tar.gz
Update for Hydrus 335 (Python 3 support!!)
-rw-r--r--.SRCINFO42
-rw-r--r--PKGBUILD22
-rw-r--r--hydrus-client2
-rw-r--r--hydrus-server2
-rw-r--r--paths-in-opt.patch59
5 files changed, 76 insertions, 51 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 886a4295f4b..3325285d65e 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,29 +1,29 @@
# Generated by mksrcinfo v8
-# Fri Dec 14 11:38:11 UTC 2018
+# Thu Jan 10 14:48:17 UTC 2019
pkgbase = hydrus
pkgdesc = Danbooru-like image tagging and searching system for the desktop
- pkgver = 334
- pkgrel = 2
+ pkgver = 335
+ pkgrel = 1
url = http://hydrusnetwork.github.io/hydrus/
install = hydrus.install
arch = any
license = WTFPL
makedepends = git
- depends = python2
- depends = opencv-with-python2-support
- depends = python2-beautifulsoup4
- depends = python2-yaml
- depends = python2-lz4>=0.10.1
- depends = python2-numpy
- depends = python2-twisted
- depends = python2-pillow
- depends = python2-pysocks
- depends = python2-psutil
- depends = python2-send2trash
- depends = python2-html5lib
- depends = python2-requests
+ depends = python
+ depends = opencv
+ depends = python-beautifulsoup4
+ depends = python-yaml
+ depends = python-lz4>=0.10.1
+ depends = python-numpy
+ depends = python-twisted
+ depends = python-pillow
+ depends = python-pysocks
+ depends = python-psutil
+ depends = python-send2trash
+ depends = python-html5lib
+ depends = python-requests
depends = hdf5
- depends = python2-wxpython-phoenix
+ depends = python-wxpython>=4.0.0
depends = gtkglext
optdepends = ffmpeg: show duration and other information on video thumbnails
optdepends = miniupnpc: automatic port forwarding
@@ -31,15 +31,15 @@ pkgbase = hydrus
conflicts = hydrus-docs
conflicts = hydrus-sources
options = !strip
- source = hydrus::git+https://github.com/hydrusnetwork/hydrus.git#commit=4bb6c317040819c87bf6085f74620441587ef2d1
+ source = hydrus::git+https://github.com/hydrusnetwork/hydrus.git#commit=4a52a5586a6e290b78c5bad2954f3bf2499e3c2b
source = paths-in-opt.patch
source = hydrus-client
source = hydrus-server
source = hydrus.desktop
sha256sums = SKIP
- sha256sums = 520fdc156dfb8c4a8c9a0c8c05e51807266809cddeca27a5b73049b2355c3a40
- sha256sums = b2bf66b1068969e9598742d5c128cb04fd609512b0cff0ad5e25ecb6cdd35678
- sha256sums = 5fd3eb69bb5f9a0b88d7c1b25abdee42aa2b2fc5e1690635f60ed1f47848c46b
+ sha256sums = 5c3be57fc5f612ff4bbe569b277caf4ec9faa75cb17dec4bc4be435bb7a7c933
+ sha256sums = d2cb826ce0dd1892ab95fc3b14dbe6bd312210f653d0aea31938eeb7e361fdc5
+ sha256sums = 463841cc16059b516cc327cfbc30d3383e2236b085ba2d503e82f5be39444806
sha256sums = 9b8c2603a8040ae80152ff9a718ad3e8803fdc3029a939e3c0e932ea35ded923
pkgname = hydrus
diff --git a/PKGBUILD b/PKGBUILD
index e99938d5798..b8c62440277 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -4,31 +4,31 @@ DOC_DIRS=(opt/hydrus/help)
pkgbase=hydrus
pkgname=(hydrus)
-pkgver=334
-pkgrel=2
+pkgver=335
+pkgrel=1
pkgdesc="Danbooru-like image tagging and searching system for the desktop"
arch=(any)
license=(WTFPL)
install=hydrus.install
conflicts=(hydrus-docs hydrus-sources)
url=http://hydrusnetwork.github.io/hydrus/
-depends=(python2 opencv-with-python2-support python2-beautifulsoup4 python2-yaml
- 'python2-lz4>=0.10.1' python2-numpy python2-twisted python2-pillow
- python2-pysocks python2-psutil python2-send2trash python2-html5lib
- python2-requests hdf5 python2-wxpython-phoenix gtkglext)
+depends=(python opencv python-beautifulsoup4 python-yaml
+ 'python-lz4>=0.10.1' python-numpy python-twisted python-pillow
+ python-pysocks python-psutil python-send2trash python-html5lib
+ python-requests hdf5 'python-wxpython>=4.0.0' gtkglext)
makedepends=(git)
optdepends=('ffmpeg: show duration and other information on video thumbnails'
'miniupnpc: automatic port forwarding'
'desktop-file-utils: to add Hydrus to your desktop environment menus')
-source=("${pkgbase}::git+https://github.com/hydrusnetwork/${pkgbase}.git#commit=4bb6c317040819c87bf6085f74620441587ef2d1"
+source=("${pkgbase}::git+https://github.com/hydrusnetwork/${pkgbase}.git#commit=4a52a5586a6e290b78c5bad2954f3bf2499e3c2b"
paths-in-opt.patch
hydrus-client
hydrus-server
hydrus.desktop)
sha256sums=('SKIP'
- '520fdc156dfb8c4a8c9a0c8c05e51807266809cddeca27a5b73049b2355c3a40'
- 'b2bf66b1068969e9598742d5c128cb04fd609512b0cff0ad5e25ecb6cdd35678'
- '5fd3eb69bb5f9a0b88d7c1b25abdee42aa2b2fc5e1690635f60ed1f47848c46b'
+ '5c3be57fc5f612ff4bbe569b277caf4ec9faa75cb17dec4bc4be435bb7a7c933'
+ 'd2cb826ce0dd1892ab95fc3b14dbe6bd312210f653d0aea31938eeb7e361fdc5'
+ '463841cc16059b516cc327cfbc30d3383e2236b085ba2d503e82f5be39444806'
'9b8c2603a8040ae80152ff9a718ad3e8803fdc3029a939e3c0e932ea35ded923')
prepare() {
@@ -50,7 +50,7 @@ build() {
cd "$pkgbase"
msg 'Compiling .py files...'
- python2 -OO -m compileall -fq .
+ python -OO -m compileall -fq .
}
package_hydrus() {
diff --git a/hydrus-client b/hydrus-client
index 003a2adc0b5..16b14ba225f 100644
--- a/hydrus-client
+++ b/hydrus-client
@@ -1,2 +1,2 @@
#!/bin/sh
-exec python2 -OO /opt/hydrus/client.pyw "$@"
+exec python -OO /opt/hydrus/client.pyw "$@"
diff --git a/hydrus-server b/hydrus-server
index d63352936aa..ea3cd3fce25 100644
--- a/hydrus-server
+++ b/hydrus-server
@@ -1,2 +1,2 @@
#!/bin/sh
-exec python2 -OO /opt/hydrus/server.py "$@"
+exec python -OO /opt/hydrus/server.py "$@"
diff --git a/paths-in-opt.patch b/paths-in-opt.patch
index 36c05a15724..d0ed5692ff8 100644
--- a/paths-in-opt.patch
+++ b/paths-in-opt.patch
@@ -1,53 +1,78 @@
diff --git a/include/ClientGUI.py b/include/ClientGUI.py
-index 92828e0..297bd0e 100755
+index 1d39c4f..e506341 100755
--- a/include/ClientGUI.py
+++ b/include/ClientGUI.py
-@@ -476,7 +476,7 @@ class FrameGUI( ClientGUITopLevelWindows.FrameThatResizes ):
+@@ -397,7 +397,7 @@ class FrameGUI( ClientGUITopLevelWindows.FrameThatResizes ):
python_executable = python_executable.replace( 'pythonw', 'python' )
- server_script_path = os.path.join( HC.BASE_DIR, 'server.py' )
+ server_script_path = '/opt/hydrus/server.py'
- cmd = '"' + python_executable + '" "' + server_script_path + '" ' + db_param
+ cmd = [ python_executable, server_script_path, db_param ]
diff --git a/include/HydrusConstants.py b/include/HydrusConstants.py
-index bb0a939..8e690e1 100755
+index 7b45015..47fc32c 100755
--- a/include/HydrusConstants.py
+++ b/include/HydrusConstants.py
-@@ -3,30 +3,15 @@ import sys
+@@ -2,30 +2,9 @@ import os
+ import sys
# dirs
++RUNNING_FROM_FROZEN_BUILD = False
--BASE_DIR = sys.path[0]
--
--if BASE_DIR == '':
+-if getattr( sys, 'frozen', False ):
-
-- BASE_DIR = os.getcwdu()
+- RUNNING_FROM_FROZEN_BUILD = True
-
--else:
+- # we are in a pyinstaller frozen app
+-
+- BASE_DIR = getattr( sys, '_MEIPASS', None )
-
-- try:
+- if BASE_DIR is None:
-
-- BASE_DIR = BASE_DIR.decode( 'utf-8' )
+- raise Exception( 'It seems this hydrus is running from a frozen bundle, but there was no _MEIPASS variable under sys to define the bundle directory.' )
-
-- except:
+-
+-else:
+-
+- RUNNING_FROM_FROZEN_BUILD = False
+-
+- BASE_DIR = sys.path[0]
+-
+- if BASE_DIR == '':
-
-- pass
+- BASE_DIR = os.getcwd()
-
--
++BASE_DIR = os.path.expanduser("~/.local/share/hydrus")
+
+ PLATFORM_WINDOWS = False
+ PLATFORM_OSX = False
+@@ -38,23 +17,16 @@ elif sys.platform == 'linux': PLATFORM_LINUX = True
+ RUNNING_FROM_SOURCE = sys.argv[0].endswith( '.py' ) or sys.argv[0].endswith( '.pyw' )
+ RUNNING_FROM_OSX_APP = os.path.exists( os.path.join( BASE_DIR, 'running_from_app' ) )
+
-BIN_DIR = os.path.join( BASE_DIR, 'bin' )
-HELP_DIR = os.path.join( BASE_DIR, 'help' )
-INCLUDE_DIR = os.path.join( BASE_DIR, 'include' )
-STATIC_DIR = os.path.join( BASE_DIR, 'static' )
-+BASE_DIR = os.path.expanduser("~/.local/share/hydrus")
-+
+BIN_DIR = "/opt/hydrus/bin"
+HELP_DIR = "/opt/hydrus/help"
+INCLUDE_DIR = "/opt/hydrus/include"
+STATIC_DIR = "/opt/hydrus/static"
DEFAULT_DB_DIR = os.path.join( BASE_DIR, 'db' )
+
+-if PLATFORM_OSX:
+-
+- USERPATH_DB_DIR = os.path.join( os.path.expanduser( '~' ), 'Library', 'Hydrus' )
+-
+-else:
+-
+- USERPATH_DB_DIR = os.path.join( os.path.expanduser( '~' ), 'Hydrus' )
+-
++USERPATH_DB_DIR = DEFAULT_DB_DIR
+
-LICENSE_PATH = os.path.join( BASE_DIR, 'license.txt' )
+LICENSE_PATH = "/usr/share/licenses/hydrus/license.txt"