[python-pyepsg] 01/02: Initial debianisation

Ghislain Vaillant ghisvail-guest at moszumanska.debian.org
Fri May 26 10:53:08 UTC 2017


This is an automated email from the git hooks/post-receive script.

ghisvail-guest pushed a commit to branch master
in repository python-pyepsg.

commit d2d3573fcf2aef7ebe4bb27029cc31eba220d941
Author: Ghislain Antony Vaillant <ghisvail at gmail.com>
Date:   Thu May 25 11:31:53 2017 +0100

    Initial debianisation
---
 debian/changelog                              |  5 ++
 debian/compat                                 |  1 +
 debian/control                                | 72 +++++++++++++++++++++++++++
 debian/copyright                              | 20 ++++++++
 debian/gbp.conf                               |  7 +++
 debian/patches/Add-install-requirements.patch | 20 ++++++++
 debian/patches/Fix-the-test-suite.patch       | 67 +++++++++++++++++++++++++
 debian/patches/series                         |  2 +
 debian/python-pyepsg-doc.doc-base             |  9 ++++
 debian/python-pyepsg-doc.docs                 |  1 +
 debian/rules                                  | 24 +++++++++
 debian/source/format                          |  1 +
 debian/source/local-options                   |  1 +
 debian/tests/control                          | 19 +++++++
 debian/watch                                  |  3 ++
 15 files changed, 252 insertions(+)

diff --git a/debian/changelog b/debian/changelog
new file mode 100644
index 0000000..2ea0b83
--- /dev/null
+++ b/debian/changelog
@@ -0,0 +1,5 @@
+python-pyepsg (0.3.1-1) UNRELEASED; urgency=low
+
+  * Initial release. (Closes: #863305)
+
+ -- Ghislain Antony Vaillant <ghisvail at gmail.com>  Thu, 25 May 2017 10:51:22 +0100
diff --git a/debian/compat b/debian/compat
new file mode 100644
index 0000000..f599e28
--- /dev/null
+++ b/debian/compat
@@ -0,0 +1 @@
+10
diff --git a/debian/control b/debian/control
new file mode 100644
index 0000000..d638c9c
--- /dev/null
+++ b/debian/control
@@ -0,0 +1,72 @@
+Source: python-pyepsg
+Maintainer: Debian Science Maintainers <debian-science-maintainers at lists.alioth.debian.org>
+Uploaders: Ghislain Antony Vaillant <ghisvail at gmail.com>
+Section: python
+Priority: optional
+Build-Depends: debhelper (>= 10),
+               dh-python,
+               dpkg-dev (>= 1.17.14),
+               python-all,
+               python-setuptools,
+               python3-all,
+               python3-setuptools,
+               python3-sphinx <!nodoc>,
+               sphinx-common
+Standards-Version: 3.9.8
+Vcs-Browser: https://anonscm.debian.org/git/debian-science/packages/python-pyepsg.git
+Vcs-Git: https://anonscm.debian.org/git/debian-science/packages/python-pyepsg.git
+Homepage: https://github.com/rhattersley/pyepsg
+X-Python3-Version: >= 3.3
+
+Package: python-pyepsg
+Architecture: all
+Depends: ${misc:Depends},
+         ${python:Depends}
+Suggests: python-pyepsg-doc <!nodoc>
+Description: easy access to the EPSG database (Python 2)
+ A simple interface to EPSG.io (https://epsg.io/).
+ .
+ EPSG.io simplifies the discovery of coordinate reference systems
+ utilized all over the world for creating maps and geodata and for
+ identifying geo-position. It is a practical tool for anybody interested
+ in cartography and digital map making, who needs to know exact latitude
+ and longitude values for numerical coordinates in different spatial
+ reference systems.
+ .
+ This package provides the modules for Python 2.
+
+Package: python3-pyepsg
+Architecture: all
+Depends: ${misc:Depends},
+         ${python3:Depends}
+Suggests: python-pyepsg-doc <!nodoc>
+Description: easy access to the EPSG database (Python 3)
+ A simple interface to EPSG.io (https://epsg.io/).
+ .
+ EPSG.io simplifies the discovery of coordinate reference systems
+ utilized all over the world for creating maps and geodata and for
+ identifying geo-position. It is a practical tool for anybody interested
+ in cartography and digital map making, who needs to know exact latitude
+ and longitude values for numerical coordinates in different spatial
+ reference systems.
+ .
+ This package provides the modules for Python 3.
+
+Package: python-pyepsg-doc
+Architecture: all
+Section: doc
+Depends: ${misc:Depends},
+         ${sphinxdoc:Depends}
+Built-Using: ${sphinxdoc:Built-Using}
+Description: documentation for pyepsg
+ A simple interface to EPSG.io (https://epsg.io/).
+ .
+ EPSG.io simplifies the discovery of coordinate reference systems
+ utilized all over the world for creating maps and geodata and for
+ identifying geo-position. It is a practical tool for anybody interested
+ in cartography and digital map making, who needs to know exact latitude
+ and longitude values for numerical coordinates in different spatial
+ reference systems.
+ .
+ This package provides the documentation.
+Build-Profiles: <!nodoc>
diff --git a/debian/copyright b/debian/copyright
new file mode 100644
index 0000000..b29d118
--- /dev/null
+++ b/debian/copyright
@@ -0,0 +1,20 @@
+Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
+Upstream-Name: pyepsg
+Source: https://pypi.python.org/pypi/pyepsg
+
+Files: *
+Copyright: British Crown Copyright 2014, Met Office
+License: LGPL-3+
+
+Files: debian/*
+Copyright: 2017 Ghislain Antony Vaillant <ghisvail at gmail.com>
+License: LGPL-3+
+
+License: LGPL-3+
+ This program 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; version 3 of the License, or (at
+ your option) any later version.
+ .
+ On Debian systems, the complete text of version 3 of the GNU Lesser
+ General Public License can be found in `/usr/share/common-licenses/LGPL-3'.
diff --git a/debian/gbp.conf b/debian/gbp.conf
new file mode 100644
index 0000000..f53906f
--- /dev/null
+++ b/debian/gbp.conf
@@ -0,0 +1,7 @@
+[DEFAULT]
+upstream-branch = upstream
+debian-branch = master
+upstream-tag = upstream/%(version)s
+debian-tag = debian/%(version)s
+sign-tags = True
+pristine-tar = True
diff --git a/debian/patches/Add-install-requirements.patch b/debian/patches/Add-install-requirements.patch
new file mode 100644
index 0000000..dbd6818
--- /dev/null
+++ b/debian/patches/Add-install-requirements.patch
@@ -0,0 +1,20 @@
+From: Ghislain Antony Vaillant <ghisvail at users.noreply.github.com>
+Date: Thu, 25 May 2017 14:22:21 +0100
+Subject: Add install requirements
+
+---
+ setup.py | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/setup.py b/setup.py
+index 6860bbc..60466ef 100644
+--- a/setup.py
++++ b/setup.py
+@@ -33,6 +33,6 @@ setup(
+                  'Topic :: Scientific/Engineering :: GIS'],
+     description='Easy access to the EPSG database via http://epsg.io/',
+     long_description=open('README.rst').read(),
+-
++    install_requires=['requests'],
+     py_modules=['pyepsg'],
+ )
diff --git a/debian/patches/Fix-the-test-suite.patch b/debian/patches/Fix-the-test-suite.patch
new file mode 100644
index 0000000..8c362ea
--- /dev/null
+++ b/debian/patches/Fix-the-test-suite.patch
@@ -0,0 +1,67 @@
+From: Ghislain Antony Vaillant <ghisvail at gmail.com>
+Date: Thu, 25 May 2017 14:15:29 +0100
+Subject: Fix the test suite
+
+This is a squash commit of the following pull requests:
+- https://github.com/rhattersley/pyepsg/pull/6
+- https://github.com/rhattersley/pyepsg/pull/7
+---
+ pyepsg.py | 25 ++++++++++++-------------
+ 1 file changed, 12 insertions(+), 13 deletions(-)
+
+diff --git a/pyepsg.py b/pyepsg.py
+index 658c5e7..466f119 100644
+--- a/pyepsg.py
++++ b/pyepsg.py
+@@ -189,31 +189,30 @@ class CRS(EPSG):
+         For example::
+ 
+             >>> print(get(21781).domain_of_validity())
+-            [5.97, 10.49, 45.83, 47.81]
++            [5.96, 10.49, 45.82, 47.81]
+ 
+ 
+         """
+-        # TODO: Check for gmd:EX_GeographicBoundingBox and blow up otherwise.
+         # TODO: Generalise interface to return a polygon? (Can we find
+         # something that uses a polygon instead?)
+         domain = self.element.find(GML_NS + 'domainOfValidity')
+         domain_href = domain.attrib[XLINK_NS + 'href']
+         url = '{prefix}{code}.gml?download'.format(prefix=EPSG_IO_URL,
+                                                    code=domain_href)
+-        xml = requests.get(url).text
+-        gml = ET.fromstring(xml.encode('UTF-8'))
++        xml = requests.get(url).content
++        gml = ET.fromstring(xml)
+ 
+-        def extract_bound(i, tag):
+-            # TODO: Figure out if this is our problem or ET's.
+-            # `find` isn't returning anything :(
+-            # ns = '{http://www.isotc211.org/2005/gmd}'
+-            # bound = gml.find(ns + tag)
+-            bound = gml[1][0][1][0][i]
+-            return float(bound[0].text)
++        def extract_bound(tag):
++            ns = '{http://www.isotc211.org/2005/gmd}'
++            xpath = './/{ns}EX_GeographicBoundingBox/{ns}{tag}/'.format(
++                ns=ns,
++                tag=tag)
++            bound = gml.find(xpath)
++            return float(bound.text)
+ 
+         tags = ('westBoundLongitude', 'eastBoundLongitude',
+                 'southBoundLatitude', 'northBoundLatitude')
+-        bounds = [extract_bound(i, tag) for i, tag in enumerate(tags)]
++        bounds = [extract_bound(tag) for tag in tags]
+         return bounds
+ 
+ 
+@@ -272,7 +271,7 @@ def get(code):
+     if instance is None:
+         url = '{prefix}{code}.gml?download'.format(prefix=EPSG_IO_URL,
+                                                    code=code)
+-        xml = requests.get(url).text
++        xml = requests.get(url).content
+         root = ET.fromstring(xml)
+         class_for_tag = {
+             GML_NS + 'CartesianCS': CartesianCS,
diff --git a/debian/patches/series b/debian/patches/series
new file mode 100644
index 0000000..0928c71
--- /dev/null
+++ b/debian/patches/series
@@ -0,0 +1,2 @@
+Fix-the-test-suite.patch
+Add-install-requirements.patch
diff --git a/debian/python-pyepsg-doc.doc-base b/debian/python-pyepsg-doc.doc-base
new file mode 100644
index 0000000..1b24b0c
--- /dev/null
+++ b/debian/python-pyepsg-doc.doc-base
@@ -0,0 +1,9 @@
+Document: python-pyepsg-doc
+Title: pyepsg Documentation
+Author: Richard Hattersley
+Abstract: This is the reference documentation for pyepsg.
+Section: Programming/Python
+
+Format: HTML
+Index: /usr/share/doc/python-pyepsg-doc/html/index.html
+Files: /usr/share/doc/python-pyepsg-doc/html/*.html
diff --git a/debian/python-pyepsg-doc.docs b/debian/python-pyepsg-doc.docs
new file mode 100644
index 0000000..4ecc793
--- /dev/null
+++ b/debian/python-pyepsg-doc.docs
@@ -0,0 +1 @@
+docs/_build/html
diff --git a/debian/rules b/debian/rules
new file mode 100755
index 0000000..a8b43a9
--- /dev/null
+++ b/debian/rules
@@ -0,0 +1,24 @@
+#!/usr/bin/make -f
+
+# Uncomment this to turn on verbose mode.
+#export DH_VERBOSE = 1
+
+export PYBUILD_NAME = pyepsg
+export PYBUILD_DISABLE = test
+
+%:
+	dh $@ --with python2,python3,sphinxdoc --buildsystem=pybuild
+
+override_dh_auto_clean:
+	dh_auto_clean
+ifeq (,$(findstring nodoc,$(DEB_BUILD_PROFILES)))
+	$(MAKE) -C docs clean
+endif
+
+override_dh_auto_build: export http_proxy=127.0.0.1:9
+override_dh_auto_build: export https_proxy=127.0.0.1:9
+override_dh_auto_build:
+	dh_auto_build
+ifeq (,$(findstring nodoc,$(DEB_BUILD_PROFILES)))
+	PYTHONPATH=$(CURDIR) $(MAKE) -C docs html
+endif
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/source/local-options b/debian/source/local-options
new file mode 100644
index 0000000..b2b7b88
--- /dev/null
+++ b/debian/source/local-options
@@ -0,0 +1 @@
+extend-diff-ignore="^[^/]+\.egg-info/"
diff --git a/debian/tests/control b/debian/tests/control
new file mode 100644
index 0000000..cd1046b
--- /dev/null
+++ b/debian/tests/control
@@ -0,0 +1,19 @@
+Test-Command: set -e
+ ; for py in $(pyversions -r 2>/dev/null)
+ ; do cd "$AUTOPKGTEST_TMP"
+ ; echo "Testing with $py:"
+ ; $py -m pytest -v --doctest-modules --pyargs pyepsg
+ ; done
+Depends: python-all,
+         python-pyepsg,
+         python-pytest
+
+Test-Command: set -e
+ ; for py in $(py3versions -r 2>/dev/null)
+ ; do cd "$AUTOPKGTEST_TMP"
+ ; echo "Testing with $py:"
+ ; $py -m pytest -v --doctest-modules --pyargs pyepsg
+ ; done
+Depends: python3-all,
+         python3-pyepsg,
+         python3-pytest
diff --git a/debian/watch b/debian/watch
new file mode 100644
index 0000000..983a611
--- /dev/null
+++ b/debian/watch
@@ -0,0 +1,3 @@
+version=4
+opts=uversionmangle=s/(rc|a|b|c)/~$1/ \
+https://pypi.debian.net/pyepsg/pyepsg@ANY_VERSION@@ARCHIVE_EXT@

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-science/packages/python-pyepsg.git



More information about the debian-science-commits mailing list