ports/113968: New port: devel/py-decorator (Better living through Python with decorators)

Denis Shaposhnikov dsh at vlink.ru
Sat Jun 23 13:10:04 UTC 2007


>Number:         113968
>Category:       ports
>Synopsis:       New port: devel/py-decorator (Better living through Python with decorators)
>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:   Sat Jun 23 13:10:03 GMT 2007
>Closed-Date:
>Last-Modified:
>Originator:     Denis Shaposhnikov
>Release:        FreeBSD 7.0-CURRENT i386
>Organization:
>Environment:
System: FreeBSD localhost.my.domain 7.0-CURRENT FreeBSD 7.0-CURRENT #4: Sun Mar 18 15:18:43 MSK 2007 dsh at localhost.my.domain:/var/FreeBSD/obj/var/FreeBSD/src/sys/MYNERIC i386


	
>Description:

As of now, writing custom decorators correctly requires some
experience and it is not as easy as it could be. For instance, typical
implementations of decorators involve nested functions, and we all
know that flat is better than nested. Moreover, typical
implementations of decorators do not preserve the signature of
decorated functions, thus confusing both documentation tools and
developers.

The aim of the decorator module it to simplify the usage of decorators
for the average programmer, and to popularize decorators usage giving
examples of useful decorators, such as memoize, tracing,
redirecting_stdout, locked, etc.

WWW: http://www.phyast.pitt.edu/~micheles/python/documentation.html
	
>How-To-Repeat:
	
>Fix:

# This is a shell archive.  Save it in a file, remove anything before
# this line, and then unpack it by entering "sh file".  Note, it may
# create directories; files and directories will be owned by you and
# have default permissions.
#
# This archive contains:
#
#	py-decorator
#	py-decorator/Makefile
#	py-decorator/distinfo
#	py-decorator/pkg-descr
#	py-decorator/pkg-plist
#
echo c - py-decorator
mkdir -p py-decorator > /dev/null 2>&1
echo x - py-decorator/Makefile
sed 's/^X//' >py-decorator/Makefile << 'END-of-py-decorator/Makefile'
X# New ports collection makefile for:	py-decorator
X# Date created:		Thu Jun 21 14:49:52 MSD 2007
X# Whom:			Denis Shaposhnikov <dsh at vlink.ru>
X#
X# $FreeBSD$
X#
X
XPORTNAME=	decorator
XPORTVERSION=	2.0.1
XCATEGORIES=	devel python
XMASTER_SITES=	http://www.phyast.pitt.edu/~micheles/python/ \
X		http://pylonshq.com/download/0.9.5/
XPKGNAMEPREFIX=	${PYTHON_PKGNAMEPREFIX}
X
XMAINTAINER=	dsh at vlink.ru
XCOMMENT=	Better living through Python with decorators
X
XBUILD_DEPENDS=	${EASY_INSTALL_CMD}:${PORTSDIR}/devel/py-setuptools
XRUN_DEPENDS=	${BUILD_DEPENDS}
X
XUSE_PYTHON=	yes
XUSE_PYDISTUTILS=	yes
XUSE_ZIP=	yes
X
XEXTRACT_AFTER_ARGS=	-d ${WRKSRC}
X
XPYDECORATOR_EGG=	${PORTNAME}-${PORTVERSION}-py${PYTHON_VER}.egg
X
XPLIST_SUB=	EASY_INSTALL_CMD=${EASY_INSTALL_CMD} \
X		PYDECORATOR_EGG=${PYDECORATOR_EGG}
X
XEASY_INSTALL_CMD?=	easy_install-${PYTHON_VER}
X
XDOCSDIR=	${TARGETDIR}/share/doc/py-${PORTNAME}
XPORTDOCS=	documentation.*
X
Xpost-install:
X.if !defined(NOPORTDOCS)
X	${MKDIR} ${DOCSDIR}
X	${INSTALL_MAN} ${WRKSRC}/${PORTDOCS} ${DOCSDIR}
X.endif
X
X.include <bsd.port.mk>
END-of-py-decorator/Makefile
echo x - py-decorator/distinfo
sed 's/^X//' >py-decorator/distinfo << 'END-of-py-decorator/distinfo'
XMD5 (decorator-2.0.1.zip) = 28b89b159d03d7479a7dd588be1ef1a2
XSHA256 (decorator-2.0.1.zip) = ab098c3bd6505dad0b33089c3cd08e0f543c0dc194a86f7776d01e31cced7ff7
XSIZE (decorator-2.0.1.zip) = 127506
END-of-py-decorator/distinfo
echo x - py-decorator/pkg-descr
sed 's/^X//' >py-decorator/pkg-descr << 'END-of-py-decorator/pkg-descr'
XAs of now, writing custom decorators correctly requires some
Xexperience and it is not as easy as it could be. For instance, typical
Ximplementations of decorators involve nested functions, and we all
Xknow that flat is better than nested. Moreover, typical
Ximplementations of decorators do not preserve the signature of
Xdecorated functions, thus confusing both documentation tools and
Xdevelopers.
X
XThe aim of the decorator module it to simplify the usage of decorators
Xfor the average programmer, and to popularize decorators usage giving
Xexamples of useful decorators, such as memoize, tracing,
Xredirecting_stdout, locked, etc.
X
XWWW: http://www.phyast.pitt.edu/~micheles/python/documentation.html
END-of-py-decorator/pkg-descr
echo x - py-decorator/pkg-plist
sed 's/^X//' >py-decorator/pkg-plist << 'END-of-py-decorator/pkg-plist'
X at unexec %%EASY_INSTALL_CMD%% -N -m -q %D/%%PYTHON_SITELIBDIR%%/%%PYDECORATOR_EGG%%
X%%PYTHON_SITELIBDIR%%/%%PYDECORATOR_EGG%%
X at exec %%EASY_INSTALL_CMD%% -N -q %D/%%PYTHON_SITELIBDIR%%/%%PYDECORATOR_EGG%%
END-of-py-decorator/pkg-plist
exit

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



More information about the freebsd-ports-bugs mailing list