aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSunpoet Po-Chuan Hsieh <sunpoet@FreeBSD.org>2020-10-02 13:14:40 +0000
committerSunpoet Po-Chuan Hsieh <sunpoet@FreeBSD.org>2020-10-02 13:14:40 +0000
commitc046f798050358a1194ed4459dac09dd5e5b3996 (patch)
treed47faac70bd68396eca523c2dcaef31f44c571a6
parent42f010068b38d2e251adf82d2c6b43eae0701a2d (diff)
downloadports-c046f798050358a1194ed4459dac09dd5e5b3996.tar.gz
ports-c046f798050358a1194ed4459dac09dd5e5b3996.zip
Notes
-rw-r--r--devel/Makefile1
-rw-r--r--devel/py-dpcontracts/Makefile20
-rw-r--r--devel/py-dpcontracts/distinfo3
-rw-r--r--devel/py-dpcontracts/pkg-descr23
4 files changed, 47 insertions, 0 deletions
diff --git a/devel/Makefile b/devel/Makefile
index fac92c1bcd4e..e4772ddfd186 100644
--- a/devel/Makefile
+++ b/devel/Makefile
@@ -4335,6 +4335,7 @@
SUBDIR += py-dogpile.cache
SUBDIR += py-doit
SUBDIR += py-dotted
+ SUBDIR += py-dpcontracts
SUBDIR += py-dtfabric
SUBDIR += py-durus
SUBDIR += py-dynrules
diff --git a/devel/py-dpcontracts/Makefile b/devel/py-dpcontracts/Makefile
new file mode 100644
index 000000000000..b31395fd02bb
--- /dev/null
+++ b/devel/py-dpcontracts/Makefile
@@ -0,0 +1,20 @@
+# Created by: Po-Chuan Hsieh <sunpoet@FreeBSD.org>
+# $FreeBSD$
+
+PORTNAME= dpcontracts
+PORTVERSION= 0.6.0
+CATEGORIES= devel python
+MASTER_SITES= CHEESESHOP
+PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX}
+
+MAINTAINER= sunpoet@FreeBSD.org
+COMMENT= Simple implementation of contracts for Python
+
+LICENSE= LGPL3+
+
+USES= python:3.5+
+USE_PYTHON= autoplist concurrent distutils
+
+NO_ARCH= yes
+
+.include <bsd.port.mk>
diff --git a/devel/py-dpcontracts/distinfo b/devel/py-dpcontracts/distinfo
new file mode 100644
index 000000000000..6f9ae6715451
--- /dev/null
+++ b/devel/py-dpcontracts/distinfo
@@ -0,0 +1,3 @@
+TIMESTAMP = 1601627925
+SHA256 (dpcontracts-0.6.0.tar.gz) = 6cf9df1f16beaa48523b798b41170dabf7a536a6133328731665cdb29c42234a
+SIZE (dpcontracts-0.6.0.tar.gz) = 11156
diff --git a/devel/py-dpcontracts/pkg-descr b/devel/py-dpcontracts/pkg-descr
new file mode 100644
index 000000000000..e3c0e1951b83
--- /dev/null
+++ b/devel/py-dpcontracts/pkg-descr
@@ -0,0 +1,23 @@
+This module provides a collection of decorators that makes it easy to write
+software using contracts.
+
+Contracts are a debugging and verification tool. They are declarative statements
+about what states a program must be in to be considered "correct" at runtime.
+They are similar to assertions, and are verified automatically at various
+well-defined points in the program. Contracts can be specified on functions and
+on classes.
+
+Contracts serve as a form of documentation and a way of formally specifying
+program behavior. Good practice often includes writing all of the contracts
+first, with these contract specifying the exact expected state before and after
+each function or method call and the things that should always be true for a
+given class of object.
+
+Contracts consist of two parts: a description and a condition. The description
+is simply a human-readable string that describes what the contract is testing,
+while the condition is a single function that tests that condition. The
+condition is executed automatically and passed certain arguments (which vary
+depending on the type of contract), and must return a boolean value: True if the
+condition has been met, and False otherwise.
+
+WWW: https://github.com/deadpixi/contracts