[Python-modules-commits] [python-ordered-set] 02/03: Initial debianisation
Ghislain Vaillant
ghisvail-guest at moszumanska.debian.org
Thu Apr 20 21:35:41 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-ordered-set.
commit 85ea5b3130707058371d7008e815f806a0b2634f
Author: Ghislain Antony Vaillant <ghisvail at gmail.com>
Date: Wed Apr 19 21:40:39 2017 +0100
Initial debianisation
---
debian/changelog | 5 +++
debian/compat | 1 +
debian/control | 39 +++++++++++++++++
debian/copyright | 32 ++++++++++++++
debian/gbp.conf | 7 +++
debian/patches/Use-pytest.patch | 97 +++++++++++++++++++++++++++++++++++++++++
debian/patches/series | 1 +
debian/rules | 14 ++++++
debian/source/format | 1 +
debian/source/local-options | 1 +
debian/tests/control | 18 ++++++++
debian/watch | 3 ++
12 files changed, 219 insertions(+)
diff --git a/debian/changelog b/debian/changelog
new file mode 100644
index 0000000..5320cf6
--- /dev/null
+++ b/debian/changelog
@@ -0,0 +1,5 @@
+python-ordered-set (2.0.2-1) UNRELEASED; urgency=low
+
+ * Initial release. (Closes: #860768)
+
+ -- Ghislain Antony Vaillant <ghisvail at gmail.com> Wed, 19 Apr 2017 14:31:12 +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..fb1399b
--- /dev/null
+++ b/debian/control
@@ -0,0 +1,39 @@
+Source: python-ordered-set
+Maintainer: Debian Python Modules Team <python-modules-team 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),
+ pypy,
+ pypy-pytest <!nocheck>,
+ pypy-setuptools,
+ python3-all,
+ python3-pytest <!nocheck>,
+ python3-setuptools
+Standards-Version: 3.9.8
+Vcs-Browser: https://anonscm.debian.org/git/python-modules/packages/python-ordered-set.git
+Vcs-Git: https://anonscm.debian.org/git/python-modules/packages/python-ordered-set.git
+Homepage: https://github.com/LuminosoInsight/ordered-set
+X-Python3-Version: >= 3.3
+
+Package: python3-ordered-set
+Architecture: all
+Depends: ${misc:Depends},
+ ${python3:Depends}
+Description: ordered set implementation for Python 3
+ Pure Python implementation of an ordered set: a mutable set which keeps the
+ order of insertion of its elements.
+ .
+ This package provides the modules for Python 3.
+
+Package: pypy-ordered-set
+Architecture: all
+Depends: ${misc:Depends},
+ ${pypy:Depends}
+Description: ordered set implementation for PyPy
+ Pure Python implementation of an ordered set: a mutable set which keeps the
+ order of insertion of its elements.
+ .
+ This package provides the modules for PyPy.
diff --git a/debian/copyright b/debian/copyright
new file mode 100644
index 0000000..46f1141
--- /dev/null
+++ b/debian/copyright
@@ -0,0 +1,32 @@
+Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
+Upstream-Name: ordered-set
+Source: https://pypi.python.org/pypi/ordered-set
+
+Files: *
+Copyright: 2013 Luminoso Technologies, Inc.
+License: Expat
+
+Files: debian/*
+Copyright: 2017 Ghislain Antony Vaillant <ghisvail at gmail.com>
+License: Expat
+
+License: Expat
+ The MIT License
+ .
+ Permission is hereby granted, free of charge, to any person obtaining a copy
+ of this software and associated documentation files (the "Software"), to deal
+ in the Software without restriction, including without limitation the rights to
+ use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
+ of the Software, and to permit persons to whom the Software is furnished to do
+ so, subject to the following conditions:
+ .
+ The above copyright notice and this permission notice shall be included in all
+ copies or substantial portions of the Software.
+ .
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+ SOFTWARE.
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/Use-pytest.patch b/debian/patches/Use-pytest.patch
new file mode 100644
index 0000000..5445195
--- /dev/null
+++ b/debian/patches/Use-pytest.patch
@@ -0,0 +1,97 @@
+From: Ghislain Antony Vaillant <ghisvail at gmail.com>
+Date: Thu, 20 Apr 2017 22:13:31 +0100
+Subject: Use pytest
+
+---
+ test.py | 39 ++++++++++++++++++++-------------------
+ 1 file changed, 20 insertions(+), 19 deletions(-)
+
+diff --git a/test.py b/test.py
+index db84db3..f906b3a 100644
+--- a/test.py
++++ b/test.py
+@@ -1,4 +1,4 @@
+-from nose.tools import eq_, raises, assert_raises
++from pytest import raises
+ from ordered_set import OrderedSet
+ import pickle
+
+@@ -17,9 +17,9 @@ def test_empty_pickle():
+
+ def test_order():
+ set1 = OrderedSet('abracadabra')
+- eq_(len(set1), 5)
+- eq_(set1, OrderedSet(['a', 'b', 'r', 'c', 'd']))
+- eq_(list(reversed(set1)), ['d', 'c', 'r', 'b', 'a'])
++ assert len(set1) == 5
++ assert set1 == OrderedSet(['a', 'b', 'r', 'c', 'd'])
++ assert list(reversed(set1)) == ['d', 'c', 'r', 'b', 'a']
+
+
+ def test_binary_operations():
+@@ -27,22 +27,22 @@ def test_binary_operations():
+ set2 = OrderedSet('simsalabim')
+ assert set1 != set2
+
+- eq_(set1 & set2, OrderedSet(['a', 'b']))
+- eq_(set1 | set2, OrderedSet(['a', 'b', 'r', 'c', 'd', 's', 'i', 'm', 'l']))
+- eq_(set1 - set2, OrderedSet(['r', 'c', 'd']))
++ assert set1 & set2 == OrderedSet(['a', 'b'])
++ assert set1 | set2 == OrderedSet(['a', 'b', 'r', 'c', 'd', 's', 'i', 'm', 'l'])
++ assert set1 - set2 == OrderedSet(['r', 'c', 'd'])
+
+
+ def test_indexing():
+ set1 = OrderedSet('abracadabra')
+- eq_(set1[:], set1)
+- eq_(set1.copy(), set1)
++ assert set1[:] == set1
++ assert set1.copy() == set1
+ assert set1[:] is set1
+ assert set1.copy() is not set1
+
+- eq_(set1[[1, 2]], OrderedSet(['b', 'r']))
+- eq_(set1[1:3], OrderedSet(['b', 'r']))
+- eq_(set1.index('b'), 1)
+- eq_(set1.index(['b', 'r']), [1, 2])
++ assert set1[[1, 2]] == OrderedSet(['b', 'r'])
++ assert set1[1:3] == OrderedSet(['b', 'r'])
++ assert set1.index('b') == 1
++ assert set1.index(['b', 'r']) == [1, 2]
+ try:
+ set1.index('br')
+ assert False, "Looking up a nonexistent key should be a KeyError"
+@@ -54,8 +54,8 @@ def test_tuples():
+ set1 = OrderedSet()
+ tup = ('tuple', 1)
+ set1.add(tup)
+- eq_(set1.index(tup), 0)
+- eq_(set1[0], tup)
++ assert set1.index(tup) == 0
++ assert set1[0] == tup
+
+
+ def test_remove():
+@@ -83,11 +83,11 @@ def test_remove():
+ set1.discard('a')
+
+
+- at raises(KeyError)
+ def test_remove_error():
+ # If we .remove() an element that's not there, we get a KeyError
+- set1 = OrderedSet('abracadabra')
+- set1.remove('z')
++ with raises(KeyError):
++ set1 = OrderedSet('abracadabra')
++ set1.remove('z')
+
+
+ def test_clear():
+@@ -122,5 +122,6 @@ def test_pop():
+
+ assert elem == 'a'
+
+- assert_raises(KeyError, set1.pop)
++ with raises(KeyError):
++ set1.pop()
+
diff --git a/debian/patches/series b/debian/patches/series
new file mode 100644
index 0000000..cf5983b
--- /dev/null
+++ b/debian/patches/series
@@ -0,0 +1 @@
+Use-pytest.patch
diff --git a/debian/rules b/debian/rules
new file mode 100755
index 0000000..61c1b73
--- /dev/null
+++ b/debian/rules
@@ -0,0 +1,14 @@
+#!/usr/bin/make -f
+
+# Uncomment this to turn on verbose mode.
+#export DH_VERBOSE = 1
+
+export PYBUILD_NAME = ordered-set
+ifneq (,$(findstring nocheck,$(DEB_BUILD_PROFILES)))
+export PYBUILD_DISABLE = test
+else
+export PYBUILD_TEST_ARGS = {dir}/test.py
+endif
+
+%:
+ dh $@ --with python3,pypy --buildsystem=pybuild
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..a8f9221
--- /dev/null
+++ b/debian/tests/control
@@ -0,0 +1,18 @@
+Test-Command: set -e
+ ; cp test.py "$AUTOPKGTEST_TMP"
+ ; for py in $(py3versions -r 2>/dev/null)
+ ; do cd "$AUTOPKGTEST_TMP"
+ ; echo "Testing with $py:"
+ ; $py -m pytest -v test.py
+ ; done
+Depends: python3-all,
+ python3-ordered-set,
+ python3-pytest
+
+Test-Command: set -e
+ ; cp test.py "$AUTOPKGTEST_TMP"
+ ; cd "$AUTOPKGTEST_TMP"
+ ; echo "Testing with pypy:"
+ ; pypy -m pytest -v test.py
+Depends: pypy-ordered-set,
+ pypy-pytest
diff --git a/debian/watch b/debian/watch
new file mode 100644
index 0000000..ff2cf31
--- /dev/null
+++ b/debian/watch
@@ -0,0 +1,3 @@
+version=4
+opts=uversionmangle=s/(rc|a|b|c)/~$1/ \
+https://pypi.debian.net/ordered-set/ordered-set@ANY_VERSION@@ARCHIVE_EXT@
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/python-modules/packages/python-ordered-set.git
More information about the Python-modules-commits
mailing list