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
| System | Port | Version |
|---|---|---|
| FreeBSD | devel/py-dpcontracts | 0.6.0_1 |
| DragonFly | devel/py-dpcontracts | 0.6.0_1 |
| MidnightBSD | devel/py-dpcontracts | 0.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.
| Repository | aarch64 | amd64 | armv6 | armv7 | i386 |
|---|---|---|---|---|---|
| FreeBSD:14:latest | 0.6.0_1 | 0.6.0_1 | 0.6.0 | 0.6.0_1 | 0.6.0_1 |
| FreeBSD:14:quarterly | 0.6.0_1 | 0.6.0_1 | n/a | 0.6.0_1 | 0.6.0_1 |
| FreeBSD:15:latest | 0.6.0_1 | 0.6.0_1 | n/a | 0.6.0_1 | 0.6.0_1 |
| FreeBSD:15:quarterly | 0.6.0_1 | 0.6.0_1 | n/a | n/a | n/a |
| FreeBSD:16:latest | 0.6.0_1 | 0.6.0_1 | n/a | n/a | n/a |
| FreeBSD:16:quarterly | n/a | n/a | n/a | n/a | n/a |
Dependencies
As this port's Makefile names them.
Build 2
${PYTHON_PKGNAMEPREFIX}setuptools>=0: devel/py-setuptools${PYTHON_PKGNAMEPREFIX}wheel>=0: devel/py-wheel
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
| File | Size | SHA256 |
|---|---|---|
| dpcontracts-0.6.0.tar.gz | 11156 | 6cf9df1f16beaa48523b798b41170dabf7a536a6133328731665cdb29c42234a |
Master sites 1
- PYPI
Commit history 0
No commits in the history this site was built from.