Add py-grouch 0.1, a system for describing and enforcing a Python

object schema.
This commit is contained in:
Johann Visagie 2001-09-06 14:32:27 +00:00
parent ad6b729c66
commit f80bb54c62
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=47474
7 changed files with 121 additions and 0 deletions

View File

@ -448,6 +448,7 @@
SUBDIR += py-coro
SUBDIR += py-functional
SUBDIR += py-game
SUBDIR += py-grouch
SUBDIR += py-htmlkit
SUBDIR += py-kjbuckets
SUBDIR += py-kqueue

42
devel/py-grouch/Makefile Normal file
View File

@ -0,0 +1,42 @@
# New ports collection makefile for: py-grouch
# Date created: 6 September 2001
# Whom: Johann Visagie <wjv@FreeBSD.org>
#
# $FreeBSD$
#
PORTNAME= grouch
PORTVERSION= 0.1
CATEGORIES= devel python
MASTER_SITES= http://www.mems-exchange.org/software/files/${PORTNAME}/
PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX}
DISTNAME= Grouch-${PORTVERSION}
MAINTAINER= wjv@FreeBSD.org
BUILD_DEPENDS= ${PYDISTUTILS}
RUN_DEPENDS= ${PYTHON_SITELIBDIR}/compiler/__init__.py:${PORTSDIR}/lang/py-compiler
USE_PYTHON= yes
EXAMPLESDIR= ${PREFIX}/share/examples/${PORTNAME}
do-build:
@ cd ${WRKSRC} && ${SETENV} ${MAKE_ENV} ${PYTHON_CMD} setup.py build
pre-install:
@ ${SH} ${PKGREQ} INSTALL
do-install:
@ cd ${WRKSRC} && ${SETENV} ${MAKE_ENV} ${PYTHON_CMD} setup.py \
install -c -O1 --prefix=${PREFIX}
post-install:
.if !defined(NOPORTDOCS)
@ ${MKDIR} ${DOCSDIR}
@ ${INSTALL_DATA} ${WRKSRC}/README.txt ${DOCSDIR}
@ ${INSTALL_DATA} ${WRKSRC}/doc/* ${DOCSDIR}
@ ${MKDIR} ${EXAMPLESDIR}
@ ${INSTALL_DATA} ${WRKSRC}/examples/* ${EXAMPLESDIR}
.endif
.include <bsd.port.mk>

1
devel/py-grouch/distinfo Normal file
View File

@ -0,0 +1 @@
MD5 (Grouch-0.1.tar.gz) = ae3778763e3f6d6c529c17c2f4e9bd26

View File

@ -0,0 +1 @@
A system for describing and enforcing a Python object schema

22
devel/py-grouch/pkg-descr Normal file
View File

@ -0,0 +1,22 @@
From the README:
Grouch is a system for describing and enforcing a Python object schema.
That is, it provides you with a language for describing the intended type
signatures of your objects (collectively, the "object schema"), and tools
to walk an object graph, checking that every value found matches your
object schema.
From the PKG-INFO:
An object schema describes every class in a collection of objects -- in
particular, it specifies the type of every instance attribute of every
class. Grouch includes a type language for specifying attribute types, a
tool to parse specially-formatted class docstrings and output a complete
object schema, and another tool for walking a persistent object graph and
ensuring that every scrap of data in it conforms to the object schema
extracted from your class docstrings. The API for defining, querying, and
enforcing types is fairly complete and well-documented, so you can use
Grouch's type system in other ways as well.
Author: Greg Ward <gward@mems-exchange.org>
WWW: http://www.mems-exchange.org/software/grouch/
-- Johann Visagie <wjv@FreeBSD.org>

37
devel/py-grouch/pkg-plist Normal file
View File

@ -0,0 +1,37 @@
%%PORTDOCS%%share/doc/grouch/README.txt
%%PORTDOCS%%share/doc/grouch/checking.txt
%%PORTDOCS%%share/doc/grouch/schema.txt
%%PORTDOCS%%share/doc/grouch/type-system.txt
%%PORTDOCS%%share/examples/grouch/animal.py
%%PORTDOCS%%share/examples/grouch/make_things
%%PORTDOCS%%share/examples/grouch/thing.py
%%PORTDOCS%%share/examples/grouch/things.proj
bin/check_data
bin/gen_schema
lib/%%PYTHON_VERSION%%/site-packages/grouch/__init__.py
lib/%%PYTHON_VERSION%%/site-packages/grouch/__init__.pyc
lib/%%PYTHON_VERSION%%/site-packages/grouch/__init__.pyo
lib/%%PYTHON_VERSION%%/site-packages/grouch/context.py
lib/%%PYTHON_VERSION%%/site-packages/grouch/context.pyc
lib/%%PYTHON_VERSION%%/site-packages/grouch/context.pyo
lib/%%PYTHON_VERSION%%/site-packages/grouch/schema.py
lib/%%PYTHON_VERSION%%/site-packages/grouch/schema.pyc
lib/%%PYTHON_VERSION%%/site-packages/grouch/schema.pyo
lib/%%PYTHON_VERSION%%/site-packages/grouch/script_util.py
lib/%%PYTHON_VERSION%%/site-packages/grouch/script_util.pyc
lib/%%PYTHON_VERSION%%/site-packages/grouch/script_util.pyo
lib/%%PYTHON_VERSION%%/site-packages/grouch/spark.py
lib/%%PYTHON_VERSION%%/site-packages/grouch/spark.pyc
lib/%%PYTHON_VERSION%%/site-packages/grouch/spark.pyo
lib/%%PYTHON_VERSION%%/site-packages/grouch/type_parser.py
lib/%%PYTHON_VERSION%%/site-packages/grouch/type_parser.pyc
lib/%%PYTHON_VERSION%%/site-packages/grouch/type_parser.pyo
lib/%%PYTHON_VERSION%%/site-packages/grouch/util.py
lib/%%PYTHON_VERSION%%/site-packages/grouch/util.pyc
lib/%%PYTHON_VERSION%%/site-packages/grouch/util.pyo
lib/%%PYTHON_VERSION%%/site-packages/grouch/valuetype.py
lib/%%PYTHON_VERSION%%/site-packages/grouch/valuetype.pyc
lib/%%PYTHON_VERSION%%/site-packages/grouch/valuetype.pyo
@dirrm lib/%%PYTHON_VERSION%%/site-packages/grouch
%%PORTDOCS%%@dirrm share/examples/grouch
%%PORTDOCS%%@dirrm share/doc/grouch

17
devel/py-grouch/pkg-req Normal file
View File

@ -0,0 +1,17 @@
#!/bin/sh
PATH=$PATH:/usr/local/bin
if [ "x$1" = "xINSTALL" -o "x$2" = "xINSTALL" ]; then
PYTHON_GT=`python -c 'import string, sys; \
print string.split(sys.version)[0] >= "2.0"'`
if [ "x${PYTHON_GT}" = "x1" ]; then
exit 0
else
echo "-----------------------------------------------------------"
echo "Grouch requires Python version 2.0 or greater - "
echo " please update your Python installation before proceeding."
echo "-----------------------------------------------------------"
exit 1
fi
fi