Mailinglist Archive: opensuse-commit (1903 mails)

< Previous Next >
commit djvusmooth for openSUSE:Factory
Hello community,

here is the log from the commit of package djvusmooth for openSUSE:Factory
checked in at 2019-04-09 20:18:55
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/djvusmooth (Old)
and /work/SRC/openSUSE:Factory/.djvusmooth.new.3908 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "djvusmooth"

Tue Apr 9 20:18:55 2019 rev:15 rq:692543 version:0.3

Changes:
--------
--- /work/SRC/openSUSE:Factory/djvusmooth/djvusmooth.changes 2017-11-03
16:30:58.146848293 +0100
+++ /work/SRC/openSUSE:Factory/.djvusmooth.new.3908/djvusmooth.changes
2019-04-09 20:18:58.885866600 +0200
@@ -1,0 +2,10 @@
+Tue Apr 9 06:35:19 UTC 2019 - Kyrill Detinov <lazy.kent@xxxxxxxxxxxx>
+
+- Update to 0.3.
+ * Require the subprocess32 module.
+ * Don't let bad editor lock UI.
+ * Reorganize documentation.
+ * Improve error handling.
+ * Improve the setup script.
+
+-------------------------------------------------------------------

Old:
----
djvusmooth-0.2.19.tar.gz
djvusmooth-0.2.19.tar.gz.asc

New:
----
djvusmooth-0.3.tar.gz
djvusmooth-0.3.tar.gz.asc

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ djvusmooth.spec ++++++
--- /var/tmp/diff_new_pack.jytYAL/_old 2019-04-09 20:18:59.677867679 +0200
+++ /var/tmp/diff_new_pack.jytYAL/_new 2019-04-09 20:18:59.685867690 +0200
@@ -1,7 +1,7 @@
#
# spec file for package djvusmooth
#
-# Copyright (c) 2017 SUSE LINUX GmbH, Nuernberg, Germany.
+# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@@ -12,15 +12,15 @@
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.

-# Please submit bugfixes or comments via http://bugs.opensuse.org/
+# Please submit bugfixes or comments via https://bugs.opensuse.org/
#


Name: djvusmooth
-Version: 0.2.19
+Version: 0.3
Release: 0
Summary: Graphical Text Editor for DjVu
-License: GPL-2.0
+License: GPL-2.0-only
Group: Productivity/Publishing/Other
Url: http://jwilk.net/software/djvusmooth
Source0:
https://github.com/jwilk/djvusmooth/releases/download/%{version}/%{name}-%{version}.tar.gz
@@ -29,9 +29,10 @@
Source3: %{name}.keyring
BuildRequires: python-setuptools
Requires: djvulibre
-Requires: python-djvulibre
-Requires: python-wxWidgets
-Requires: python-xdg
+Requires: python-wxWidgets-3_0
+Requires: python2-djvulibre
+Requires: python2-pyxdg
+Requires: python2-subprocess32
Requires(post): desktop-file-utils
Requires(post): hicolor-icon-theme
Requires(postun): desktop-file-utils
@@ -80,6 +81,7 @@

%find_lang %{name}

+%if 0%{?suse_version} && 0%{?suse_version} < 1330
%post
%desktop_database_post
%icon_theme_cache_post
@@ -87,10 +89,12 @@
%postun
%desktop_database_postun
%icon_theme_cache_postun
+%endif

%files
%defattr(-,root,root,-)
-%doc doc/{changelog,COPYING,credits.txt}
+%license doc/COPYING
+%doc doc/{changelog,credits,README}
%{_bindir}/%{name}
%{_datadir}/applications/%{name}.desktop
%{_datadir}/icons/hicolor/*/*/%{name}.png

++++++ djvusmooth-0.2.19.tar.gz -> djvusmooth-0.3.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/djvusmooth-0.2.19/MANIFEST.in
new/djvusmooth-0.3/MANIFEST.in
--- old/djvusmooth-0.2.19/MANIFEST.in 2016-12-23 21:07:35.000000000 +0100
+++ new/djvusmooth-0.3/MANIFEST.in 2018-04-21 13:46:56.000000000 +0200
@@ -1,12 +1,14 @@
include COPYING
+exclude README.rst
include MANIFEST.in
include djvusmooth edit-text
include djvusmooth.py
include doc/*.1
-include doc/*.txt
include doc/*.xml
include doc/COPYING
+include doc/README
include doc/changelog
+include doc/credits
include extra/*
include po/*.po
include private/*
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/djvusmooth-0.2.19/PKG-INFO
new/djvusmooth-0.3/PKG-INFO
--- old/djvusmooth-0.2.19/PKG-INFO 2017-09-16 17:06:16.000000000 +0200
+++ new/djvusmooth-0.3/PKG-INFO 2019-02-15 15:13:01.000000000 +0100
@@ -1,12 +1,12 @@
Metadata-Version: 1.1
Name: djvusmooth
-Version: 0.2.19
+Version: 0.3
Summary: graphical editor for DjVu
Home-page: http://jwilk.net/software/djvusmooth
Author: Jakub Wilk
Author-email: jwilk@xxxxxxxxx
License: GNU GPL 2
-Description: *djvusmooth* is a graphical editor for `DjVu <http://djvu.org>`_
documents.
+Description: *djvusmooth* is a graphical editor for DjVu documents.
Platform: UNKNOWN
Classifier: Development Status :: 4 - Beta
Classifier: Environment :: X11 Applications :: GTK
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/djvusmooth-0.2.19/doc/README
new/djvusmooth-0.3/doc/README
--- old/djvusmooth-0.2.19/doc/README 1970-01-01 01:00:00.000000000 +0100
+++ new/djvusmooth-0.3/doc/README 2019-02-15 00:49:25.000000000 +0100
@@ -0,0 +1,32 @@
+Overview
+========
+
+**djvusmooth** is a graphical editor for DjVu_ documents.
+
+It allows you to:
+
+* edit document metadata,
+* edit document outline (bookmarks),
+* add, remove or edit hyperlinks,
+* correct occasional errors in the hidden text layer.
+
+.. _DjVu:
+ http://djvu.org
+
+Prerequisites
+=============
+
+* Python (2.7 or 2.6)
+* DjVuLibre_ (including command-line tools)
+* python-djvulibre_
+* subprocess32_
+* wxPython (3.0 or 2.8) in Unicode mode
+
+.. _DjVuLibre:
+ http://djvu.sourceforge.net/
+.. _python-djvulibre:
+ https://pypi.org/project/python-djvulibre/
+.. _subprocess32:
+ https://pypi.org/project/subprocess32/
+
+.. vim:ft=rst ts=3 sts=3 sw=3 et
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/djvusmooth-0.2.19/doc/changelog
new/djvusmooth-0.3/doc/changelog
--- old/djvusmooth-0.2.19/doc/changelog 2017-09-16 17:05:53.000000000 +0200
+++ new/djvusmooth-0.3/doc/changelog 2019-02-15 15:12:36.000000000 +0100
@@ -1,3 +1,16 @@
+djvusmooth (0.3) unstable; urgency=low
+
+ * Require the subprocess32 module.
+ https://github.com/jwilk/djvusmooth/issues/23
+ * Don't let bad editor lock UI.
+ https://github.com/jwilk/djvusmooth/issues/20
+ Thanks to Alexander Trufanov for the bug report.
+ * Reorganize documentation.
+ * Improve error handling.
+ * Improve the setup script.
+
+ -- Jakub Wilk <jwilk@xxxxxxxxx> Fri, 15 Feb 2019 15:12:35 +0100
+
djvusmooth (0.2.19) unstable; urgency=low

* Create temporary files in a subdirectory of /tmp.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/djvusmooth-0.2.19/doc/credits
new/djvusmooth-0.3/doc/credits
--- old/djvusmooth-0.2.19/doc/credits 1970-01-01 01:00:00.000000000 +0100
+++ new/djvusmooth-0.3/doc/credits 2018-06-02 17:55:15.000000000 +0200
@@ -0,0 +1,3 @@
+djvusmooth development was supported by the Polish Ministry of Science
+and Higher Education's grant no. N N519 384036 (2009–2012,
+https://bitbucket.org/jsbien/ndt).
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/djvusmooth-0.2.19/doc/credits.txt
new/djvusmooth-0.3/doc/credits.txt
--- old/djvusmooth-0.2.19/doc/credits.txt 2016-11-12 18:37:39.000000000
+0100
+++ new/djvusmooth-0.3/doc/credits.txt 1970-01-01 01:00:00.000000000 +0100
@@ -1,3 +0,0 @@
-Since May 2009 djvusmooth development has been supported by the Polish Ministry
-of Science and Higher Education's grant no. N N519 384036 (2009 - 2012,
-https://bitbucket.org/jsbien/ndt).
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/djvusmooth-0.2.19/doc/djvusmooth.1
new/djvusmooth-0.3/doc/djvusmooth.1
--- old/djvusmooth-0.2.19/doc/djvusmooth.1 2017-09-16 17:06:16.000000000
+0200
+++ new/djvusmooth-0.3/doc/djvusmooth.1 2019-02-15 15:13:01.000000000 +0100
@@ -3,12 +3,12 @@
.\" Title: djvusmooth
.\" Author: Jakub Wilk <jwilk@xxxxxxxxx>
.\" Generator: DocBook XSL Stylesheets v1.79.1 <http://docbook.sf.net/>
-.\" Date: 09/16/2017
+.\" Date: 02/15/2019
.\" Manual: djvusmooth manual
-.\" Source: djvusmooth 0.2.19
+.\" Source: djvusmooth 0.3
.\" Language: English
.\"
-.TH "DJVUSMOOTH" "1" 2017\-09\-16 "djvusmooth 0\&.2\&.19" "djvusmooth manual"
+.TH "DJVUSMOOTH" "1" 2019-02-15 "djvusmooth 0\&.3" "djvusmooth manual"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/djvusmooth-0.2.19/doc/djvusmooth.xml
new/djvusmooth-0.3/doc/djvusmooth.xml
--- old/djvusmooth-0.2.19/doc/djvusmooth.xml 2016-12-23 21:10:19.000000000
+0100
+++ new/djvusmooth-0.3/doc/djvusmooth.xml 1970-01-01 01:00:00.000000000
+0100
@@ -1,113 +0,0 @@
-<?xml version='1.0' encoding='utf-8'?>
-<!DOCTYPE refentry PUBLIC '-//OASIS//DTD DocBook XML V4.5//EN'
'http://www.docbook.org/xml/4.5/docbookx.dtd'
-[
- <!ENTITY p 'djvusmooth'>
- <!ENTITY version '0.2.19'>
-]>
-
-<refentry>
-
-<refentryinfo>
- <title>&p; manual</title>
- <productname>&p;</productname>
- <author>
- <firstname>Jakub</firstname> <surname>Wilk</surname>
- <email>jwilk@xxxxxxxxx</email>
- </author>
-</refentryinfo>
-
-<refmeta>
- <refentrytitle>&p;</refentrytitle>
- <manvolnum>1</manvolnum>
- <refmiscinfo class='version'>&version;</refmiscinfo>
-</refmeta>
-
-<refnamediv>
- <refname>&p;</refname>
- <refpurpose>graphical editor for DjVu</refpurpose>
-</refnamediv>
-
-<refsynopsisdiv>
- <cmdsynopsis>
- <command>&p;</command>
- <arg choice='opt'><replaceable>djvu-file</replaceable></arg>
- </cmdsynopsis>
-</refsynopsisdiv>
-
-<refsection>
- <title>Description</title>
- <para>
- &p; is a graphical editor for DjVu files, which allows one to:
- <itemizedlist>
- <listitem><para>edit document metadata,</para></listitem>
- <listitem><para>edit document outline
(bookmarks),</para></listitem>
- <listitem><para>add, remove or edit hyperlinks,</para></listitem>
- <listitem><para>correct occasional errors in the hidden text
layer.</para></listitem>
- </itemizedlist>
- </para>
-</refsection>
-
-<refsection>
- <title>Environment</title>
- <variablelist>
- <varlistentry>
- <term><filename><varname>XDG_CONFIG_HOME</varname></filename></term>
- <listitem>
- <para>
- Base directory for configuration files. The default is
<filename>$HOME/.config</filename>.
- </para>
- <para>
- See <ulink
-
url='https://specifications.freedesktop.org/basedir-spec/latest/'>XDG Base
Directory
- Specification</ulink> for details.
- </para>
- </listitem>
- </varlistentry>
- </variablelist>
-</refsection>
-
-<refsection>
- <title>Files</title>
- <variablelist>
- <varlistentry>
-
<term><filename><varname>$XDG_CONFIG_HOME</varname>/djvusmooth/djvusmooth.conf</filename></term>
- <listitem>
- <para>&p; configuration file</para>
- </listitem>
- </varlistentry>
- </variablelist>
-</refsection>
-
-<refsection>
- <title>Bugs</title>
- <refsection>
- <title>Portability issues</title>
- <para>
- &p; allows one to create hyperlinks with shadow borders as thin as
1 pixel, as specified by the
- <ulink url='http://djvu.org/docs/DjVu3Spec.djvu'>Lizardtech DjVu
Reference</ulink>.
- However, some DjVu browsers do not accept shadow borders thinner
than 3 pixels.
- </para>
- </refsection>
-
- <refsection>
- <title>Reporting bugs</title>
- <para>
- Please report bugs at:
- <ulink url='https://github.com/jwilk/djvusmooth/issues'/>
- </para>
- </refsection>
-</refsection>
-
-<refsection>
- <title>See also</title>
- <para>
- <citerefentry>
- <refentrytitle>djvu</refentrytitle>
- <manvolnum>1</manvolnum>
- </citerefentry>
- </para>
-</refsection>
-
-</refentry>
-
-<!-- vim:set ts=4 sts=4 sw=4 tw=120 et: -->
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/djvusmooth-0.2.19/doc/manpage.xml
new/djvusmooth-0.3/doc/manpage.xml
--- old/djvusmooth-0.2.19/doc/manpage.xml 1970-01-01 01:00:00.000000000
+0100
+++ new/djvusmooth-0.3/doc/manpage.xml 2019-02-13 20:35:09.000000000 +0100
@@ -0,0 +1,113 @@
+<?xml version='1.0' encoding='utf-8'?>
+<!DOCTYPE refentry PUBLIC '-//OASIS//DTD DocBook XML V4.5//EN'
'http://www.docbook.org/xml/4.5/docbookx.dtd'
+[
+ <!ENTITY p 'djvusmooth'>
+ <!ENTITY version '0.3'>
+]>
+
+<refentry>
+
+<refentryinfo>
+ <title>&p; manual</title>
+ <productname>&p;</productname>
+ <author>
+ <firstname>Jakub</firstname> <surname>Wilk</surname>
+ <email>jwilk@xxxxxxxxx</email>
+ </author>
+</refentryinfo>
+
+<refmeta>
+ <refentrytitle>&p;</refentrytitle>
+ <manvolnum>1</manvolnum>
+ <refmiscinfo class='version'>&version;</refmiscinfo>
+</refmeta>
+
+<refnamediv>
+ <refname>&p;</refname>
+ <refpurpose>graphical editor for DjVu</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+ <cmdsynopsis>
+ <command>&p;</command>
+ <arg choice='opt'><replaceable>djvu-file</replaceable></arg>
+ </cmdsynopsis>
+</refsynopsisdiv>
+
+<refsection>
+ <title>Description</title>
+ <para>
+ &p; is a graphical editor for DjVu files, which allows one to:
+ <itemizedlist>
+ <listitem><para>edit document metadata,</para></listitem>
+ <listitem><para>edit document outline
(bookmarks),</para></listitem>
+ <listitem><para>add, remove or edit hyperlinks,</para></listitem>
+ <listitem><para>correct occasional errors in the hidden text
layer.</para></listitem>
+ </itemizedlist>
+ </para>
+</refsection>
+
+<refsection>
+ <title>Environment</title>
+ <variablelist>
+ <varlistentry>
+ <term><filename><varname>XDG_CONFIG_HOME</varname></filename></term>
+ <listitem>
+ <para>
+ Base directory for configuration files. The default is
<filename>$HOME/.config</filename>.
+ </para>
+ <para>
+ See <ulink
+
url='https://specifications.freedesktop.org/basedir-spec/latest/'>XDG Base
Directory
+ Specification</ulink> for details.
+ </para>
+ </listitem>
+ </varlistentry>
+ </variablelist>
+</refsection>
+
+<refsection>
+ <title>Files</title>
+ <variablelist>
+ <varlistentry>
+
<term><filename><varname>$XDG_CONFIG_HOME</varname>/djvusmooth/djvusmooth.conf</filename></term>
+ <listitem>
+ <para>&p; configuration file</para>
+ </listitem>
+ </varlistentry>
+ </variablelist>
+</refsection>
+
+<refsection>
+ <title>Bugs</title>
+ <refsection>
+ <title>Portability issues</title>
+ <para>
+ &p; allows one to create hyperlinks with shadow borders as thin as
1 pixel, as specified by the
+ <ulink url='http://djvu.org/docs/DjVu3Spec.djvu'>Lizardtech DjVu
Reference</ulink>.
+ However, some DjVu browsers do not accept shadow borders thinner
than 3 pixels.
+ </para>
+ </refsection>
+
+ <refsection>
+ <title>Reporting bugs</title>
+ <para>
+ Please report bugs at:
+ <ulink url='https://github.com/jwilk/djvusmooth/issues'/>
+ </para>
+ </refsection>
+</refsection>
+
+<refsection>
+ <title>See also</title>
+ <para>
+ <citerefentry>
+ <refentrytitle>djvu</refentrytitle>
+ <manvolnum>1</manvolnum>
+ </citerefentry>
+ </para>
+</refsection>
+
+</refentry>
+
+<!-- vim:set ts=4 sts=4 sw=4 tw=120 et: -->
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/djvusmooth-0.2.19/lib/__init__.py
new/djvusmooth-0.3/lib/__init__.py
--- old/djvusmooth-0.2.19/lib/__init__.py 2017-01-15 17:39:27.000000000
+0100
+++ new/djvusmooth-0.3/lib/__init__.py 2019-02-13 20:35:09.000000000 +0100
@@ -5,7 +5,7 @@
if sys.version_info >= (3, 0):
raise RuntimeError('Python 2.X is required')

-__version__ = '0.2.19'
+__version__ = '0.3'
__author__ = 'Jakub Wilk <jwilk@xxxxxxxxx>'

# vim:ts=4 sts=4 sw=4 et
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/djvusmooth-0.2.19/lib/dependencies.py
new/djvusmooth-0.3/lib/dependencies.py
--- old/djvusmooth-0.2.19/lib/dependencies.py 2016-11-12 18:37:39.000000000
+0100
+++ new/djvusmooth-0.3/lib/dependencies.py 2019-02-13 20:31:32.000000000
+0100
@@ -1,6 +1,6 @@
# encoding=UTF-8

-# Copyright © 2008-2015 Jakub Wilk <jwilk@xxxxxxxxx>
+# Copyright © 2008-2019 Jakub Wilk <jwilk@xxxxxxxxx>
#
# This file is part of djvusmooth.
#
@@ -19,15 +19,6 @@

djvulibre_path = None

-def _check_signals():
- # Protect from scanadf and possibly other software that sets SIGCHLD to
- # SIG_IGN.
- # https://bugs.debian.org/596232
- import os
- import signal
- if os.name == 'posix':
- signal.signal(signal.SIGCHLD, signal.SIG_DFL)
-
def _check_djvu():
# On Windows, special measures may be needed to find the DjVuLibre DLL.
global djvulibre_path
@@ -40,14 +31,14 @@
try:
import djvu.decode
except ImportError as exc:
- raise ImportError('{exc}; perhaps python-djvulibre is not
installed'.format(exc=exc))
+ raise ImportError('{exc}; is python-djvulibre
installed?'.format(exc=exc))
del djvu # quieten pyflakes

def _check_wx():
try:
import wxversion
except ImportError as exc:
- raise ImportError('{exc}; perhaps wxPython is not
installed'.format(exc=exc))
+ raise ImportError('{exc}; is wxPython installed?'.format(exc=exc))
for ver in ['2.8-unicode', '3.0']:
try:
wxversion.select(ver, optionsRequired=True)
@@ -58,7 +49,6 @@
else:
raise ImportError('wxPython 3.0 or 2.8 in Unicode mode is required')

-_check_signals()
_check_djvu()
_check_wx()

diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/djvusmooth-0.2.19/lib/djvused.py
new/djvusmooth-0.3/lib/djvused.py
--- old/djvusmooth-0.2.19/lib/djvused.py 2016-11-12 18:37:39.000000000
+0100
+++ new/djvusmooth-0.3/lib/djvused.py 2019-02-13 20:31:35.000000000 +0100
@@ -1,6 +1,6 @@
# encoding=UTF-8

-# Copyright © 2008-2015 Jakub Wilk <jwilk@xxxxxxxxx>
+# Copyright © 2008-2019 Jakub Wilk <jwilk@xxxxxxxxx>
#
# This file is part of djvusmooth.
#
@@ -14,11 +14,12 @@
# more details.

import os.path
-import subprocess
import threading

from djvu.sexpr import Expression, Symbol

+from . import ipc
+
djvused_path = None
if os.name == 'nt':
from . import dependencies
@@ -37,10 +38,10 @@

def _djvused_usability_check():
try:
- djvused = subprocess.Popen(
+ djvused = ipc.Subprocess(
[djvused_path],
- stdout=subprocess.PIPE,
- stderr=subprocess.PIPE
+ stdout=ipc.PIPE,
+ stderr=ipc.PIPE
)
djvused.communicate()
if djvused.returncode == 10:
@@ -150,10 +151,10 @@
if save:
args += '-s',
args += self._file_name,
- djvused = subprocess.Popen(args,
- stdin=subprocess.PIPE,
- stdout=subprocess.PIPE,
- stderr=subprocess.PIPE
+ djvused = ipc.Subprocess(args,
+ stdin=ipc.PIPE,
+ stdout=ipc.PIPE,
+ stderr=ipc.PIPE
)
result = [None]
reader_thread = threading.Thread(
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/djvusmooth-0.2.19/lib/external_editor.py
new/djvusmooth-0.3/lib/external_editor.py
--- old/djvusmooth-0.2.19/lib/external_editor.py 2017-09-15
23:24:39.000000000 +0200
+++ new/djvusmooth-0.3/lib/external_editor.py 2019-02-13 20:31:37.000000000
+0100
@@ -1,6 +1,6 @@
# encoding=UTF-8

-# Copyright © 2008-2017 Jakub Wilk <jwilk@xxxxxxxxx>
+# Copyright © 2008-2019 Jakub Wilk <jwilk@xxxxxxxxx>
#
# This file is part of djvusmooth.
#
@@ -15,9 +15,10 @@

import os.path
import shutil
-import subprocess
import tempfile

+from . import ipc
+
class temporary_file(object):

def __init__(self, name):
@@ -74,10 +75,10 @@

def __call__(self, path):
path = os.path.abspath(path)
- edit = subprocess.Popen(
+ edit = ipc.Subprocess(
['edit', 'text/plain:{path}'.format(path=path)],
- stdin=subprocess.PIPE,
- stdout=subprocess.PIPE,
+ stdin=ipc.PIPE,
+ stdout=ipc.PIPE,
)
edit.stdin.close()
edit.stdout.close()
@@ -91,10 +92,10 @@

def __call__(self, path):
path = os.path.abspath(path)
- edit = subprocess.Popen(
+ edit = ipc.Subprocess(
self._command + [path],
- stdin=subprocess.PIPE,
- stdout=subprocess.PIPE,
+ stdin=ipc.PIPE,
+ stdout=ipc.PIPE,
)
edit.stdin.close()
edit.stdout.close()
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/djvusmooth-0.2.19/lib/gui/main.py
new/djvusmooth-0.3/lib/gui/main.py
--- old/djvusmooth-0.2.19/lib/gui/main.py 2017-09-15 23:24:39.000000000
+0200
+++ new/djvusmooth-0.3/lib/gui/main.py 2019-02-15 00:49:18.000000000 +0100
@@ -1,6 +1,6 @@
# encoding=UTF-8

-# Copyright © 2008-2015 Jakub Wilk <jwilk@xxxxxxxxx>
+# Copyright © 2008-2019 Jakub Wilk <jwilk@xxxxxxxxx>
# Copyright © 2009 Mateusz Turcza <mturcza@xxxxxxxxxxxx>
#
# This file is part of djvusmooth.
@@ -22,7 +22,7 @@
import threading
from Queue import Queue, Empty as QueueEmpty

-import djvusmooth.dependencies as __dependencies
+import djvusmooth.dependencies

import wx
import wx.lib.ogl
@@ -810,7 +810,8 @@
pass
else:
exception = None
- wx.CallAfter(lambda: self.after_external_edit_outline(new_repr,
disabler, exception))
+ wx.CallAfter(self.after_external_edit_outline, new_repr, disabler,
exception)
+ disabler = exception = None
disabler = wx.WindowDisabler()
thread = threading.Thread(target=job, args=(disabler,))
thread.start()
@@ -849,7 +850,8 @@
pass
else:
exception = None
- wx.CallAfter(lambda: self.after_external_edit_text(new_sexpr,
disabler, exception))
+ wx.CallAfter(self.after_external_edit_text, new_sexpr, disabler,
exception)
+ disabler = exception = None
disabler = wx.WindowDisabler()
thread = threading.Thread(target=job, args=(disabler,))
thread.start()
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/djvusmooth-0.2.19/lib/ipc.py
new/djvusmooth-0.3/lib/ipc.py
--- old/djvusmooth-0.2.19/lib/ipc.py 1970-01-01 01:00:00.000000000 +0100
+++ new/djvusmooth-0.3/lib/ipc.py 2019-02-15 00:49:25.000000000 +0100
@@ -0,0 +1,37 @@
+# encoding=UTF-8
+
+# Copyright © 2010-2019 Jakub Wilk <jwilk@xxxxxxxxx>
+#
+# This file is part of djvusmooth.
+#
+# djvusmooth is free software; you can redistribute it and/or modify it
+# under the terms of the GNU General Public License version 2 as published
+# by the Free Software Foundation.
+#
+# djvusmooth is distributed in the hope that it will be useful, but WITHOUT
+# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+# more details.
+
+'''interprocess communication'''
+
+import os
+import signal
+
+if os.name == 'posix':
+ import subprocess32 as subprocess
+else:
+ import subprocess
+
+Subprocess = subprocess.Popen
+PIPE = subprocess.PIPE
+
+# Protect from scanadf and possibly other software that sets SIGCHLD to
+# SIG_IGN.
+# https://bugs.debian.org/596232
+if os.name == 'posix':
+ signal.signal(signal.SIGCHLD, signal.SIG_DFL)
+
+__all__ = ['Subprocess', 'PIPE']
+
+# vim:ts=4 sts=4 sw=4 et
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/djvusmooth-0.2.19/lib/pkgconfig.py
new/djvusmooth-0.3/lib/pkgconfig.py
--- old/djvusmooth-0.2.19/lib/pkgconfig.py 2016-11-12 18:37:39.000000000
+0100
+++ new/djvusmooth-0.3/lib/pkgconfig.py 2019-02-13 20:31:46.000000000 +0100
@@ -1,6 +1,6 @@
# encoding=UTF-8

-# Copyright © 2008-2009 Jakub Wilk <jwilk@xxxxxxxxx>
+# Copyright © 2008-2019 Jakub Wilk <jwilk@xxxxxxxxx>
#
# This file is part of djvusmooth.
#
@@ -13,7 +13,7 @@
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
# more details.

-import subprocess
+from . import ipc

class IOError(IOError):
pass
@@ -24,10 +24,10 @@
self._name = name

def variable(self, variable_name):
- pkgconfig = subprocess.Popen(
+ pkgconfig = ipc.Subprocess(
['pkg-config', '--variable=' + str(variable_name), self._name],
- stdout=subprocess.PIPE,
- stderr=subprocess.PIPE
+ stdout=ipc.PIPE,
+ stderr=ipc.PIPE
)
stdout, stderr = pkgconfig.communicate()
if pkgconfig.returncode:
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/djvusmooth-0.2.19/lib/varietes.py
new/djvusmooth-0.3/lib/varietes.py
--- old/djvusmooth-0.2.19/lib/varietes.py 2017-09-15 23:28:58.000000000
+0200
+++ new/djvusmooth-0.3/lib/varietes.py 2019-02-15 15:12:26.000000000 +0100
@@ -1,6 +1,6 @@
# encoding=UTF-8

-# Copyright © 2008-2015 Jakub Wilk <jwilk@xxxxxxxxx>
+# Copyright © 2008-2018 Jakub Wilk <jwilk@xxxxxxxxx>
#
# This file is part of djvusmooth.
#
@@ -110,12 +110,12 @@

def fix_uri(s):
r'''
- >>> uri = 'http://eggs.spam/'
+ >>> uri = 'http://example.com/'
>>> fix_uri(uri) == uri
True
- >>> uri = fix_uri('http://eggs.spam/eggs and spam/')
+ >>> uri = fix_uri('http://example.com/eggs and spam/')
>>> uri
- 'http://eggs.spam/eggs%20and%20spam/'
+ 'http://example.com/eggs%20and%20spam/'
>>> fix_uri(uri) == uri
True
'''
Binary files old/djvusmooth-0.2.19/locale/es/LC_MESSAGES/djvusmooth.mo and
new/djvusmooth-0.3/locale/es/LC_MESSAGES/djvusmooth.mo differ
Binary files old/djvusmooth-0.2.19/locale/pl/LC_MESSAGES/djvusmooth.mo and
new/djvusmooth-0.3/locale/pl/LC_MESSAGES/djvusmooth.mo differ
Binary files old/djvusmooth-0.2.19/locale/ru/LC_MESSAGES/djvusmooth.mo and
new/djvusmooth-0.3/locale/ru/LC_MESSAGES/djvusmooth.mo differ
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/djvusmooth-0.2.19/po/es.po
new/djvusmooth-0.3/po/es.po
--- old/djvusmooth-0.2.19/po/es.po 2016-12-23 21:10:19.000000000 +0100
+++ new/djvusmooth-0.3/po/es.po 2019-02-13 20:35:09.000000000 +0100
@@ -3,7 +3,7 @@
# This file is distributed under the same license as the djvusmooth package.
msgid ""
msgstr ""
-"Project-Id-Version: djvusmooth 0.2.19\n"
+"Project-Id-Version: djvusmooth 0.3\n"
"Report-Msgid-Bugs-To: Jakub Wilk <jwilk@xxxxxxxxx>\n"
"POT-Creation-Date: 2015-09-15 10:51+0200\n"
"PO-Revision-Date: 2012-05-21 00:20-0500\n"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/djvusmooth-0.2.19/po/pl.po
new/djvusmooth-0.3/po/pl.po
--- old/djvusmooth-0.2.19/po/pl.po 2016-12-23 21:10:19.000000000 +0100
+++ new/djvusmooth-0.3/po/pl.po 2019-02-13 20:35:09.000000000 +0100
@@ -3,7 +3,7 @@
# This file is distributed under the same license as the djvusmooth package.
msgid ""
msgstr ""
-"Project-Id-Version: djvusmooth 0.2.19\n"
+"Project-Id-Version: djvusmooth 0.3\n"
"Report-Msgid-Bugs-To: Jakub Wilk <jwilk@xxxxxxxxx>\n"
"POT-Creation-Date: 2015-09-15 10:51+0200\n"
"PO-Revision-Date: 2012-10-09 20:41+0200\n"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/djvusmooth-0.2.19/po/ru.po
new/djvusmooth-0.3/po/ru.po
--- old/djvusmooth-0.2.19/po/ru.po 2016-12-23 21:10:19.000000000 +0100
+++ new/djvusmooth-0.3/po/ru.po 2019-02-13 20:35:09.000000000 +0100
@@ -6,7 +6,7 @@
#
msgid ""
msgstr ""
-"Project-Id-Version: djvusmooth 0.2.19\n"
+"Project-Id-Version: djvusmooth 0.3\n"
"Report-Msgid-Bugs-To: Jakub Wilk <jwilk@xxxxxxxxx>\n"
"POT-Creation-Date: 2015-09-15 10:51+0200\n"
"PO-Revision-Date: 2013-02-21 18:33+0300\n"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/djvusmooth-0.2.19/private/check-rst
new/djvusmooth-0.3/private/check-rst
--- old/djvusmooth-0.2.19/private/check-rst 1970-01-01 01:00:00.000000000
+0100
+++ new/djvusmooth-0.3/private/check-rst 2018-06-15 22:24:11.000000000
+0200
@@ -0,0 +1,34 @@
+#!/bin/sh
+
+# Copyright © 2016-2018 Jakub Wilk <jwilk@xxxxxxxxx>
+#
+# This file is part of djvusmooth.
+#
+# ocrodjvu is free software; you can redistribute it and/or modify it
+# under the terms of the GNU General Public License version 2 as
+# published by the Free Software Foundation.
+#
+# ocrodjvu is distributed in the hope that it will be useful, but WITHOUT
+# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+# for more details.
+
+set -e -u
+here=${0%/*}
+here=${here#./}
+root="$here/../"
+root=${root#private/../}
+rst2xml=$(command -v rst2xml) \
+|| rst2xml=$(command -v rst2xml.py) \
+|| { printf 'rst2xml not found\n' >&2; exit 1; }
+rst2xml=${rst2xml##*/}
+options='--input-encoding=UTF-8 --strict'
+if [ $# -eq 0 ]
+then
+ grep -rwl 'ft=rst' "${root}doc"
+else
+ printf '%s\n' "$@"
+fi |
+xargs -L1 -t -I{} "$rst2xml" $options {} /dev/null
+
+# vim:ts=4 sts=4 sw=4 et
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/djvusmooth-0.2.19/private/update-version
new/djvusmooth-0.3/private/update-version
--- old/djvusmooth-0.2.19/private/update-version 2017-06-17
17:53:18.000000000 +0200
+++ new/djvusmooth-0.3/private/update-version 2018-07-24 12:29:07.000000000
+0200
@@ -1,8 +1,8 @@
#!/bin/sh
-version=${1:?"no version number provided"}
+export version=${1:?"no version number provided"}
set -e
set -x
dch -m -v "$version" -u low -c doc/changelog
-sed -i -E -e "s/^(__version__) = '[0-9.]+'$/\1 = '$version'/" lib/__init__.py
-sed -i -E -e "s/<(!ENTITY version) '[0-9.]+'>/<\1 '$version'>/" doc/*.xml
-sed -i -E -e "s/^(\"Project-Id-Version: djvusmooth) ([0-9.]+)/\1 $version/"
po/*.po po/*.pot
+perl -pi -e 's/^__version__ = \047\K[0-9.]+/$ENV{version}/' lib/__init__.py
+perl -pi -e 's/<!ENTITY version \047\K[0-9.]+/$ENV{version}/' doc/*.xml
+perl -pi -e 's/^"Project-Id-Version: \S+ \K[0-9.]+/$ENV{version}/' po/*.po
po/*.pot
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/djvusmooth-0.2.19/setup.py
new/djvusmooth-0.3/setup.py
--- old/djvusmooth-0.2.19/setup.py 2017-04-19 20:24:06.000000000 +0200
+++ new/djvusmooth-0.3/setup.py 2018-12-11 18:43:30.000000000 +0100
@@ -1,6 +1,6 @@
# encoding=UTF-8

-# Copyright © 2008-2015 Jakub Wilk <jwilk@xxxxxxxxx>
+# Copyright © 2008-2018 Jakub Wilk <jwilk@xxxxxxxxx>
#
# This file is part of djvusmooth.
#
@@ -14,13 +14,10 @@
# more details.

'''
-*djvusmooth* is a graphical editor for `DjVu <http://djvu.org>`_ documents.
+*djvusmooth* is a graphical editor for DjVu documents.
'''

-from __future__ import with_statement
-# Let's keep this __future__ import here, even though Python 2.5 is no longer
-# supported, so that people running setup.py against the unsupported version
-# get a nice error message instead of SyntaxError.
+exec b'' # Python 2.6 or 2.7 is required

import glob
import os
@@ -39,15 +36,18 @@
else:
distutils644.install()

-from lib import __version__
-
data_files = []

if os.name == 'posix':
data_files += [
- (os.path.join('share', 'applications'), ['extra/djvusmooth.desktop'])
+ ('share/applications', ['extra/djvusmooth.desktop'])
]

+def get_version():
+ with open('doc/changelog', 'r') as file:
+ line = file.readline()
+ return line.split()[1].strip('()')
+
class build_mo(distutils_build):

description = 'build binary message catalogs'
@@ -55,7 +55,7 @@
def run(self):
if os.name != 'posix':
return
- for poname in glob.iglob(os.path.join('po', '*.po')):
+ for poname in glob.iglob('po/*.po'):
lang, _ = os.path.splitext(os.path.basename(poname))
modir = os.path.join('locale', lang, 'LC_MESSAGES')
if not os.path.isdir(modir):
@@ -70,7 +70,7 @@
description = 'perform some checks on message catalogs'

def run(self):
- for poname in glob.iglob(os.path.join('po', '*.po')):
+ for poname in glob.iglob('po/*.po'):
checkname = poname + '.sdist-check'
with open(checkname, 'w'):
pass
@@ -111,7 +111,7 @@
)
# Use RFC 3339 date format:
contents = self._date_regex.sub(
- lambda m: r'{year}\-{month}\-{day}'.format(**m.groupdict()),
+ lambda m: '{year}-{month}-{day}'.format(**m.groupdict()),
contents
)
file.seek(0)
@@ -121,19 +121,19 @@
def run(self):
if os.name != 'posix':
return
- for xmlname in glob.iglob(os.path.join('doc', '*.xml')):
- manname = os.path.splitext(xmlname)[0] + '.1'
- command = [
- 'xsltproc', '--nonet',
- '--param', 'man.authors.section.enabled', '0',
- '--param', 'man.charmap.use.subset', '0',
- '--param', 'man.font.links', '"I"',
- '--output', 'doc/',
-
'http://docbook.sourceforge.net/release/xsl/current/manpages/docbook.xsl',
- xmlname,
- ]
- self.make_file([xmlname], manname, self.build_man, [manname,
command])
- data_files.append(('share/man/man1', [manname]))
+ xmlname = 'doc/manpage.xml'
+ manname = 'doc/djvusmooth.1'
+ command = [
+ 'xsltproc', '--nonet',
+ '--param', 'man.authors.section.enabled', '0',
+ '--param', 'man.charmap.use.subset', '0',
+ '--param', 'man.font.links', '"I"',
+ '--output', 'doc/',
+
'http://docbook.sourceforge.net/release/xsl/current/manpages/docbook.xsl',
+ xmlname,
+ ]
+ self.make_file([xmlname], manname, self.build_man, [manname, command])
+ data_files.append(('share/man/man1', [manname]))

distutils_build.sub_commands[:0] = [
('build_doc', None),
@@ -146,7 +146,7 @@
distutils_clean.run(self)
if not self.all:
return
- for manname in glob.iglob(os.path.join('doc', '*.1')):
+ for manname in glob.iglob('doc/*.1'):
with open(manname, 'r') as file:
stamp = file.readline()
if stamp != sdist.manpage_stamp:
@@ -178,7 +178,7 @@

def make_release_tree(self, base_dir, files):
distutils_sdist.make_release_tree(self, base_dir, files)
- for manname in glob.iglob(os.path.join(base_dir, 'doc', '*.1')):
+ for manname in glob.iglob(os.path.join(base_dir, 'doc/*.1')):
self.execute(self._rewrite_manpage, [manname], 'rewriting
{0}'.format(manname))
self._maybe_move_file(base_dir, 'COPYING', 'doc/COPYING')

@@ -198,7 +198,7 @@

distutils.core.setup(
name='djvusmooth',
- version=__version__,
+ version=get_version(),
license='GNU GPL 2',
description='graphical editor for DjVu',
long_description=__doc__.strip(),



< Previous Next >
This Thread
  • No further messages