From antoine@newdump.dreadbsd.org  Mon Apr 22 19:25:11 2013
Return-Path: <antoine@newdump.dreadbsd.org>
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1])
	by hub.freebsd.org (Postfix) with ESMTP id 08AB5B70;
	Mon, 22 Apr 2013 19:25:11 +0000 (UTC)
	(envelope-from antoine@newdump.dreadbsd.org)
Received: from newdump.dreadbsd.org (unknown [IPv6:2a01:e0b:1:64:240:63ff:fee8:7c0b])
	by mx1.freebsd.org (Postfix) with ESMTP id A41331FD5;
	Mon, 22 Apr 2013 19:25:10 +0000 (UTC)
Received: from newdump.dreadbsd.org (localhost [127.0.0.1])
	by newdump.dreadbsd.org (8.14.5/8.14.5) with ESMTP id r3MJOj4K009833;
	Mon, 22 Apr 2013 21:24:45 +0200 (CEST)
	(envelope-from antoine@newdump.dreadbsd.org)
Received: (from antoine@localhost)
	by newdump.dreadbsd.org (8.14.5/8.14.5/Submit) id r3MJOehw009832;
	Mon, 22 Apr 2013 19:24:40 GMT
	(envelope-from antoine)
Message-Id: <201304221924.r3MJOehw009832@newdump.dreadbsd.org>
Date: Mon, 22 Apr 2013 19:24:40 GMT
From: Antoine Brodin <antoine@freebsd.org>
Reply-To: Antoine Brodin <antoine@freebsd.org>
To: FreeBSD-gnats-submit@freebsd.org
Cc: Nicola Vitale <nivit@freebsd.org>
Subject: [patch] 2 fixes for devel/py-dateutil
X-Send-Pr-Version: 3.113
X-GNATS-Notify:

>Number:         178059
>Category:       ports
>Synopsis:       [patch] 2 fixes for devel/py-dateutil
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    nivit
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Mon Apr 22 19:30:00 UTC 2013
>Closed-Date:    Mon May 06 16:59:00 UTC 2013
>Last-Modified:  Mon May  6 17:00:00 UTC 2013
>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:
Responsible-Changed-From-To: freebsd-ports-bugs->nivit 
Responsible-Changed-By: edwin 
Responsible-Changed-When: Mon Apr 22 19:30:08 UTC 2013 
Responsible-Changed-Why:  
Over to maintainer (via the GNATS Auto Assign Tool) 

http://www.freebsd.org/cgi/query-pr.cgi?pr=178059 
State-Changed-From-To: open->closed 
State-Changed-By: antoine 
State-Changed-When: Mon May 6 16:58:32 UTC 2013 
State-Changed-Why:  
Patch committed. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=178059 

From: dfilter@FreeBSD.ORG (dfilter service)
To: bug-followup@FreeBSD.org
Cc:  
Subject: Re: ports/178059: commit references a PR
Date: Mon,  6 May 2013 16:57:28 +0000 (UTC)

 Author: antoine
 Date: Mon May  6 16:57:13 2013
 New Revision: 317532
 URL: http://svnweb.freebsd.org/changeset/ports/317532
 
 Log:
   Install zoneinfo--latest.tar.gz with good permissions
   Try to import the right module (_winreg not winreg) when using python2
   
   PR:		ports/178059
   Approved by:	maintainer timeout (2 weeks), eadler (mentor)
 
 Modified:
   head/devel/py-dateutil/Makefile
 
 Modified: head/devel/py-dateutil/Makefile
 ==============================================================================
 --- head/devel/py-dateutil/Makefile	Mon May  6 16:29:48 2013	(r317531)
 +++ head/devel/py-dateutil/Makefile	Mon May  6 16:57:13 2013	(r317532)
 @@ -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 @@ PYDISTUTILS_PKGNAME=	python-dateutil
  
  # 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
 _______________________________________________
 svn-ports-all@freebsd.org mailing list
 http://lists.freebsd.org/mailman/listinfo/svn-ports-all
 To unsubscribe, send any mail to "svn-ports-all-unsubscribe@freebsd.org"
 
>Unformatted:
