pkgsrc-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[pkgsrc/trunk]: pkgsrc/sysutils/dupeguru dupeguru: fix build with sphinx-1.7.1
details: https://anonhg.NetBSD.org/pkgsrc/rev/aa2395627d64
branches: trunk
changeset: 377328:aa2395627d64
user: wiz <wiz%pkgsrc.org@localhost>
date: Wed Mar 14 17:11:26 2018 +0000
description:
dupeguru: fix build with sphinx-1.7.1
Bump PKGREVISION.
diffstat:
sysutils/dupeguru/Makefile | 5 +-
sysutils/dupeguru/PLIST | 3 +-
sysutils/dupeguru/distinfo | 3 +-
sysutils/dupeguru/patches/patch-hscommon_sphinxgen.py | 50 +++++++++++++++++++
4 files changed, 57 insertions(+), 4 deletions(-)
diffs (106 lines):
diff -r 684e44c15a5a -r aa2395627d64 sysutils/dupeguru/Makefile
--- a/sysutils/dupeguru/Makefile Wed Mar 14 16:41:34 2018 +0000
+++ b/sysutils/dupeguru/Makefile Wed Mar 14 17:11:26 2018 +0000
@@ -1,8 +1,8 @@
-# $NetBSD: Makefile,v 1.4 2018/02/16 12:43:52 wiz Exp $
+# $NetBSD: Makefile,v 1.5 2018/03/14 17:11:26 wiz Exp $
DISTNAME= dupeguru-src-4.0.3
PKGNAME= ${DISTNAME:S/-src//}
-PKGREVISION= 1
+PKGREVISION= 2
CATEGORIES= sysutils
MASTER_SITES= https://download.hardcoded.net/
@@ -44,6 +44,7 @@
${LN} -s ${DESTDIR}${PREFIX}/share/dupeguru/run.py ${DESTDIR}${PREFIX}/bin/dupeguru
${INSTALL_DATA} ${WRKSRC}/build/dupeguru-arch/dupeguru.desktop ${DESTDIR}${PREFIX}/share/applications
${RM} -f ${DESTDIR}${PREFIX}/share/dupeguru/qt/platform.py.orig
+ ${RM} -f ${DESTDIR}${PREFIX}/share/dupeguru/hscommon/sphinxgen.py.orig
.include "../../lang/python/application.mk"
.include "../../lang/python/extension.mk"
diff -r 684e44c15a5a -r aa2395627d64 sysutils/dupeguru/PLIST
--- a/sysutils/dupeguru/PLIST Wed Mar 14 16:41:34 2018 +0000
+++ b/sysutils/dupeguru/PLIST Wed Mar 14 17:11:26 2018 +0000
@@ -1,4 +1,4 @@
-@comment $NetBSD: PLIST,v 1.2 2018/02/16 12:43:52 wiz Exp $
+@comment $NetBSD: PLIST,v 1.3 2018/03/14 17:11:26 wiz Exp $
bin/dupeguru
share/applications/dupeguru.desktop
share/dupeguru/core/__init__.py
@@ -181,6 +181,7 @@
share/dupeguru/help/_static/comment-close.png
share/dupeguru/help/_static/comment.png
share/dupeguru/help/_static/doctools.js
+share/dupeguru/help/_static/documentation_options.js
share/dupeguru/help/_static/down-pressed.png
share/dupeguru/help/_static/down.png
share/dupeguru/help/_static/file.png
diff -r 684e44c15a5a -r aa2395627d64 sysutils/dupeguru/distinfo
--- a/sysutils/dupeguru/distinfo Wed Mar 14 16:41:34 2018 +0000
+++ b/sysutils/dupeguru/distinfo Wed Mar 14 17:11:26 2018 +0000
@@ -1,7 +1,8 @@
-$NetBSD: distinfo,v 1.1 2017/09/26 11:22:39 wiz Exp $
+$NetBSD: distinfo,v 1.2 2018/03/14 17:11:26 wiz Exp $
SHA1 (dupeguru-src-4.0.3.tar.gz) = a794780e187a36d45c384395e9bd8c2b8f5018bf
RMD160 (dupeguru-src-4.0.3.tar.gz) = 5cd2b7f93276fcd8f09b699cfec5246f7dc5abed
SHA512 (dupeguru-src-4.0.3.tar.gz) = dc8a5a122ad1d3d235825a498fb75b192566d3b5a33382ebb0002a361428af5cc453b143002ea3f57a9cb6ee30ce49f0b9f5a54bce2a90364fb1b92e102a289a
Size (dupeguru-src-4.0.3.tar.gz) = 686580 bytes
+SHA1 (patch-hscommon_sphinxgen.py) = cd558d14733d394e7adf2b6b0c826dda5eed689f
SHA1 (patch-qt_platform.py) = e97e226b53f57f8c4e9bf21f4726e024bb0b2d67
diff -r 684e44c15a5a -r aa2395627d64 sysutils/dupeguru/patches/patch-hscommon_sphinxgen.py
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/sysutils/dupeguru/patches/patch-hscommon_sphinxgen.py Wed Mar 14 17:11:26 2018 +0000
@@ -0,0 +1,50 @@
+$NetBSD: patch-hscommon_sphinxgen.py,v 1.1 2018/03/14 17:11:26 wiz Exp $
+
+Fix build with sphinx-1.7.1.
+https://github.com/hsoft/hscommon/commit/17a12618074ccb1e2e66df566c55c621dd8503a7
+
+--- hscommon/sphinxgen.py.orig 2016-08-17 02:02:50.000000000 +0000
++++ hscommon/sphinxgen.py
+@@ -9,7 +9,8 @@
+ import os.path as op
+ import re
+
+-from pkg_resources import load_entry_point
++from distutils.version import LooseVersion
++from pkg_resources import load_entry_point, get_distribution
+
+ from .build import read_changelog_file, filereplace
+
+@@ -60,14 +61,21 @@ def gen(basepath, destpath, changelogpat
+ filereplace(changelogtmpl, changelog_out, changelog='\n'.join(rendered_logs))
+ conf_out = op.join(basepath, 'conf.py')
+ filereplace(confpath, conf_out, **confrepl)
+- # We used to call sphinx-build with print_and_do(), but the problem was that the virtualenv
+- # of the calling python wasn't correctly considered and caused problems with documentation
+- # relying on autodoc (which tries to import the module to auto-document, but fail because of
+- # missing dependencies which are in the virtualenv). Here, we do exactly what is done when
+- # calling the command from bash.
+- cmd = load_entry_point('Sphinx', 'console_scripts', 'sphinx-build')
+- try:
+- cmd(['sphinx-build', basepath, destpath])
+- except SystemExit:
+- print("Sphinx called sys.exit(), but we're cancelling it because we don't actually want to exit")
+-
++ if LooseVersion(get_distribution("sphinx").version) >= LooseVersion("1.7.0"):
++ from sphinx.cmd.build import build_main as sphinx_build
++ # Call the sphinx_build function, which is the same as doing sphinx-build from cli
++ try:
++ sphinx_build([basepath, destpath])
++ except SystemExit:
++ print("Sphinx called sys.exit(), but we're cancelling it because we don't actually want to exit")
++ else:
++ # We used to call sphinx-build with print_and_do(), but the problem was that the virtualenv
++ # of the calling python wasn't correctly considered and caused problems with documentation
++ # relying on autodoc (which tries to import the module to auto-document, but fail because of
++ # missing dependencies which are in the virtualenv). Here, we do exactly what is done when
++ # calling the command from bash.
++ cmd = load_entry_point('Sphinx', 'console_scripts', 'sphinx-build')
++ try:
++ cmd(['sphinx-build', basepath, destpath])
++ except SystemExit:
++ print("Sphinx called sys.exit(), but we're cancelling it because we don't actually want to exit")
Home |
Main Index |
Thread Index |
Old Index