summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--README.rst2
-rw-r--r--debian/changelog58
l---------debian/changelog.in1
-rw-r--r--debian/clean1
-rw-r--r--debian/compat2
-rw-r--r--debian/control116
-rw-r--r--[l---------]debian/copyright31
-rwxr-xr-xdebian/get-orig-source.sh15
-rw-r--r--debian/patches/remove-external-images.diff23
-rw-r--r--debian/patches/series2
-rw-r--r--debian/patches/system-iniparse.patch11
-rw-r--r--debian/postinst2
-rw-r--r--debian/prerm3
-rw-r--r--debian/python-reconfigure-doc.docs1
-rw-r--r--debian/pyversions1
-rwxr-xr-xdebian/rules27
-rw-r--r--debian/source/format1
-rw-r--r--debian/watch2
-rw-r--r--docs/source/index.rst3
-rw-r--r--reconfigure/parsers/ini.py2
20 files changed, 274 insertions, 30 deletions
diff --git a/README.rst b/README.rst
index df387f5..06fce88 100644
--- a/README.rst
+++ b/README.rst
@@ -2,8 +2,6 @@
Reconfigure - Python object mapping for config files
====================================================
-.. image:: https://travis-ci.org/Eugeny/reconfigure.png
-
`Browse API on SourceGraph <https://sourcegraph.com/github.com/Eugeny/reconfigure/tree>`_
----------
diff --git a/debian/changelog b/debian/changelog
new file mode 100644
index 0000000..879fc14
--- /dev/null
+++ b/debian/changelog
@@ -0,0 +1,58 @@
+python-reconfigure (0.1.74+git49a20890-3) unstable; urgency=medium
+
+ * Add Python3 support.
+ * Depend on system-provided python*-iniparse, don't use bundled one.
+ * Drop unneeded dependency on python-configparser.
+
+ -- Andrew Shadura <andrewsh@debian.org> Thu, 27 Aug 2015 18:53:54 +0200
+
+python-reconfigure (0.1.74+git49a20890-2) unstable; urgency=medium
+
+ * (Build-)Depend on python-iniparse and python-configparser.
+
+ -- Andrew Shadura <andrewsh@debian.org> Fri, 21 Aug 2015 17:33:46 +0200
+
+python-reconfigure (0.1.74+git49a20890-1) unstable; urgency=medium
+
+ * New upstream snapshot.
+
+ -- Andrew Shadura <andrewsh@debian.org> Thu, 20 Aug 2015 16:05:11 +0200
+
+python-reconfigure (0.1.69+git20150226-1) unstable; urgency=medium
+
+ * New upstream snapshot.
+
+ -- Andrew Shadura <andrewsh@debian.org> Wed, 29 Apr 2015 10:23:28 +0200
+
+python-reconfigure (0.1.59+git20140824-1) unstable; urgency=medium
+
+ * New upstream snapshot.
+
+ -- Andrew Shadura <andrewsh@debian.org> Sun, 07 Sep 2014 14:06:17 +0200
+
+python-reconfigure (0.1.50+git20140603-1) unstable; urgency=medium
+
+ * New upstream snapshot.
+ * Drop old patches.
+ * Use pybuild.
+
+ -- Andrew Shadura <andrewsh@debian.org> Sun, 29 Jun 2014 23:52:18 +0200
+
+python-reconfigure (0.1.39-1) unstable; urgency=medium
+
+ * New upstream release.
+
+ -- Andrew Shadura <andrewsh@debian.org> Tue, 11 Mar 2014 00:35:43 +0100
+
+python-reconfigure (0.1.29-2) unstable; urgency=low
+
+ * Upload to unstable.
+ * Fix python-sphinx build dependency.
+
+ -- Andrew Shadura <andrewsh@debian.org> Sun, 22 Sep 2013 11:37:24 +0200
+
+python-reconfigure (0.1.29-1) experimental; urgency=low
+
+ * Initial release.
+
+ -- Andrew Shadura <andrewsh@debian.org> Thu, 19 Sep 2013 14:07:20 +0200
diff --git a/debian/changelog.in b/debian/changelog.in
deleted file mode 120000
index 1af8df1..0000000
--- a/debian/changelog.in
+++ /dev/null
@@ -1 +0,0 @@
-../docs/CHANGELOG \ No newline at end of file
diff --git a/debian/clean b/debian/clean
new file mode 100644
index 0000000..5e87f12
--- /dev/null
+++ b/debian/clean
@@ -0,0 +1 @@
+reconfigure/parsers/iniparse/*
diff --git a/debian/compat b/debian/compat
index 45a4fb7..ec63514 100644
--- a/debian/compat
+++ b/debian/compat
@@ -1 +1 @@
-8
+9
diff --git a/debian/control b/debian/control
index f13d970..a32537b 100644
--- a/debian/control
+++ b/debian/control
@@ -1,14 +1,114 @@
Source: python-reconfigure
Section: python
Priority: optional
-Maintainer: Eugeny Pankov <e@ajenti.org>
-Build-Depends: debhelper (>=8.0.0), python-support (>= 0.6), cdbs (>= 0.4.49)
-XS-Python-Version: >=2.6
-Standards-Version: 3.9.1
+Maintainer: Andrew Shadura <andrewsh@debian.org>
+Build-Depends:
+ dh-python,
+ python-setuptools (>= 0.6.24),
+ python-all (>= 2.6.6-3),
+ python3-setuptools (>= 0.6.24),
+ python3-all,
+ python-sphinx (>= 1.0.7+dfsg) | python3-sphinx,
+ python-chardet,
+ python3-chardet,
+ python-nose,
+ python3-nose,
+ python-iniparse,
+ python3-iniparse,
+ python-six,
+ python3-six,
+ debhelper (>= 9)
+Standards-Version: 3.9.4
+Homepage: http://eugeny.github.io/reconfigure
Package: python-reconfigure
Architecture: all
-Homepage: http://eugeny.github.com/reconfigure
-XB-Python-Version: ${python:Versions}
-Depends: ${misc:Depends}, ${python:Depends}, python-chardet
-Description: Simple config file management library
+Depends: ${misc:Depends}, ${python:Depends}, python-iniparse
+Provides: ${python:Provides}
+Description: simple config file management library (Python 2)
+ python-reconfigure provides easy and uniform access to various
+ kinds of configuration files, easily extendable with custom
+ parsers.
+ .
+ Supported configuration files:
+ * Ajenti (ajenti)
+ * BIND9 DNS (bind9)
+ * Crontabs (crontab)
+ * Samba CTDB (ctdb)
+ * ISC DHCPD / uDHCPD (dhcpd)
+ * NFS /etc/exports (exports)
+ * /etc/fstab (fstab)
+ * /etc/group (group)
+ * /etc/hosts (hosts)
+ * iptables-save dump (iptables)
+ * Netatalk afp.conf (netatalk)
+ * NSD DNS (nsd)
+ * /etc/passwd (passwd)
+ * /etc/resolv.conf (resolv)
+ * Samba (samba)
+ * Squid 3 (squid)
+ * Supervisord (supervisor)
+ .
+ Included parsers:
+ * BIND9 config (bind9)
+ * Crontab (crontab)
+ * NFS Exports (exports)
+ * .ini (ini)
+ * iptables-save (iptables)
+ * nginx-like (nginx)
+ * squid (squid)
+ * nsd (nsd)
+ * CSV-like space-separated values (ssv)
+ * JSON (jsonparser)
+
+Package: python-reconfigure-doc
+Section: doc
+Architecture: all
+Depends: ${misc:Depends}, ${sphinxdoc:Depends}
+Description: simple config file management library (documentation)
+ python-reconfigure provides easy and uniform access to various
+ kinds of configuration files, easily extendable with custom
+ parsers.
+ .
+ This package provides documentation to python-reconfigure.
+
+Package: python3-reconfigure
+Architecture: all
+Depends: ${misc:Depends}, ${python3:Depends}, python3-iniparse
+Description: simple config file management library (Python 3)
+ python-reconfigure provides easy and uniform access to various
+ kinds of configuration files, easily extendable with custom
+ parsers.
+ .
+ Supported configuration files:
+ * Ajenti (ajenti)
+ * BIND9 DNS (bind9)
+ * Crontabs (crontab)
+ * Samba CTDB (ctdb)
+ * ISC DHCPD / uDHCPD (dhcpd)
+ * NFS /etc/exports (exports)
+ * /etc/fstab (fstab)
+ * /etc/group (group)
+ * /etc/hosts (hosts)
+ * iptables-save dump (iptables)
+ * Netatalk afp.conf (netatalk)
+ * NSD DNS (nsd)
+ * /etc/passwd (passwd)
+ * /etc/resolv.conf (resolv)
+ * Samba (samba)
+ * Squid 3 (squid)
+ * Supervisord (supervisor)
+ .
+ Included parsers:
+ * BIND9 config (bind9)
+ * Crontab (crontab)
+ * NFS Exports (exports)
+ * .ini (ini)
+ * iptables-save (iptables)
+ * nginx-like (nginx)
+ * squid (squid)
+ * nsd (nsd)
+ * CSV-like space-separated values (ssv)
+ * JSON (jsonparser)
+ .
+ This is a Python 3 version of the package
diff --git a/debian/copyright b/debian/copyright
index 7c36994..b6e98d5 120000..100644
--- a/debian/copyright
+++ b/debian/copyright
@@ -1 +1,30 @@
-../docs/COPYRIGHT \ No newline at end of file
+Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
+Upstream-Name: reconfigure
+Upstream-Contact: Eugeny Pankov <john.pankov@gmail.com>
+Source: http://eugeny.github.io/reconfigure/
+License: LGPL-3
+Copyright:
+ (c) 2012-2015 The Ajenti Team
+ Eugeny Pankov <john.pankov@gmail.com> & contributors
+
+Files: debian/*
+Copyright: 2013-2015 Andrew Shadura <andrewsh@debian.org>
+License: LGPL-3
+
+License: LGPL-3
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 3 of the License.
+ .
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+ .
+ You should have received a copy of the GNU Lesser General Public
+ License along with this library; if not, write to the Free Software
+ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA.
+ .
+ On Debian GNU/Linux systems, the complete text of the GNU Lesser General
+ Public License can be found in /usr/share/common-licenses/LGPL-3
diff --git a/debian/get-orig-source.sh b/debian/get-orig-source.sh
new file mode 100755
index 0000000..4265069
--- /dev/null
+++ b/debian/get-orig-source.sh
@@ -0,0 +1,15 @@
+#!/bin/sh -e
+
+GH_PROJECT=Eugeny/reconfigure
+PY_NAME=reconfigure
+
+# receive the list of changesets where the version changed, take only the first one
+GIT_REV=$(GET -o links https://github.com/${GH_PROJECT}/commits/master/${PY_NAME}/__init__.py 2>/dev/null 2>/dev/null | grep -o "https://github.com/${GH_PROJECT}/tree/.*/${PY_NAME}/__init__.py" -m 1 | sed -e 's=^.*tree/\([0-9a-f]*\)/.*=\1=g')
+
+GIT_REV_SHORT=$(echo ${GIT_REV} | grep -E -o '.{8}' | head -n1)
+
+VERSION=$(GET https://raw.githubusercontent.com/${GH_PROJECT}/${GIT_REV}/${PY_NAME}/__init__.py 2>/dev/null | grep -E -o '[[:digit:]]+\.[[:digit:]]+(\.[[:digit:]]+)?')
+
+PACKAGE=$(dpkg-parsechangelog -S Source)
+
+GET https://github.com/${GH_PROJECT}/archive/${GIT_REV}.tar.gz > ${PACKAGE}_${VERSION}+git${GIT_REV_SHORT}.orig.tar.gz
diff --git a/debian/patches/remove-external-images.diff b/debian/patches/remove-external-images.diff
new file mode 100644
index 0000000..7345f3f
--- /dev/null
+++ b/debian/patches/remove-external-images.diff
@@ -0,0 +1,23 @@
+--- a/docs/source/index.rst
++++ b/docs/source/index.rst
+@@ -15,9 +15,6 @@
+
+ `Browse API on SourceGraph <https://sourcegraph.com/github.com/Eugeny/reconfigure/tree>`_
+
+-.. image:: https://sourcegraph.com/api/repos/github.com/Eugeny/reconfigure/badges/funcs.png
+-.. image:: https://sourcegraph.com/api/repos/github.com/Eugeny/reconfigure/badges/status.png
+-
+ Contents:
+ ---------
+
+--- a/README.rst
++++ b/README.rst
+@@ -2,8 +2,6 @@
+ Reconfigure - Python object mapping for config files
+ ====================================================
+
+-.. image:: https://travis-ci.org/Eugeny/reconfigure.png
+-
+ `Browse API on SourceGraph <https://sourcegraph.com/github.com/Eugeny/reconfigure/tree>`_
+
+ ----------
diff --git a/debian/patches/series b/debian/patches/series
new file mode 100644
index 0000000..186cde1
--- /dev/null
+++ b/debian/patches/series
@@ -0,0 +1,2 @@
+remove-external-images.diff
+system-iniparse.patch
diff --git a/debian/patches/system-iniparse.patch b/debian/patches/system-iniparse.patch
new file mode 100644
index 0000000..eb2c391
--- /dev/null
+++ b/debian/patches/system-iniparse.patch
@@ -0,0 +1,11 @@
+--- a/reconfigure/parsers/ini.py
++++ b/reconfigure/parsers/ini.py
+@@ -2,7 +2,7 @@
+
+ from reconfigure.nodes import *
+ from reconfigure.parsers import BaseParser
+-from reconfigure.parsers.iniparse import INIConfig
++from iniparse import INIConfig
+
+ try:
+ from StringIO import StringIO
diff --git a/debian/postinst b/debian/postinst
deleted file mode 100644
index bd4ec77..0000000
--- a/debian/postinst
+++ /dev/null
@@ -1,2 +0,0 @@
-#!/bin/sh
-#DEBHELPER#
diff --git a/debian/prerm b/debian/prerm
deleted file mode 100644
index c35303b..0000000
--- a/debian/prerm
+++ /dev/null
@@ -1,3 +0,0 @@
-#!/bin/sh
-#DEBHELPER#
-
diff --git a/debian/python-reconfigure-doc.docs b/debian/python-reconfigure-doc.docs
new file mode 100644
index 0000000..a213c54
--- /dev/null
+++ b/debian/python-reconfigure-doc.docs
@@ -0,0 +1 @@
+docs/build/html
diff --git a/debian/pyversions b/debian/pyversions
deleted file mode 100644
index 0c043f1..0000000
--- a/debian/pyversions
+++ /dev/null
@@ -1 +0,0 @@
-2.6-
diff --git a/debian/rules b/debian/rules
index fb55c26..7519210 100755
--- a/debian/rules
+++ b/debian/rules
@@ -1,11 +1,24 @@
#!/usr/bin/make -f
-# -*- makefile -*-
-DEB_PYTHON_SYSTEM := pysupport
+export PYBUILD_NAME=reconfigure
-include /usr/share/cdbs/1/rules/debhelper.mk
-include /usr/share/cdbs/1/class/python-distutils.mk
+%:
+ dh $@ --with python2,python3,sphinxdoc --buildsystem=pybuild
-clean::
- rm -rf build build-stamp configure-stamp build/ MANIFEST
- dh_clean
+override_dh_auto_build:
+ dh_auto_build
+ $(MAKE) doc
+
+override_dh_auto_clean:
+ rm -rf docs/build/*
+ dh_auto_clean
+
+override_dh_installchangelogs:
+ dh_installchangelogs -X docs
+
+get-orig-source:
+ @d=$$(readlink -e $(MAKEFILE_LIST)); \
+ cd $${d%/*}/..; \
+ debian/get-orig-source.sh $(CURDIR)
+
+.PHONY: override_dh_auto_build override_dh_auto_clean override_dh_installchangelogs get-orig-source
diff --git a/debian/source/format b/debian/source/format
new file mode 100644
index 0000000..163aaf8
--- /dev/null
+++ b/debian/source/format
@@ -0,0 +1 @@
+3.0 (quilt)
diff --git a/debian/watch b/debian/watch
index 9e7c0da..dc38551 100644
--- a/debian/watch
+++ b/debian/watch
@@ -1 +1,3 @@
version=3
+
+opts=filenamemangle=s/.*\/(.*)$/python-reconfigure-$1/ https://github.com/Eugeny/reconfigure/tags /Eugeny/reconfigure/archive/(\d.*).tar.gz
diff --git a/docs/source/index.rst b/docs/source/index.rst
index eea3a8a..b7e425b 100644
--- a/docs/source/index.rst
+++ b/docs/source/index.rst
@@ -15,9 +15,6 @@ Links:
`Browse API on SourceGraph <https://sourcegraph.com/github.com/Eugeny/reconfigure/tree>`_
-.. image:: https://sourcegraph.com/api/repos/github.com/Eugeny/reconfigure/badges/funcs.png
-.. image:: https://sourcegraph.com/api/repos/github.com/Eugeny/reconfigure/badges/status.png
-
Contents:
---------
diff --git a/reconfigure/parsers/ini.py b/reconfigure/parsers/ini.py
index 851bfb8..3761db5 100644
--- a/reconfigure/parsers/ini.py
+++ b/reconfigure/parsers/ini.py
@@ -2,7 +2,7 @@ import sys
from reconfigure.nodes import *
from reconfigure.parsers import BaseParser
-from reconfigure.parsers.iniparse import INIConfig
+from iniparse import INIConfig
try:
from StringIO import StringIO