Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 20 Mar 2020 14:43:18 +0000 (UTC)
From:      Diane Bruce <db@FreeBSD.org>
To:        ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org
Subject:   svn commit: r528779 - in head/devel: . py-autoprop
Message-ID:  <202003201443.02KEhIL8017035@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: db
Date: Fri Mar 20 14:43:17 2020
New Revision: 528779
URL: https://svnweb.freebsd.org/changeset/ports/528779

Log:
  Properties are a feature in python that allow accessor functions (i.e. getters
  and setters) to masquerade as regular attributes. This makes it possible to
  provide transparent APIs for classes that need to cache results, lazily load
  data, maintain invariants, or react in any other way to attribute access.
  
  Unfortunately, making a property requires an annoying amount of boilerplate
  code. There are a few ways to do it, but the most common and most succinct
  requires you to decorate two functions (with two different decorators) and
  to type the name of the attribute three times:
  
  WWW: https://pypi.org/project/autoprop/

Added:
  head/devel/py-autoprop/
  head/devel/py-autoprop/Makefile   (contents, props changed)
  head/devel/py-autoprop/distinfo   (contents, props changed)
  head/devel/py-autoprop/pkg-descr   (contents, props changed)
Modified:
  head/devel/Makefile

Modified: head/devel/Makefile
==============================================================================
--- head/devel/Makefile	Fri Mar 20 13:39:50 2020	(r528778)
+++ head/devel/Makefile	Fri Mar 20 14:43:17 2020	(r528779)
@@ -4067,6 +4067,7 @@
     SUBDIR += py-attrs
     SUBDIR += py-autoflake
     SUBDIR += py-automaton
+    SUBDIR += py-autoprop
     SUBDIR += py-avro
     SUBDIR += py-aws-sam-translator
     SUBDIR += py-aws-xray-sdk

Added: head/devel/py-autoprop/Makefile
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/devel/py-autoprop/Makefile	Fri Mar 20 14:43:17 2020	(r528779)
@@ -0,0 +1,19 @@
+# $FreeBSD$
+
+PORTNAME=	autoprop
+PORTVERSION=	1.0.1
+CATEGORIES=	devel python
+MASTER_SITES=	CHEESESHOP
+PKGNAMEPREFIX=	${PYTHON_PKGNAMEPREFIX}
+
+MAINTAINER=	db@FreeBSD.org
+COMMENT=	Library for loading and using triangular meshes
+
+LICENSE=	MIT
+LICENSE_FILE=	${WRKSRC}/LICENSE.txt
+
+USES=		python:3.5+
+
+USE_PYTHON=	distutils autoplist
+
+.include <bsd.port.mk>

Added: head/devel/py-autoprop/distinfo
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/devel/py-autoprop/distinfo	Fri Mar 20 14:43:17 2020	(r528779)
@@ -0,0 +1,3 @@
+TIMESTAMP = 1584714989
+SHA256 (autoprop-1.0.1.tar.gz) = 012b74405dc02c7527366d351bb85397b8964446b601c956594e4eae405837da
+SIZE (autoprop-1.0.1.tar.gz) = 14685

Added: head/devel/py-autoprop/pkg-descr
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/devel/py-autoprop/pkg-descr	Fri Mar 20 14:43:17 2020	(r528779)
@@ -0,0 +1,11 @@
+Properties are a feature in python that allow accessor functions (i.e. getters
+and setters) to masquerade as regular attributes. This makes it possible to
+provide transparent APIs for classes that need to cache results, lazily load
+data, maintain invariants, or react in any other way to attribute access.
+
+Unfortunately, making a property requires an annoying amount of boilerplate
+code. There are a few ways to do it, but the most common and most succinct
+requires you to decorate two functions (with two different decorators) and
+to type the name of the attribute three times:
+
+WWW: https://pypi.org/project/autoprop/



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