summaryrefslogtreecommitdiff
path: root/debian
diff options
context:
space:
mode:
authorRémi Cardona <remi.cardona@logilab.fr>2015-05-28 14:39:25 +0200
committerRémi Cardona <remi.cardona@logilab.fr>2015-05-28 14:39:25 +0200
commit06becb75c2f4fc1a4b821bbfb6cfdf711d6bba33 (patch)
treed815d1df36f2ffbf38b97d60dbe45a2731636764 /debian
parent30655afccc28f7a7f98af812d95a2ca98be64f76 (diff)
downloadlogilab-common-06becb75c2f4fc1a4b821bbfb6cfdf711d6bba33.tar.gz
[pkg] pure setuptools setup.py (closes #294479)
- stop installing __pkginfo__ (move it back to root dir) - adapt all packaging to use setuptools
Diffstat (limited to 'debian')
-rw-r--r--debian/control2
-rwxr-xr-xdebian/rules33
2 files changed, 13 insertions, 22 deletions
diff --git a/debian/control b/debian/control
index d53ebfd..471dfad 100644
--- a/debian/control
+++ b/debian/control
@@ -10,7 +10,9 @@ Uploaders: David Douard <david.douard@logilab.fr>,
Build-Depends:
debhelper (>= 8),
python-all,
+ python-setuptools,
python3-all,
+ python3-setuptools,
Build-Depends-Indep:
python-epydoc,
graphviz,
diff --git a/debian/rules b/debian/rules
index c54fe35..5c427b1 100755
--- a/debian/rules
+++ b/debian/rules
@@ -32,19 +32,19 @@ build: build-indep
override_dh_auto_build:
dh_auto_build
ifeq (,$(filter nodoc,$(DEB_BUILD_OPTIONS)))
- NO_SETUPTOOLS=1 python setup.py -q build --build-purelib build/lib
+ python setup.py -q build --build-purelib build/lib
$(MAKE) -C doc
endif
override_dh_auto_install:
- NO_SETUPTOOLS=1 python setup.py -q install --no-compile \
+ 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
ifneq (,$(build_py3k))
- NO_SETUPTOOLS=1 python3 setup.py -q install --no-compile \
+ python3 setup.py -q install --no-compile \
--root=$(CURDIR)/debian/$(PACKAGE3)/ \
${py_setup_install_args}
# remove test directory
@@ -66,26 +66,15 @@ 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 setup.py -q install \
+ --root=$(CURDIR)/testing/ ${py_setup_install_args}
+ echo 'import site, os.path; site.addsitedir(os.path.dirname(__file__))' > testing/$(PYLIB)/sitecustomize.py
+ PYTHONPATH=$(CURDIR)/testing/$(PYLIB) python bin/pytest -t $(CURDIR)/test
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
+ python3 setup.py -q install \
+ --root=$(CURDIR)/testing/ ${py_setup_install_args}
+ echo 'import site, os.path; site.addsitedir(os.path.dirname(__file__))' > testing/$(PYLIB3)/sitecustomize.py
+ PYTHONPATH=$(CURDIR)/testing/$(PYLIB3) python3 bin/pytest -t $(CURDIR)/test
endif
endif