summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSylvain Th?nault <sylvain.thenault@logilab.fr>2011-08-05 14:17:28 +0200
committerSylvain Th?nault <sylvain.thenault@logilab.fr>2011-08-05 14:17:28 +0200
commit5f2c08c97de6e3dbb820222115f45f24b765ef40 (patch)
treee4ca4ddb062940b8fc3385c736b94aea3452ba4e
parent5a1ec6261c1ffe38e7c34462003e873c5c6a9a02 (diff)
parentd73feb22417d529b36618c87bf7f176c02e6967d (diff)
downloadlogilab-common-5f2c08c97de6e3dbb820222115f45f24b765ef40.tar.gz
default is stable
-rw-r--r--ChangeLog5
-rw-r--r--README.Python325
-rw-r--r--__pkginfo__.py2
-rw-r--r--clcommands.py1
-rwxr-xr-xdebian.py3k/rules60
-rw-r--r--debian.py3k/source/format1
-rw-r--r--debian.sid/control (renamed from debian.py3k/control)32
-rwxr-xr-xdebian.sid/rules76
-rw-r--r--debian/changelog6
9 files changed, 131 insertions, 77 deletions
diff --git a/ChangeLog b/ChangeLog
index db96195..c96163c 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,6 +1,11 @@
ChangeLog for logilab.common
============================
+2011-08-05 -- 0.56.1
+ * clcommands: #72450 --rc-file option doesn't work
+
+
+
2011-06-09 -- 0.56.0
* clcommands: make registration possible by class decoration
diff --git a/README.Python3 b/README.Python3
index a4522e0..1000948 100644
--- a/README.Python3
+++ b/README.Python3
@@ -1,26 +1,29 @@
Python3
=======
-Source
-------
-
-Python3 portage is made by running the 2to3 script on all modules::
+Approach
+--------
- find . ! -path "*/test/*py" -name "*py" -exec 2to3-3.1 -wn {} \;
+We maintain a Python 2 base and use 2to3 to generate Python 3 code.
+2to3 is integrated into the distutils installation process and will be run as a
+build step when invoked by the python3 interpreter::
-Dev
----
+ python3 setup.py install
-If you want to run the tests, simply remove the "! -path ..." option, hence
-also refactoring the test files, including all data files.
+Tests
+-----
+Set your PYTHONPATH and run pytest3 against the test directory.
Debian
------
-For the Debian packaging of python3-logilab-common, you can use the debian.py3k/
+For the Debian packaging of python3-logilab-common, you can use the debian.sid/
content against the debian/ folder::
- cp debian.py3k/* debian/
+ cp debian.sid/* debian/
+Resources
+---------
+http://wiki.python.org/moin/PortingPythonToPy3k
diff --git a/__pkginfo__.py b/__pkginfo__.py
index ade0d0f..0d92c89 100644
--- a/__pkginfo__.py
+++ b/__pkginfo__.py
@@ -23,7 +23,7 @@ modname = 'common'
subpackage_of = 'logilab'
subpackage_master = True
-numversion = (0, 56, 0)
+numversion = (0, 56, 1)
version = '.'.join([str(num) for num in numversion])
license = 'LGPL' # 2.1 or later
diff --git a/clcommands.py b/clcommands.py
index a0b4d90..411931b 100644
--- a/clcommands.py
+++ b/clcommands.py
@@ -121,6 +121,7 @@ class CommandLine(dict):
if rcfile is not None and arg in ('-C', '--rc-file'):
try:
rcfile = args.pop(0)
+ arg = args.pop(0)
except IndexError:
self.usage_and_exit(1)
try:
diff --git a/debian.py3k/rules b/debian.py3k/rules
deleted file mode 100755
index 4661da1..0000000
--- a/debian.py3k/rules
+++ /dev/null
@@ -1,60 +0,0 @@
-#!/usr/bin/make -f
-# Sample debian/rules that uses debhelper.
-# GNU copyright 1997 to 1999 by Joey Hess.
-#
-# adapted by Logilab for automatic generation by debianize
-# (part of the devtools project, http://www.logilab.org/projects/devtools)
-#
-# Copyright (c) 2003-2011 LOGILAB S.A. (Paris, FRANCE).
-# http://www.logilab.fr/ -- mailto:contact@logilab.fr
-
-# Uncomment this to turn on verbose mode.
-#export DH_VERBOSE=1
-
-include /usr/share/python3/python.mk
-
-PACKAGE:=$(shell grep Package debian/control | cut -d ' ' -f2)
-#PACKAGE:=$(call py_pkgname,$(shell grep Package debian/control | cut -d ' ' -f2), python3.)
-
-%:
- dh --with python3 --without python2 $@
-
-override_dh_auto_build:
-ifeq (,$(findstring nodoc,$(DEB_BUILD_OPTIONS)))
- # build doc
- $(MAKE) -C doc
-endif
-
-override_dh_install:
- NO_SETUPTOOLS=1 python3 setup.py -q install --no-compile \
- --root=$(CURDIR)/debian/$(PACKAGE)/ \
- ${py_setup_install_args}
- # remove test directory
- rm -rf debian/$(PACKAGE)/usr/lib/python*/*-packages/logilab/common/test
- # rename pytest for python3k
- mv debian/$(PACKAGE)/usr/bin/pytest debian/$(PACKAGE)/usr/bin/pytest3
- sed -i 's/python -u/python3 -u/' debian/$(PACKAGE)/usr/bin/pytest3
- # don't install python2.X sources in this package
- rm -rf debian/$(PACKAGE)/usr/lib/python2.?
-
-override_dh_pysupport:
- dh_python3 --suggests=python3
-
-override_dh_installdocs:
- dh_installdocs -i README* doc/apidoc/
- dh_installchangelogs -i ChangeLog
-
-override_dh_auto_test:
-ifeq (,$(findstring nocheck,$(DEB_BUILD_OPTIONS)))
- # IMPORTANT: Install command was overriden by Logilab to install data test files.
- NO_SETUPTOOLS=1 python3 setup.py -q install --no-compile \
- --root=$(CURDIR)/testing/ ${py_setup_install_args}
- # since "logilab.common" is a namespace package, we need to "simulate" it
- touch $(CURDIR)/testing/usr/lib/python3/dist-packages/logilab/__init__.py
- # use the default python version to select the script dir to run the tests
- PYTHONPATH=$(CURDIR)/testing/usr/lib/python3/dist-packages/ python3 $(CURDIR)/testing/usr/bin/pytest -t $(CURDIR)/testing/usr/lib/python3/dist-packages/logilab/common/test
- rm -f $(CURDIR)/testing/usr/lib/python3/dist-packages/logilab/__init__.py
-endif
-
-override_dh_compress:
- dh_compress -i -X.py -X.ini -X.xml -Xtest/ -Xapidoc/
diff --git a/debian.py3k/source/format b/debian.py3k/source/format
deleted file mode 100644
index 163aaf8..0000000
--- a/debian.py3k/source/format
+++ /dev/null
@@ -1 +0,0 @@
-3.0 (quilt)
diff --git a/debian.py3k/control b/debian.sid/control
index 77f365f..956ac50 100644
--- a/debian.py3k/control
+++ b/debian.sid/control
@@ -8,18 +8,42 @@ Uploaders: David Douard <david.douard@logilab.fr>,
Adrien Di Mascio <Adrien.DiMascio@logilab.fr>,
Nicolas Chauvat <nicolas.chauvat@logilab.fr>,
Julien Jehannet <julien.jehannet@logilab.fr>
-Build-Depends: debhelper (>= 7.0.50~), python3-all
-Build-Depends-Indep: python-epydoc, graphviz
-#, python-unittest2, python-egenix-mxdatetime
+Build-Depends: debhelper (>= 7.0.50~), python-all, python3-all
+Build-Depends-Indep: python-epydoc, graphviz, python-unittest2, python-egenix-mxdatetime
+X-Python3-Version: >= 3.2
Standards-Version: 3.9.1
Homepage: http://www.logilab.org/project/logilab-common
Vcs-Hg: http://hg.logilab.org/logilab/common
Vcs-Browser: http://hg.logilab.org/logilab/common
-Package: python3-logilab-common
+Package: python-logilab-common
Architecture: all
Provides: ${python:Provides}
Depends: ${python:Depends}, ${misc:Depends}
+Recommends: python-egenix-mxdatetime
+Suggests: pyro, python-unittest2
+Conflicts: python-constraint (<< 0.4.0-4), python-logilab-astng (<< 0.19.1-1), pylint (<< 0.18.1-1)
+Description: useful miscellaneous modules used by Logilab projects
+ logilab-common is a collection of low-level Python packages and modules,
+ designed to ease:
+ .
+ * handling command line options and configuration files
+ * writing interactive command line tools
+ * manipulation files and character strings
+ * interfacing to OmniORB
+ * generating SQL queries
+ * running unit tests
+ * manipulating tree structures
+ * accessing RDBMS (currently postgreSQL, MySQL and sqlite)
+ * generating text and HTML reports
+ * logging
+ * parsing XML processing instructions
+
+
+Package: python3-logilab-common
+Architecture: all
+Provides: ${python3:Provides}
+Depends: ${python3:Depends}, ${misc:Depends}
Suggests: pyro
#Recommends: python3-egenix-mxdatetime
Description: useful miscellaneous modules used by Logilab projects
diff --git a/debian.sid/rules b/debian.sid/rules
new file mode 100755
index 0000000..7a6e7fb
--- /dev/null
+++ b/debian.sid/rules
@@ -0,0 +1,76 @@
+#!/usr/bin/make -f
+# -*- makefile -*-
+#
+# Copyright (c) 2003-2011 LOGILAB S.A. (Paris, FRANCE).
+# http://www.logilab.fr/ -- mailto:contact@logilab.fr
+
+# Uncomment this to turn on verbose mode.
+#export DH_VERBOSE=1
+
+include /usr/share/python/python.mk
+
+PYLIB:=$(call py_libdir,$(shell pyversions -d))
+PACKAGE:=$(call py_pkgname,python-logilab-common,python)
+PYLIB3:=$(call py_libdir,python3.)
+PACKAGE3:=$(call py_pkgname,python-logilab-common,python3.)
+
+%:
+ dh $@ --with python2,python3
+
+override_dh_auto_build:
+ifeq (,$(filter nodoc,$(DEB_BUILD_OPTIONS)))
+ $(MAKE) -C doc
+endif
+
+override_dh_auto_install:
+ NO_SETUPTOOLS=1 python setup.py -q install --no-compile \
+ --root=$(CURDIR)/debian/$(PACKAGE)/ \
+ ${py_setup_install_args}
+ # remove test directory
+ rm -rf debian/$(PACKAGE)/$(PYLIB)/logilab/common/test
+
+ NO_SETUPTOOLS=1 python3 setup.py -q install --no-compile \
+ --root=$(CURDIR)/debian/$(PACKAGE3)/ \
+ ${py_setup_install_args}
+ # remove test directory
+ rm -rf debian/$(PACKAGE3)/$(PYLIB3)/logilab/common/test
+
+ # rename pytest and its man page for python3k
+ mv debian/$(PACKAGE3)/usr/bin/pytest debian/$(PACKAGE3)/usr/bin/pytest3
+ sed -i 's/python -u/python3 -u/' debian/$(PACKAGE3)/usr/bin/pytest3
+ install -D doc/pytest.1 debian/$(PACKAGE3)/usr/share/man/man1/pytest3.1
+ sed -i 's/pytest/pytest3/' debian/$(PACKAGE3)/usr/share/man/man1/pytest3.1
+ gzip debian/$(PACKAGE3)/usr/share/man/man1/pytest3.1
+
+override_dh_installdocs:
+ dh_installchangelogs -i ChangeLog
+ dh_installdocs -i README*
+ifeq (,$(filter nodoc,$(DEB_BUILD_OPTIONS)))
+ dh_installdocs -i doc/apidoc/
+endif
+
+override_dh_auto_test:
+ifeq (,$(filter nocheck,$(DEB_BUILD_OPTIONS)))
+ # PYTHON 2.X
+ # IMPORTANT: Install command was overriden by Logilab to install data test files.
+ NO_SETUPTOOLS=1 python setup.py -q install --no-compile \
+ --root=$(CURDIR)/testing/ ${py_setup_install_args}
+ # since "logilab.common" is a namespace package, we need to "simulate" it
+ touch $(CURDIR)/testing/$(PYLIB)/logilab/__init__.py
+ # use the default python version to select the script dir to run the tests
+ PYTHONPATH=$(CURDIR)/testing/$(PYLIB) python $(CURDIR)/testing/usr/bin/pytest -t $(CURDIR)/testing/$(PYLIB)/logilab/common/test
+ rm -rf $(CURDIR)/testing
+
+ # PYTHON 3.2
+ # IMPORTANT: Install command was overriden by Logilab to install data test files.
+ NO_SETUPTOOLS=1 python3 setup.py -q install --no-compile \
+ --root=$(CURDIR)/testing/ ${py_setup_install_args}
+ # since "logilab.common" is a namespace package, we need to "simulate" it
+ touch $(CURDIR)/testing/$(PYLIB3)/logilab/__init__.py
+ # use python3 version to run pytest
+ -PYTHONPATH=$(CURDIR)/testing/$(PYLIB3) python3 $(CURDIR)/testing/usr/bin/pytest -t $(CURDIR)/testing/$(PYLIB3)/logilab/common/test
+ rm -rf $(CURDIR)/testing
+endif
+
+override_dh_compress:
+ dh_compress -X.py -X.ini -X.xml -Xtest/ -Xapidoc/
diff --git a/debian/changelog b/debian/changelog
index 1c06cbb..6742b9a 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,9 @@
+logilab-common (0.56.1-1) unstable; urgency=low
+
+ * new upstream release
+
+ -- Sylvain Thénault <sylvain.thenault@logilab.fr> Fri, 05 Aug 2011 10:34:52 +0200
+
logilab-common (0.56.0-1) unstable; urgency=low
* new upstream release