summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohannes Dewender <github@JonnyJD.net>2013-10-19 17:11:36 +0200
committerJohannes Dewender <github@JonnyJD.net>2013-10-20 11:21:25 +0200
commit801ad4fa0e59f7554acebb5e8dffbe848328cf28 (patch)
tree2936376c67660896160ec4b687cbce4dc4b1e21d
parenta630d0bc19bcc076b257efa52ac6407cec281137 (diff)
downloadconfigshell-fb-801ad4fa0e59f7554acebb5e8dffbe848328cf28.tar.gz
debian: also build python 3 package
This splits an exatra -docs package, too. Signed-off-by: Johannes Dewender <github@JonnyJD.net>
-rw-r--r--debian/control23
-rw-r--r--debian/python-configshell-fb-docs.doc-base9
-rw-r--r--debian/python-configshell-fb.install1
-rw-r--r--debian/python3-configshell-fb.install1
-rwxr-xr-xdebian/rules26
-rw-r--r--debian/source/format1
6 files changed, 55 insertions, 6 deletions
diff --git a/debian/control b/debian/control
index be4314d..de5a127 100644
--- a/debian/control
+++ b/debian/control
@@ -2,16 +2,31 @@ Source: configshell-fb
Section: python
Priority: optional
Maintainer: Andy Grover <grover@groveronline.com>
-Build-Depends: debhelper(>= 8), python (>=2.6.6-3~), python-setuptools, python-epydoc, python-pyparsing
+Build-Depends: debhelper(>= 8), python, python3, python-setuptools, python3-setuptools, python-epydoc, python-pyparsing
Standards-Version: 3.9.4
X-Python-Version: >= 2.6
+X-Python3-Version: >= 3.1
+
+Package: python-configshell-fb-docs
+Architecture: all
+Description: Framework to create CLI interfaces (Documentation).
+ .
+ This package contains the documentation of the configshell library (free branch).
Package: python-configshell-fb
Architecture: all
Depends: ${python:Depends}, ${misc:Depends}, python-pyparsing, python-urwid (>=0.9.9)
-Suggests: configshell-fb-doc
-Conflicts: configshell
+Suggests: python-configshell-fb-docs
+Conflicts: python-configshell
Provides: ${python:Provides}
-Description: Framework to create CLI interfaces.
+Description: Framework to create CLI interfaces (Python 2).
.
This package contains the configshell library (free branch).
+
+Package: python3-configshell-fb
+Architecture: all
+Depends: ${python3:Depends}, ${misc:Depends}, python3-pyparsing, python3-urwid (>=0.9.9)
+Suggests: python-configshell-fb-docs
+Description: Framework to create CLI interfaces (Python 3).
+ .
+ This package contains the configshell library (free branch, Python 3).
diff --git a/debian/python-configshell-fb-docs.doc-base b/debian/python-configshell-fb-docs.doc-base
new file mode 100644
index 0000000..df6a17a
--- /dev/null
+++ b/debian/python-configshell-fb-docs.doc-base
@@ -0,0 +1,9 @@
+Document: python-configshell-fb
+Title: python-configshell documentation
+Author: Jerome Martin <jxm@risingtidesystems.com>
+Abstract: configshell is a library which is used to create cli interfaces
+Section: Programming/Python
+
+Format: HTML
+Index: /usr/share/doc/python-configshell-fb-docs/html/index.html
+Files: /usr/share/doc/python-configshell-fb-docs/html/*.html
diff --git a/debian/python-configshell-fb.install b/debian/python-configshell-fb.install
new file mode 100644
index 0000000..b2cc136
--- /dev/null
+++ b/debian/python-configshell-fb.install
@@ -0,0 +1 @@
+usr/lib/python2*
diff --git a/debian/python3-configshell-fb.install b/debian/python3-configshell-fb.install
new file mode 100644
index 0000000..4606faa
--- /dev/null
+++ b/debian/python3-configshell-fb.install
@@ -0,0 +1 @@
+usr/lib/python3*
diff --git a/debian/rules b/debian/rules
index 1f737a1..ce1f43f 100755
--- a/debian/rules
+++ b/debian/rules
@@ -1,19 +1,41 @@
#!/usr/bin/make -f
build_dir = build
+install_dir = $(CURDIR)/debian/tmp
pkgname = configshell-fb
name = configshell
#export DH_VERBOSE=1
+PYTHON2=$(shell pyversions -vr)
+PYTHON3=$(shell py3versions -vr)
+
# prevent internet access to use PyPi
export http_proxy = http://127.0.0.1:9
+
%:
- dh $@ --with python2
+ echo "debug dh: $@"
+ dh $@ --with python2,python3
+
+
+build-python%:
+ echo "debug: $@"
+ python$* setup.py build
+
+override_dh_auto_build: $(PYTHON3:%=build-python%)
+ dh_auto_build
+
+
+install-python%:
+ echo "debug: $@"
+ python$* setup.py install --root=$(install_dir) --install-layout=deb
+
+override_dh_auto_install: $(PYTHON3:%=install-python%)
+ dh_auto_install
+
override_dh_installdocs:
- mkdir -p $(build_dir) doc/
cd $(build_dir); epydoc --no-sourcecode --html -n $(pkgname) \
--exclude configobj ../$(name)/*.py
dh_installdocs $(build_dir)/html
diff --git a/debian/source/format b/debian/source/format
new file mode 100644
index 0000000..89ae9db
--- /dev/null
+++ b/debian/source/format
@@ -0,0 +1 @@
+3.0 (native)