From fdac20d61e227add2f07b7ddde0a590e0efec31f Mon Sep 17 00:00:00 2001 From: Thomas Goirand Date: Mon, 23 Sep 2013 15:00:54 +0800 Subject: [PATCH] Now also builds for python 2.x --- debian/control | 31 ++++++++++++++++++++++++++----- debian/rules | 7 ++++++- 2 files changed, 32 insertions(+), 6 deletions(-) diff --git a/debian/control b/debian/control index 8b5216a..a9e0c4c 100644 --- a/debian/control +++ b/debian/control @@ -7,6 +7,9 @@ Uploaders: Julien Danjou , Mehdi Abaakouk Build-Depends: debhelper (>= 9), openstack-pkg-tools, + python-all (>= 2.6.6-3~), + python-ply, + python-setuptools, python3-all, python3-ply, python3-setuptools @@ -15,16 +18,34 @@ Vcs-Browser: http://anonscm.debian.org/gitweb/?p=openstack/python-lesscpy.git Vcs-Git: git://anonscm.debian.org/openstack/python-lesscpy.git Homepage: https://pypi.python.org/pypi/lesscpy -Package: python3-lesscpy +Package: python-lesscpy Architecture: all Pre-Depends: dpkg (>= 1.15.6~) -Depends: python3-ply, ${misc:Depends}, ${python3:Depends} -Recommends: ${python3:Recommends} -Description: LessCss Compiler for Python 3 - Lesscpy is a compiler written in Python 3 for the lesscss language. It is very +Depends: python-ply, ${misc:Depends}, ${python:Depends} +Recommends: ${python:Recommends} +Description: LessCss Compiler for Python 2.x + Lesscpy is a compiler written in Python for the lesscss language. It is very useful if node.js can't be installed in the environment. Not all features of lesscss are supported (yet). Some features wil probably never be supported (JavaScript evaluation). . This program uses PLY (Python Lex-Yacc) to tokenize/parse the input and is considerably slower than the nodejs compiler. + . + This package provides the Python 2.x module. + +Package: python3-lesscpy +Architecture: all +Pre-Depends: dpkg (>= 1.15.6~) +Depends: python3-ply, ${misc:Depends}, ${python3:Depends} +Recommends: ${python3:Recommends} +Description: LessCss Compiler for Python 3.x + Lesscpy is a compiler written in Python for the lesscss language. It is very + useful if node.js can't be installed in the environment. Not all features of + lesscss are supported (yet). Some features wil probably never be supported + (JavaScript evaluation). + . + This program uses PLY (Python Lex-Yacc) to tokenize/parse the input and is + considerably slower than the nodejs compiler. + . + This package provides the Python 3.x module. diff --git a/debian/rules b/debian/rules index 04f1865..94b98d6 100755 --- a/debian/rules +++ b/debian/rules @@ -7,14 +7,19 @@ PYTHONS:=$(shell pyversions -vr) PYTHON3S:=$(shell py3versions -vr) %: - dh $@ --buildsystem=python_distutils --with python3 + dh $@ --buildsystem=python_distutils --with python2,python3 override_dh_clean: dh_clean -O--buildsystem=python_distutils rm -rf build override_dh_auto_install: + set -e && for pyvers in $(PYTHONS); do \ + python$$pyvers setup.py install --install-layout=deb \ + --root $(CURDIR)/debian/python-lesscpy; \ + done set -e && for pyvers in $(PYTHON3S); do \ python$$pyvers setup.py install --install-layout=deb \ --root $(CURDIR)/debian/python3-lesscpy; \ done + mv $(CURDIR)/debian/python3-lesscpy/usr/bin/lesscpy $(CURDIR)/debian/python3-lesscpy/usr/bin/python3-lesscpy