pkgsrc-WIP-changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

py-djvulibre: Update py-djvulibre to 0.8



Module Name:	pkgsrc-wip
Committed By:	Thomas Klausner <wiz%NetBSD.org@localhost>
Pushed By:	wiz
Date:		Tue Aug 30 18:50:55 2016 +0200
Changeset:	4bc558bd297953e32762615928f7316023670055

Modified Files:
	py-djvulibre/Makefile
	py-djvulibre/PLIST
	py-djvulibre/distinfo
Added Files:
	py-djvulibre/patches/patch-setup.py

Log Message:
py-djvulibre: Update py-djvulibre to 0.8

Adds python-3 support and fixes build.

python-djvulibre (0.8) unstable; urgency=low

  * Fix Windows support. It is now possible to build the package using the
    default compiler, Microsoft Visual C++ Compiler for Python.
    https://github.com/jwilk/python-djvulibre/issues/1
    + Remove support for cross-compiling using MinGW.
  * Fix test failures on non-Linux systems.
  * Improve documentation:
    + Fix doctests' compatibility with Python 3.6.
    + Don't require TeX distribution to render math formulas.
    + Simplify some module docstrings.
    + Fix typos in docstrings.
    + Update bug tracker URLs.
      The project repo has moved to GitHub.
  * Improve the setup script:
    + Check Cython version.
    + Use “python -m cython” instead of the “cython” script.
    + Report build-time requirements to pip.
    + Don't use setuptools, except on Windows.
    + Remove poorly standardized “platforms” metadata key. (The information
      about supported platform is available in the “Operating System”
      classifiers.)
    + Add the “Programming Language :: Cython” classifier.
  * Don't hardcode the Python interpreter path in script shebangs; use
    “#!/usr/bin/env python” instead.

 -- Jakub Wilk <jwilk%jwilk.net@localhost>  Fri, 05 Aug 2016 22:52:25 +0200

python-djvulibre (0.7.2) unstable; urgency=low

  * Fix compatibility with Cython 0.24.
  * Fix typo in the documentation.

 -- Jakub Wilk <jwilk%jwilk.net@localhost>  Thu, 12 May 2016 14:07:13 +0200

python-djvulibre (0.7.1) unstable; urgency=low

  * Update URL for “actual and proposed changes to the DjVu format”.
  * Use HTTPS for sourceforge.net URLs.
  * Fix a few typos in the documentation.
  * Improve the test suite:
    + Normalize whitespace in ps2ascii output.

 -- Jakub Wilk <jwilk%jwilk.net@localhost>  Fri, 11 Mar 2016 22:09:00 +0100

python-djvulibre (0.7) unstable; urgency=low

  * Make Expression.from_string() accept both Unicode and byte strings.
  * Implement __unicode__() for expressions.
  * Implement __float__() for integer expressions.
  * Be more liberal about object types that can be passed to escape_unicode.
  * Fix the long(<intexpr>) return type with Cython 0.23 and Python 2.6.
    https://mail.python.org/pipermail/cython-devel/2015-August/004485.html
  * Improve setup.py:
    + Put files that vary with Python version (*.c, config.pxi) into a
      version-specific temporary directory.
      With this change, it's possible to build against multiple Python
      versions in parallel.
  * Update BibTeX URL in the documentation.
  * Improve the test suite.

 -- Jakub Wilk <jwilk%jwilk.net@localhost>  Tue, 25 Aug 2015 23:46:20 +0200

python-djvulibre (0.6.1) unstable; urgency=low

  * Fix the DjVuLibre version check.
  * Add “const” to variable declarations and function prototypes.
  * Optimize S-expression input/output.
  * Require Cython >= 0.19, or Cython >= 0.20 for Python 3.
    + Remove work-arounds for older versions.
  * Don't pass -Wno-uninitialized to the compiler. (Modern versions of Cython
    don't generate code that would trigger this warning.)
  * Require pkg-config for building on POSIX systems.

 -- Jakub Wilk <jwilk%jwilk.net@localhost>  Fri, 14 Aug 2015 16:22:44 +0200

python-djvulibre (0.6) unstable; urgency=low

  * Fix build failure with Cython 0.23.
  * Document which software if required to build the package.
  * Require DjVuLibre >= 3.5.21:
    + Add version check to the setup script.
    + Remove work-arounds for older versions.
    + Remove documentation warnings about older versions.
  * Remove the DjVuLibreBug class.
  * Improve the test suite.

 -- Jakub Wilk <jwilk%jwilk.net@localhost>  Wed, 12 Aug 2015 19:12:01 +0200

python-djvulibre (0.5) unstable; urgency=low

  * Make print_into() raise exceptions properly instead of just printing them
    on stderr.
  * Make it possible to print S-expressions into file-like objects created by
    codecs.open().
  * Make djvu.sexpr.__version__ a byte string in Python 2.X.
  * Don't include DjVu file format version in djvu.decode.__version__.
    This information is more conveniently available in
    djvu.decode.DDJVU_VERSION.
  * Make S-expression input/output methods reentrant.
    (DjVuLibre >= 3.5.26 is required for this feature.)
  * Improve error handling.
  * Improve the test suite.

 -- Jakub Wilk <jwilk%jwilk.net@localhost>  Sun, 02 Aug 2015 17:45:08 +0200

python-djvulibre (0.4.1) unstable; urgency=low

  * Exclude djvu/config.pxi from the source tarball.
    Thanks to Daniel Stender for the bug report.
    https://github.com/jwilk/python-djvulibre/issues/4

 -- Jakub Wilk <jwilk%jwilk.net@localhost>  Mon, 27 Jul 2015 10:28:21 +0200

python-djvulibre (0.4) unstable; urgency=low

  * Drop support for Python 2.5.
  * Add the lvalue attribute to expressions.
    This is the same as value, except that Lisp lists are mapped to Python
    lists, rather than Python tuples.
  * Use the lvalue in __repr__().
  * Make Symbol objects comparable using “<” and other inequality operators.
  * Make it possible to disable octal-escaping of non-ASCII Unicode characters
    when printing expressions into a file.
  * Stop using sphinx.ext.intersphinx.
    Making it work offline and consistently across different Python versions
    is too much of a hassle, and it was used only to cross-reference one
    well-known exception (IOError).
  * Make djvu.decode.__version__ a byte string in Python 2.X.
  * Improve the test suite.

 -- Jakub Wilk <jwilk%jwilk.net@localhost>  Wed, 22 Jul 2015 21:05:11 +0200

python-djvulibre (0.3.10) unstable; urgency=low

  * Improve error handling in examples.
  * Improve the test suite:
    + When running external programs, don't reset environment completely, but
      only set LC_ALL=C.
    + Skip more tests (instead of making them fail) when they are run in
      an unsuitable environment.
    + Correctly detect ASCII locale encoding on FreeBSD (and possibly other
      non-GNU systems).
    + Don't hard-code libc error messages.
    + Fix test_bad_io failures with Cython ≥ 0.21.
  * Improve setup.py:
    + Make it possible to build the package natively on Windows.
      https://github.com/jwilk/python-djvulibre/issues/1
  * Use HTTPS URLs when they are available, in documentation and code.

 -- Jakub Wilk <jwilk%jwilk.net@localhost>  Tue, 04 Nov 2014 11:44:09 +0100

python-djvulibre (0.3.9) unstable; urgency=low

  * Ensure that all S-expression output is 7-bit.
    This is work-around for <https://bugs.debian.org/664626>.

 -- Jakub Wilk <jwilk%jwilk.net@localhost>  Mon, 19 Mar 2012 20:41:53 +0100

python-djvulibre (0.3.8) unstable; urgency=low

  * Ensure that S-expression input/output functions are always initialized.
    This is work-around for <https://bugs.debian.org/664442>.

 -- Jakub Wilk <jwilk%jwilk.net@localhost>  Sun, 18 Mar 2012 23:44:55 +0100

python-djvulibre (0.3.7) unstable; urgency=low

  * Use floor division operator instead of relying on “classic” division
    semantics.

 -- Jakub Wilk <jwilk%jwilk.net@localhost>  Wed, 14 Mar 2012 08:32:35 +0100

python-djvulibre (0.3.6) unstable; urgency=low

  * Improve test suite:
    + Fix compatibility with Python 3.X (broken in 0.3.5).
    + Test expression parsing again.
    + Capture stderr output for tests which produce unhandled exceptions.
  * Fix compatibility with Python 2.5 (broken since 0.3.0).

 -- Jakub Wilk <jwilk%jwilk.net@localhost>  Tue, 06 Mar 2012 00:14:57 +0100

python-djvulibre (0.3.5) unstable; urgency=low

  * Improve setup.py:
    + Fix error message when pkg-config is not found (a regression introduced
      in 0.3.4).
  * Improve test suite:
    + Verify that LANGUAGE environment variable is unset before running tests
      sensitive to locale settings. Thanks to Daniel Stender for the bug
      report.
    + Skip some tests (instead of making them fail) when they are run in
      an unsuitable environment. Note that it's still recommended to use
      --no-skip when running the test suite.

 -- Jakub Wilk <jwilk%jwilk.net@localhost>  Sat, 18 Feb 2012 21:05:41 +0100

python-djvulibre (0.3.4) unstable; urgency=low

  * Optimize DocumentPages.__len__() and DocumentFiles.__len__().
  * Fix compatibility with Python 3.X (broken in 0.3.3).
  * Update various external documentation URLs.
    https://bugs.debian.org/627290
  * Improve test suite:
    + Normalize whitespace in ps2ascii output.
      https://bugs.debian.org/646177
  * Improve setup.py:
    + Print a more meaningful error message if pkg-config fails.
    + build_sphinx is now available even without setuptools.
    + build_sphinx can now import extension modules from the build directory.

 -- Jakub Wilk <jwilk%jwilk.net@localhost>  Sat, 22 Oct 2011 01:36:38 +0200

python-djvulibre (0.3.3) unstable; urgency=low

  * Improve setup.py:
    + Add “Operating System :: Microsoft :: Windows” to trove classifiers.
  * Add Windows-specific module djvu.dllpath, which is aimed to ease finding
    DjVuLibre DLLs in non-standard locations.
  * Make expression and symbol objects picklable.
  * Add work-around for <https://bugs.debian.org/620859>.
  * Fix test suite compatibility with Python 3.

 -- Jakub Wilk <jwilk%jwilk.net@localhost>  Mon, 04 Apr 2011 21:06:01 +0200

To see a diff of this commit:
https://wip.pkgsrc.org/cgi-bin/gitweb.cgi?p=pkgsrc-wip.git;a=commitdiff;h=4bc558bd297953e32762615928f7316023670055

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

diffstat:
 py-djvulibre/Makefile               | 25 ++++++++++---------------
 py-djvulibre/PLIST                  |  7 ++-----
 py-djvulibre/distinfo               |  8 +++++---
 py-djvulibre/patches/patch-setup.py | 34 ++++++++++++++++++++++++++++++++++
 4 files changed, 51 insertions(+), 23 deletions(-)

diffs:
diff --git a/py-djvulibre/Makefile b/py-djvulibre/Makefile
index a9380d6..90d3359 100644
--- a/py-djvulibre/Makefile
+++ b/py-djvulibre/Makefile
@@ -1,6 +1,6 @@
 # $NetBSD: Makefile,v 1.13 2014/12/31 13:58:32 thomasklausner Exp $
 
-DISTNAME=	python-djvulibre-0.3.3
+DISTNAME=	python-djvulibre-0.8
 PKGNAME=	${PYPKGPREFIX}-${DISTNAME:S/python-//}
 CATEGORIES=	graphics textproc
 MASTER_SITES=	${MASTER_SITE_PYPI:=p/python-djvulibre/}
@@ -10,25 +10,20 @@ HOMEPAGE=	http://jwilk.net/software/python-djvulibre
 COMMENT=	Python bindings for the DjVuLibre library
 LICENSE=	gnu-gpl-v2
 
-DEPENDS+=	${PYPKGPREFIX}-pyrex-[0-9]*:../../lang/py-pyrex
+BUILD_DEPENDS+=	${PYPKGPREFIX}-nose-[0-9]*:../../devel/py-nose
+BUILD_DEPENDS+=	${PYPKGPREFIX}-test-[0-9]*:../../devel/py-test
 
-USE_TOOLS+=	pkg-config #gsed
-#DEPENDS+=	gsed-[0-9]*:../../textproc/gsed
+USE_TOOLS+=	pkg-config
 
 USE_LANGUAGES=	c
 
-PYTHON_VERSIONS_INCOMPATIBLE=	34 35 # py-pyrex
+# used by setup.py and during build
+pre-build:
+	mkdir -p ${BUILDLINK_DIR}/bin
+	ln -s ${PYTHONBIN} ${BUILDLINK_DIR}/bin/python
 
-SUBST_CLASSES+=		setup
-SUBST_STAGE.setup=	pre-configure
-SUBST_FILES.setup=	setup.py
-SUBST_SED.setup=	-e "s,\['cython,\['cython${PYVERSSUFFIX},"
-SUBST_SED.setup+=	-e "s/'sed', '-i~',/'sed', '-n',/"
-
-PLIST_SUBST+=	PYVERSSUFFIX=${PYVERSSUFFIX}
-
-.include "../../lang/python/egg.mk"
-.include "../../lang/python/pyversion.mk"
+.include "../../lang/python/distutils.mk"
+BUILDLINK_API_DEPENDS.py-cython+=	${PYPKGPREFIX}-cython>=0.20
 .include "../../devel/py-cython/buildlink3.mk"
 .include "../../graphics/djvulibre-lib/buildlink3.mk"
 .include "../../mk/jpeg.buildlink3.mk"
diff --git a/py-djvulibre/PLIST b/py-djvulibre/PLIST
index f0ef509..4dc1dd0 100644
--- a/py-djvulibre/PLIST
+++ b/py-djvulibre/PLIST
@@ -1,4 +1,4 @@
-@comment $NetBSD: PLIST,v 1.6 2011/05/07 21:25:41 ryo-on Exp $
+@comment $NetBSD$
 ${PYSITELIB}/djvu/__init__.py
 ${PYSITELIB}/djvu/__init__.pyc
 ${PYSITELIB}/djvu/__init__.pyo
@@ -10,7 +10,4 @@ ${PYSITELIB}/djvu/dllpath.py
 ${PYSITELIB}/djvu/dllpath.pyc
 ${PYSITELIB}/djvu/dllpath.pyo
 ${PYSITELIB}/djvu/sexpr.so
-${PYSITELIB}/${EGG_INFODIR}/PKG-INFO
-${PYSITELIB}/${EGG_INFODIR}/SOURCES.txt
-${PYSITELIB}/${EGG_INFODIR}/dependency_links.txt
-${PYSITELIB}/${EGG_INFODIR}/top_level.txt
+${PYSITELIB}/${EGG_FILE}
diff --git a/py-djvulibre/distinfo b/py-djvulibre/distinfo
index dd18d8d..9f60c15 100644
--- a/py-djvulibre/distinfo
+++ b/py-djvulibre/distinfo
@@ -1,5 +1,7 @@
 $NetBSD: distinfo,v 1.4 2011/04/17 00:53:34 ryo-on Exp $
 
-SHA1 (python-djvulibre-0.3.3.tar.gz) = 449d6c21aa42c257f75335762f01f1dd1bd02ce5
-RMD160 (python-djvulibre-0.3.3.tar.gz) = 6f2a5eb64912e7efddc458ef900c41953afbbeec
-Size (python-djvulibre-0.3.3.tar.gz) = 119209 bytes
+SHA1 (python-djvulibre-0.8.tar.gz) = cad0c4d2710e6631f3a5ba5670c0b2145aea367f
+RMD160 (python-djvulibre-0.8.tar.gz) = b3f2707e8918f3a582aa0a28f5d6ca9b0d552633
+SHA512 (python-djvulibre-0.8.tar.gz) = c817fc518f398bf16664a5f5dc80e8bd086015c13f82c5265548e5ca5d90f293cb2132961ba8a73cb184bc7883bb5868d2d49ecd950d045d0729f876703e710c
+Size (python-djvulibre-0.8.tar.gz) = 85436 bytes
+SHA1 (patch-setup.py) = e64fe7d968b9ad9ceef2607cae008e7bf3270463
diff --git a/py-djvulibre/patches/patch-setup.py b/py-djvulibre/patches/patch-setup.py
new file mode 100644
index 0000000..7880814
--- /dev/null
+++ b/py-djvulibre/patches/patch-setup.py
@@ -0,0 +1,34 @@
+$NetBSD$
+
+Skip (broken-in-pkgsrc) cython detection.
+pkgsrc will supply a sufficient cython.
+
+--- setup.py.orig	2016-08-03 17:57:43.000000000 +0000
++++ setup.py
+@@ -164,7 +164,7 @@ def get_cython_version():
+     return distutils.version.LooseVersion(ver)
+ 
+ py_version = get_version()
+-cython_version = get_cython_version()
++cython_version = "0.20"
+ if str != bytes:
+     # Python 3.X
+     req_cython_version = '0.20'
+@@ -222,8 +222,6 @@ class build_ext(distutils.command.build_
+                 continue
+             distutils.log.info('cythoning {ext.name!r} extension'.format(ext=ext))
+             def build_c(source, target):
+-                if cython_version < req_cython_version:
+-                    raise RuntimeError('Cython >= {ver} is required'.format(ver=req_cython_version))
+                 distutils.spawn.spawn([
+                     'python', '-m', 'cython',
+                     '-I', os.path.dirname(self.config_path),
+@@ -290,7 +288,7 @@ if __name__ == '__main__':
+         # We wouldn't normally want setuptools; but pip forces it upon us anyway,
+         # so let's abuse it to instruct pip to install Cython if it's missing.
+         distutils.core.setup(
+-            install_requires=['Cython>={ver}'.format(ver=req_cython_version)],
++            install_requires=[],
+             # Conceptually, “setup_requires” would make more sense than
+             # “install_requires”, but the former is not supported by pip:
+             # https://github.com/pypa/pip/issues/1820


Home | Main Index | Thread Index | Old Index