Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 22 Apr 2013 19:24:40 GMT
From:      Antoine Brodin <antoine@freebsd.org>
To:        FreeBSD-gnats-submit@freebsd.org
Cc:        Nicola Vitale <nivit@freebsd.org>
Subject:   ports/178059: [patch] 2 fixes for devel/py-dateutil
Message-ID:  <201304221924.r3MJOehw009832@newdump.dreadbsd.org>
Resent-Message-ID: <201304221930.r3MJU0QR096785@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

>Number:         178059
>Category:       ports
>Synopsis:       [patch] 2 fixes for devel/py-dateutil
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Mon Apr 22 19:30:00 UTC 2013
>Closed-Date:
>Last-Modified:
>Originator:     Antoine Brodin
>Release:        FreeBSD 9.1-RELEASE amd64
>Organization:
none
>Environment:
System: FreeBSD everglades 9.1-RELEASE FreeBSD 9.1-RELEASE #0 r243825: Tue Dec 4 09:23:10 UTC 2012 root@farrell.cse.buffalo.edu:/usr/obj/usr/src/sys/GENERIC amd64


>Description:
devel/py-dateutil has 2 problems:
1) it installs zoneinfo--latest.tar.gz with wrong permissions
2) it tries to load winreg on python2 instead or _winreg which causes problem if there is already a module called winreg (this is possible on python2, I am porting something that does this)

>How-To-Repeat:
For 1), run regression tests as non-root after installation -> some tests will fail
For 2), with python2,  touch winreg.py ,  then  python -m dateutil.parser -> this will fail

>Fix:


--- py-dateutil.diff begins here ---
Index: devel/py-dateutil/Makefile
===================================================================
--- devel/py-dateutil/Makefile	(revision 316256)
+++ devel/py-dateutil/Makefile	(working copy)
@@ -3,7 +3,7 @@
 
 PORTNAME=	dateutil
 PORTVERSION=	2.1
-PORTREVISION=	1
+PORTREVISION=	2
 CATEGORIES=	devel python
 MASTER_SITES=	CHEESESHOP
 PKGNAMEPREFIX=	${PYTHON_PKGNAMEPREFIX}
@@ -23,7 +23,8 @@
 
 # Fix incorrect permissions
 post-patch:
-	@${FIND} ${WRKSRC}/python_dateutil.egg-info -type f -exec ${CHMOD} ${SHAREMODE} {} ";"
+	@${FIND} ${WRKSRC} -type f -exec ${CHMOD} ${SHAREMODE} {} ";"
+	@${REINPLACE_CMD} -e 's|import winreg|from six.moves import winreg|' ${WRKSRC}/dateutil/tzwin.py
 
 regression-test: build
 	@cd ${WRKSRC} && ${PYTHON_CMD} test.py
--- py-dateutil.diff ends here ---


>Release-Note:
>Audit-Trail:
>Unformatted:



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