BSD Ports

devel/py-dpcontracts 0.6.0_1 FreeBSD

Simple implementation of contracts for Python

System
FreeBSD
Repository
FreeBSD ports
Maintainer
[email protected]
License
LGPL3+
Categories
devel, python
Package size
13.7 KiB, 90.4 KiB installed

Description

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.

In the other systems

SystemPortVersion
FreeBSDdevel/py-dpcontracts0.6.0_1
DragonFlydevel/py-dpcontracts0.6.0_1
MidnightBSDdevel/py-dpcontracts0.6.0_1

Install

Binary package:

pkg install py312-dpcontracts

From the ports tree:

cd /usr/ports/devel/py-dpcontracts/ && make install clean

To depend on this port in another port's Makefile:

RUN_DEPENDS=	py312-dpcontracts>0:devel/py-dpcontracts

Packages

The version each package repository carries. “-” means the repository builds no package of it, “n/a” that there is no such repository.

Repositoryaarch64amd64armv6armv7i386
FreeBSD:14:latest0.6.0_10.6.0_10.6.00.6.0_10.6.0_1
FreeBSD:14:quarterly0.6.0_10.6.0_1n/a0.6.0_10.6.0_1
FreeBSD:15:latest0.6.0_10.6.0_1n/a0.6.0_10.6.0_1
FreeBSD:15:quarterly0.6.0_10.6.0_1n/an/an/a
FreeBSD:16:latest0.6.0_10.6.0_1n/an/an/a
FreeBSD:16:quarterlyn/an/an/an/an/a

Dependencies

As this port's Makefile names them.

Build 2

The full lists below include those, and their dependencies in turn.

Build dependencies 16
Run dependencies 7

Configuration

No options to configure.

USES
python
Service scripts
none

Files

distinfo 1
FileSizeSHA256
dpcontracts-0.6.0.tar.gz111566cf9df1f16beaa48523b798b41170dabf7a536a6133328731665cdb29c42234a
Master sites 1
  • PYPI

Commit history 0

No commits in the history this site was built from.