summaryrefslogtreecommitdiff
path: root/debian
diff options
context:
space:
mode:
Diffstat (limited to 'debian')
-rw-r--r--debian/control60
-rwxr-xr-xdebian/rules142
2 files changed, 116 insertions, 86 deletions
diff --git a/debian/control b/debian/control
index 82061a3..75d90a0 100644
--- a/debian/control
+++ b/debian/control
@@ -1,25 +1,27 @@
Source: logilab-common
Section: python
Priority: optional
-Maintainer: Debian Python Modules Team <python-modules-team@lists.alioth.debian.org>
+Maintainer: Logilab S.A. <contact@logilab.fr>
Uploaders: David Douard <david.douard@logilab.fr>,
Alexandre Fayolle <afayolle@debian.org>,
Sandro Tosi <morph@debian.org>,
Adrien Di Mascio <Adrien.DiMascio@logilab.fr>,
Nicolas Chauvat <nicolas.chauvat@logilab.fr>,
Build-Depends:
- debhelper (>= 7),
- python (>= 2.6),
- python-unittest2 | python (>= 2.7),
+ debhelper (>= 7.0.50~),
+ python-all,
+ python3-all,
+Build-Depends-Indep:
python-epydoc,
- python-six (>= 1.4.0),
graphviz,
+ python-unittest2,
python-egenix-mxdatetime,
-XS-Python-Version: >= 2.6
+X-Python3-Version: >= 3.3
+X-Python-Version: >= 2.6
Standards-Version: 3.9.1
Homepage: http://www.logilab.org/project/logilab-common
-Vcs-Svn: svn://svn.debian.org/svn/python-modules/packages/logilab-common/trunk/
-Vcs-Browser: http://svn.debian.org/viewsvn/python-modules/packages/logilab-common/trunk/
+Vcs-Hg: http://hg.logilab.org/logilab/common
+Vcs-Browser: http://hg.logilab.org/logilab/common
Package: python-logilab-common
Architecture: all
@@ -28,11 +30,15 @@ Depends:
python-six (>= 1.4.0),
${python:Depends},
${misc:Depends},
-Suggests: pyro, python-unittest2, python-kerberos
-Recommends: python-egenix-mxdatetime
+Recommends:
+ python-egenix-mxdatetime
+Suggests:
+ pyro,
+ python-unittest2,
+ python-kerberos,
Conflicts:
- python-constraint (<= 0.3.0-4),
- python-logilab-astng (<= 0.16.0-1),
+ python-constraint (<< 0.4.0-4),
+ python-logilab-astng (<< 0.19.1-1),
pylint (<< 1),
devtools (<= 0.9.0-1),
logilab-doctools (<= 0.1.6-4),
@@ -48,9 +54,35 @@ Description: useful miscellaneous modules used by Logilab projects
* writing interactive command line tools
* manipulation files and character strings
* interfacing to OmniORB
- * generating of 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
+ .
+ This package contains the Python 2.x version of this library.
+
+Package: python3-logilab-common
+Architecture: all
+Depends:
+ python3-six (>= 1.4.0),
+ ${python3:Depends},
+ ${misc:Depends},
+#Recommends:
+# python3-egenix-mxdatetime,
+Suggests:
+ python3-kerberos,
+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
+ * running unit tests
+ * manipulating tree structures
+ * generating text and HTML reports
+ * logging
+ .
+ This package contains the Python 3.x version of this library.
diff --git a/debian/rules b/debian/rules
index 281998e..eaa95bc 100755
--- a/debian/rules
+++ b/debian/rules
@@ -1,9 +1,5 @@
#!/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)
+# -*- makefile -*-
#
# Copyright (c) 2003-2011 LOGILAB S.A. (Paris, FRANCE).
# http://www.logilab.fr/ -- mailto:contact@logilab.fr
@@ -11,84 +7,86 @@
# Uncomment this to turn on verbose mode.
#export DH_VERBOSE=1
-# Python default version number
-PYDEF := $(shell pyversions -d -v)
-
--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
+include /usr/share/python/python.mk
-build: build-stamp
-build-stamp:
- dh_testdir
+# don't build the python3 package if python3 is < 3.3
+py3k = $(subst python3.,,$(shell py3versions -d))
+build_py3k = $(shell test "$(py3k)" -gt 2 && echo 1)
- # python module build
- NO_SETUPTOOLS=1 python setup.py -q build --build-purelib build/lib
+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.)
- # run tests
-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
- # use the default python version to select the script dir to run the tests
- PYTHONPATH=$(CURDIR)/build/lib/ $(CURDIR)/build/scripts-$(PYDEF)/pytest -t test
+ifeq (,$(build_py3k))
+ DH_OPTIONS += -N$(PACKAGE3)
+ export DH_OPTIONS
endif
- # build doc
- $(MAKE) -C doc
-
- rm -f $(CURDIR)/build/lib/logilab/__init__.py
- touch build-stamp
-
-clean:
- dh_testdir
- dh_testroot
-
- # clean doc
- $(MAKE) -C doc clean
-
- NO_SETUPTOOLS=1 python setup.py clean
-
- [ ! -d build ] || rm -rf build
+build: build-indep
+.PHONY: build
- find . -name "*.pyc" -delete
+%:
+ dh $@ --with python2,python3
- dh_clean build-stamp
-
-install: build
- dh_testdir
- dh_testroot
- dh_clean -k
- dh_installdirs
+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/python-logilab-common/ \
- ${py_setup_install_args}
+ --root=$(CURDIR)/debian/$(PACKAGE)/ \
+ ${py_setup_install_args}
# remove test directory
- rm -rf debian/python-logilab-common/usr/lib/python*/*-packages/logilab/common/test
+ rm -rf debian/$(PACKAGE)/$(PYLIB)/logilab/common/test
+
+ifneq (,$(build_py3k))
+ 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
+endif
-# Build architecture-independent files here.
-binary-indep: build install
- dh_testdir
- dh_testroot
- dh_python2 -i
+override_dh_installdocs:
dh_installchangelogs -i ChangeLog
- dh_installexamples -i
- dh_installdocs -i README doc/apidoc/
- dh_installman -i
- dh_link -i
- dh_compress -i -X.py -X.ini -X.xml -Xtest/ -Xapidoc/
- dh_fixperms -i
- dh_installdeb -i
- dh_gencontrol -i
- dh_md5sums -i
- dh_builddeb -i
+ dh_installdocs -i README*
+ifeq (,$(filter nodoc,$(DEB_BUILD_OPTIONS)))
+ dh_installdocs -i doc/apidoc/
+endif
-binary-arch:
+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
+
+ifneq (,$(build_py3k))
+ # PYTHON 3.x
+ # 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
+endif
-binary: binary-indep
-.PHONY: build clean binary binary-indep binary-arch
+override_dh_compress:
+ dh_compress -X.py -X.ini -X.xml -Xtest/ -Xapidoc/