Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 3 Feb 2018 09:52:36 +0000 (UTC)
From:      Antoine Brodin <antoine@FreeBSD.org>
To:        ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org
Subject:   svn commit: r460801 - in head: devel/py-olefile textproc/py-pyhwp textproc/py-pyhwp/files
Message-ID:  <201802030952.w139qa36091392@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: antoine
Date: Sat Feb  3 09:52:35 2018
New Revision: 460801
URL: https://svnweb.freebsd.org/changeset/ports/460801

Log:
  - Update py-olefile to 0.45.1
  - Add regression tests
  - Patch py-pyhwp to use olefile instead of legacy and removed OleFileIO_PL

Added:
  head/textproc/py-pyhwp/files/
  head/textproc/py-pyhwp/files/patch-pyhwp_hwp5_plat_olefileio.py   (contents, props changed)
Modified:
  head/devel/py-olefile/Makefile
  head/devel/py-olefile/distinfo
  head/textproc/py-pyhwp/Makefile

Modified: head/devel/py-olefile/Makefile
==============================================================================
--- head/devel/py-olefile/Makefile	Sat Feb  3 09:44:55 2018	(r460800)
+++ head/devel/py-olefile/Makefile	Sat Feb  3 09:52:35 2018	(r460801)
@@ -2,7 +2,7 @@
 # $FreeBSD$
 
 PORTNAME=	olefile
-PORTVERSION=	0.44
+PORTVERSION=	0.45.1
 CATEGORIES=	devel python
 MASTER_SITES=	CHEESESHOP
 PKGNAMEPREFIX=	${PYTHON_PKGNAMEPREFIX}
@@ -12,11 +12,14 @@ COMMENT=	Python module to read MS OLE2 files
 
 LICENSE=	BSD2CLAUSE MIT
 LICENSE_COMB=	multi
-LICENSE_FILE_BSD2CLAUSE=	${WRKSRC}/olefile/LICENSE.txt
-LICENSE_FILE_MIT=	${WRKSRC}/olefile/LICENSE.txt
+LICENSE_FILE=	${WRKSRC}/LICENSE.txt
 
 NO_ARCH=	yes
-USES=		dos2unix python zip
+USES=		python zip
 USE_PYTHON=	distutils autoplist
+TEST_ENV=	${MAKE_ENV} PYTHONPATH=${STAGEDIR}${PYTHONPREFIX_SITELIBDIR}
+
+do-test:
+	@(cd ${TEST_WRKSRC} && ${SETENV} ${TEST_ENV} ${PYTHON_CMD} tests/test_olefile.py)
 
 .include <bsd.port.mk>

Modified: head/devel/py-olefile/distinfo
==============================================================================
--- head/devel/py-olefile/distinfo	Sat Feb  3 09:44:55 2018	(r460800)
+++ head/devel/py-olefile/distinfo	Sat Feb  3 09:52:35 2018	(r460801)
@@ -1,3 +1,3 @@
-TIMESTAMP = 1483899501
-SHA256 (olefile-0.44.zip) = 61f2ca0cd0aa77279eb943c07f607438edf374096b66332fae1ee64a6f0f73ad
-SIZE (olefile-0.44.zip) = 74147
+TIMESTAMP = 1516970331
+SHA256 (olefile-0.45.1.zip) = 2b6575f5290de8ab1086f8c5490591f7e0885af682c7c1793bdaf6e64078d385
+SIZE (olefile-0.45.1.zip) = 112359

Modified: head/textproc/py-pyhwp/Makefile
==============================================================================
--- head/textproc/py-pyhwp/Makefile	Sat Feb  3 09:44:55 2018	(r460800)
+++ head/textproc/py-pyhwp/Makefile	Sat Feb  3 09:52:35 2018	(r460801)
@@ -3,7 +3,7 @@
 
 PORTNAME=	pyhwp
 PORTVERSION=	0.1b8
-PORTREVISION=	2
+PORTREVISION=	3
 CATEGORIES=	textproc python
 MASTER_SITES=	CHEESESHOP
 PKGNAMEPREFIX=	${PYTHON_PKGNAMEPREFIX}

Added: head/textproc/py-pyhwp/files/patch-pyhwp_hwp5_plat_olefileio.py
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/textproc/py-pyhwp/files/patch-pyhwp_hwp5_plat_olefileio.py	Sat Feb  3 09:52:35 2018	(r460801)
@@ -0,0 +1,30 @@
+--- pyhwp/hwp5/plat/olefileio.py.orig	2014-11-03 13:47:24 UTC
++++ pyhwp/hwp5/plat/olefileio.py
+@@ -22,11 +22,10 @@ from hwp5.utils import cached_property
+ 
+ def is_enabled():
+     try:
+-        import OleFileIO_PL
++        import olefile
+     except Exception:
+         return False
+     else:
+-        OleFileIO_PL
+         return True
+ 
+ 
+@@ -62,12 +61,12 @@ class OleStorage(OleStorageItem):
+ 
+     def __init__(self, olefile, path='', parent=None):
+         if not hasattr(olefile, 'openstream'):
+-            from OleFileIO_PL import isOleFile
++            from olefile import isOleFile
+             if not isOleFile(olefile):
+                 from hwp5.errors import InvalidOleStorageError
+                 errormsg = 'Not an OLE2 Compound Binary File.'
+                 raise InvalidOleStorageError(errormsg)
+-            from OleFileIO_PL import OleFileIO
++            from olefile import OleFileIO
+             olefile = OleFileIO(olefile)
+         OleStorageItem.__init__(self, olefile, path, parent)
+ 



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201802030952.w139qa36091392>