From 03a5de880269ff9715273eb9a3731cd9a93f9382 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20P=C3=A9ters?= Date: Thu, 10 Aug 2017 13:46:19 +0200 Subject: [PATCH] misc: switch to setuptools (and update debian packaging to match) (#17960) --- debian/compat | 2 +- debian/control | 4 ++-- debian/rules | 54 +++--------------------------------------------------- setup.py | 3 ++- 4 files changed, 8 insertions(+), 55 deletions(-) diff --git a/debian/compat b/debian/compat index 7ed6ff8..ec63514 100644 --- a/debian/compat +++ b/debian/compat @@ -1 +1 @@ -5 +9 diff --git a/debian/control b/debian/control index abcaf00..b2c8fa2 100644 --- a/debian/control +++ b/debian/control @@ -2,8 +2,8 @@ Source: wcs-au-quotidien Section: web Priority: optional Maintainer: Frederic Peters -Build-Depends: debhelper (>= 5.0.37.2), python -Build-Depends-Indep: python-support (>= 0.4), gettext, python-quixote +Build-Depends: python-setuptools (>= 0.6b3), python-all (>= 2.6.6-3), dh-python, debhelper (>= 9) +Build-Depends-Indep: gettext, python-quixote Standards-Version: 3.8.0.1 X-Python-Version: current diff --git a/debian/rules b/debian/rules index adf9d23..951d8b1 100755 --- a/debian/rules +++ b/debian/rules @@ -4,56 +4,8 @@ # Uncomment this to turn on verbose mode. #export DH_VERBOSE=1 -PYTHON=/usr/bin/python -DESTDIR=$(CURDIR)/debian/wcs-au-quotidien +%: + dh $@ --with python2 -build: build-stamp - -build-stamp: - dh_testdir - touch build-stamp - -clean: - dh_testdir - dh_testroot - rm -f build-stamp - - rm -f po/*.mo - python setup.py clean - rm -rf build - - dh_clean - -install: build - dh_testdir - dh_testroot - dh_clean -k - dh_installdirs - - $(PYTHON) setup.py install --prefix=$(DESTDIR)/usr --no-compile +override_dh_install: cd po && make install prefix=$(CURDIR)/debian/wcs-au-quotidien/ - install -d -m 755 $(DESTDIR)/var/lib/wcs-au-quotidien $(DESTDIR)/etc/wcs - install -m 644 wcs-au-quotidien.cfg-sample $(DESTDIR)/etc/wcs/wcs-au-quotidien.cfg - - -# Build architecture-independent files here. -binary-indep: build install - dh_testdir - dh_testroot - dh_installdocs - dh_installchangelogs - dh_installinit - dh_link - dh_strip - dh_compress - dh_fixperms - dh_pysupport - dh_installdeb - dh_gencontrol - dh_md5sums - dh_builddeb - -binary-arch: build install - -binary: binary-indep binary-arch -.PHONY: build clean binary-indep binary-arch binary install diff --git a/setup.py b/setup.py index ed1679d..a44b017 100644 --- a/setup.py +++ b/setup.py @@ -6,6 +6,7 @@ import distutils.core from distutils.command.sdist import sdist from quixote.ptl.qx_distutils import qx_build_py +from setuptools import setup VERSION = '1.20' @@ -50,7 +51,7 @@ class eo_sdist(sdist): if os.path.exists('VERSION'): os.remove('VERSION') -distutils.core.setup( +setup( name = 'wcs-au-quotidien', version = get_version(), maintainer = 'Frederic Peters', -- 2.14.0