diff options
author | Pierre-Yves David <pierre-yves.david@logilab.fr> | 2010-03-30 15:51:06 +0200 |
---|---|---|
committer | Pierre-Yves David <pierre-yves.david@logilab.fr> | 2010-03-30 15:51:06 +0200 |
commit | 036ca82abd2f2b69d3d8bbb7dc50e43192653d4b (patch) | |
tree | f20330a15f0c81c5c087f84c949f8ea0d5325e91 | |
parent | 012d593469c184f48754b560027a813eb57dd048 (diff) | |
parent | 5803c897b0561117bd4391c153cd6790012e51e8 (diff) | |
download | logilab-common-036ca82abd2f2b69d3d8bbb7dc50e43192653d4b.tar.gz |
backport stable in default
-rw-r--r-- | dbf.py | 20 | ||||
-rw-r--r-- | debian/control | 1 | ||||
-rwxr-xr-x | debian/rules | 14 | ||||
-rw-r--r-- | doc/makefile | 5 | ||||
-rw-r--r-- | sphinxutils.py | 12 |
5 files changed, 30 insertions, 22 deletions
@@ -1,14 +1,15 @@ # -*- coding: utf-8 -*- -""" -This is a DBF reader which reads Visual Fox Pro DBF format with Memo field. +"""This is a DBF reader which reads Visual Fox Pro DBF format with Memo field Usage: - rec = readDbf('test.dbf') - for line in rec: - print line['name'] -@author Yusdi Santoso -@date 13/07/2007 +>>> rec = readDbf('test.dbf') +>>> for line in rec: +>>> print line['name'] + +:author: Yusdi Santoso +:date: 13/07/2007 + http://www.physics.ox.ac.uk/users/santoso/Software.Repository.html page says code is "available as is without any warranty or support". """ @@ -191,8 +192,9 @@ def readDbf(filename): """ Read the DBF file specified by the filename and return the records as a list of dictionary. - @param filename File name of the DBF - @return List of rows + + :param: filename File name of the DBF + :return: List of rows """ db = Dbase() db.open(filename) diff --git a/debian/control b/debian/control index 796a080..5f5116c 100644 --- a/debian/control +++ b/debian/control @@ -22,7 +22,6 @@ Provides: ${python:Provides} Depends: ${python:Depends}, ${misc:Depends} Recommends: python-egenix-mxdatetime Conflicts: python-constraint ( <= 0.3.0-4), python-logilab-astng ( <= 0.16.0-1), pylint ( << 0.11.0-1), devtools ( <= 0.9.0-1), logilab-doctools ( <= 0.1.6-4), python-logilab-aspects ( <= 0.1.4-2), python2.3-logilab-common, python2.4-logilab-common, cubicweb-server ( << 3.6.0-1) -XB-Python-Version: ${python:Versions} Description: useful miscellaneous modules used by Logilab projects logilab-common is a collection of low-level Python packages and modules, designed to ease: diff --git a/debian/rules b/debian/rules index e1acbe2..e472b70 100755 --- a/debian/rules +++ b/debian/rules @@ -12,6 +12,14 @@ #export DH_VERBOSE=1 PY_VERSION:=$(shell pyversions -vd) +-include /usr/share/python/python.mk +ifeq (,$(py_sitename)) + py_sitename = site-packages + py_libdir = /usr/lib/python$(subst python,,$(1))/site-packages + py_sitename_sh = $(py_sitename) + py_libdir_sh = $(py_libdir) +endif + build: build-stamp build-stamp: dh_testdir @@ -24,13 +32,13 @@ ifeq (,$(findstring nocheck,$(DEB_BUILD_OPTIONS))) # we need this hack because we have to import "logilab.common.pytest" # but since it's a namespace package, we need to "simulate" it touch $(CURDIR)/build/lib/logilab/__init__.py - -PYTHONPATH=$(CURDIR)/build/lib/ $(CURDIR)/build/scripts-$(PY_VERSION)/pytest - rm -f $(CURDIR)/build/lib/logilab/__init__.py + PYTHONPATH=$(CURDIR)/build/lib/ $(CURDIR)/build/scripts-$(PY_VERSION)/pytest endif # build doc $(MAKE) -C doc + rm -f $(CURDIR)/build/lib/logilab/__init__.py touch build-stamp clean: @@ -56,7 +64,7 @@ install: build NO_SETUPTOOLS=1 python setup.py -q install --prefix=/usr --no-compile \ --root=$(CURDIR)/debian/python-logilab-common/ \ - --install-layout=deb + ${py_setup_install_args} # remove test directory rm -rf debian/python-logilab-common/usr/lib/python*/site-packages/logilab/common/test diff --git a/doc/makefile b/doc/makefile index 2484e55..02f5d54 100644 --- a/doc/makefile +++ b/doc/makefile @@ -1,9 +1,8 @@ all: epydoc epydoc: - #epydoc -o apidoc --html -v --graph all --no-private --exclude="__pkginfo__" --exclude="setup" -n "Logilab's common library" ../ - mkdir apidoc - epydoc -o apidoc --html -v --no-private --exclude="__pkginfo__" --exclude="setup" -n "Logilab's common library" $(shell dirname $(CURDIR))/build/lib/logilab/common + mkdir -p apidoc + -epydoc --parse-only -o apidoc --html -v --no-private --exclude='test' --exclude="__pkginfo__" --exclude="setup" -n "Logilab's common library" $(shell dirname $(CURDIR))/build/lib/logilab/common >/dev/null clean: rm -rf apidoc diff --git a/sphinxutils.py b/sphinxutils.py index 3889362..5615943 100644 --- a/sphinxutils.py +++ b/sphinxutils.py @@ -1,12 +1,12 @@ -""" -Sphinx utils: +"""Sphinx utils -* ModuleGenerator: Generate a file that lists all the modules of a list of - packages in order to pull all the docstring. - /!\ This should not be used in a makefile to systematically generate - sphinx documentation! +ModuleGenerator: Generate a file that lists all the modules of a list of +packages in order to pull all the docstring. +This should not be used in a makefile to systematically generate sphinx +documentation! Typical usage: + >>> from logilab.common.sphinxutils import ModuleGenerator >>> mgen = ModuleGenerator('logilab common', '/home/adim/src/logilab/common') >>> mgen.generate('api_logilab_common.rst', exclude_dirs=('test',)) |