[Python-modules-commits] [importmagic] 02/02: Initial packaging (Closes: 872183)

Diane Trout diane at moszumanska.debian.org
Fri Aug 18 17:41:23 UTC 2017


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

diane pushed a commit to branch debian/master
in repository importmagic.

commit 4db119f45f86c208be5361464738700e5a56e9ca
Author: Diane Trout <diane at ghic.org>
Date:   Thu Aug 17 21:04:50 2017 -0700

    Initial packaging (Closes: 872183)
---
 debian/changelog                        |  5 +++
 debian/compat                           |  1 +
 debian/control                          | 27 +++++++++++++
 debian/copyright                        | 59 ++++++++++++++++++++++++++++
 debian/files                            |  1 +
 debian/gbp.conf                         |  6 +++
 debian/patches/look-for-test-data.patch | 18 +++++++++
 debian/patches/series                   |  2 +
 debian/patches/use-debian-six.patch     | 68 +++++++++++++++++++++++++++++++++
 debian/rules                            | 11 ++++++
 debian/source/format                    |  1 +
 debian/source/options                   |  1 +
 debian/tests/control                    | 12 ++++++
 debian/watch                            |  4 ++
 14 files changed, 216 insertions(+)

diff --git a/debian/changelog b/debian/changelog
new file mode 100644
index 0000000..4a31fa5
--- /dev/null
+++ b/debian/changelog
@@ -0,0 +1,5 @@
+importmagic (0.1.7-1) unstable; urgency=low
+
+  * Initial packaging (Closes: #872183)
+
+ -- Diane Trout <diane at ghic.org>  Mon, 14 Aug 2017 21:09:33 -0700
diff --git a/debian/compat b/debian/compat
new file mode 100644
index 0000000..ec63514
--- /dev/null
+++ b/debian/compat
@@ -0,0 +1 @@
+9
diff --git a/debian/control b/debian/control
new file mode 100644
index 0000000..a7439f2
--- /dev/null
+++ b/debian/control
@@ -0,0 +1,27 @@
+Source: importmagic
+Maintainer: Debian Python Modules Team <python-modules-team at lists.alioth.debian.org>
+Uploaders: Diane Trout <diane at ghic.org>
+Section: python
+Priority: optional
+Build-Depends: debhelper (>= 9),
+               dh-python,
+               python3-all,
+               python3-setuptools,
+               python3-six
+Standards-Version: 4.0.1
+Vcs-Git: https://anonscm.debian.org/git/python-modules/packages/importmagic.git
+Vcs-Browser: https://anonscm.debian.org/git/python-modules/packages/importmagic.git
+Homepage: http://github.com/alecthomas/importmagic
+
+Package: python3-importmagic
+Architecture: all
+Depends: ${misc:Depends}, ${python3:Depends}
+Description: automagically add, remove and manage Python 3 imports
+ The goal of this package is to be able to automatically manage
+ imports in Python. To that end it can:
+   * Build an index of all known symbols in all packages.
+   * Find unresolved references in source, and resolve them against the
+     index, effectively automating imports.
+   * Automatically arrange imports according to PEP8.
+ .
+ This contains the Python 3 version
diff --git a/debian/copyright b/debian/copyright
new file mode 100644
index 0000000..7cef7e0
--- /dev/null
+++ b/debian/copyright
@@ -0,0 +1,59 @@
+Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
+Upstream-Name: importmagic
+Upstream-Contact: Alec Thomas <alec at swapoff.org>
+Source: https://github.com/alecthomas/importmagic
+
+Files: *
+Copyright: (c) 2014, 2015, Alec Thomas
+License: BSD-2
+  All rights reserved.
+  .
+  Redistribution and use in source and binary forms, with or without
+  modification, are permitted provided that the following conditions are met:
+  .
+  * Redistributions of source code must retain the above copyright notice, this
+    list of conditions and the following disclaimer.
+  .
+  * Redistributions in binary form must reproduce the above copyright notice,
+    this list of conditions and the following disclaimer in the documentation
+    and/or other materials provided with the distribution.
+  .
+  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+  AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+  IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+  DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
+  FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+  DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+  SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+  CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+  OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+  OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+Files: ./importmagic/six.py
+Copyright: 2010-2014, Benjamin Peterson
+License: Expat
+
+Files: debian/*
+Copyright: Diane Trout <diane at ghic.org>
+License: Expat
+
+License: Expat
+ 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/files b/debian/files
new file mode 100644
index 0000000..c726c6c
--- /dev/null
+++ b/debian/files
@@ -0,0 +1 @@
+importmagic_0.1.7-1_source.buildinfo python optional
diff --git a/debian/gbp.conf b/debian/gbp.conf
new file mode 100644
index 0000000..625fdba
--- /dev/null
+++ b/debian/gbp.conf
@@ -0,0 +1,6 @@
+[DEFAULT]
+debian-branch=debian/master
+upstream-branch = upstream
+upstream-tag = upstream/%(version)s
+debian-tag = debian/%(version)s
+sign-tags = True
diff --git a/debian/patches/look-for-test-data.patch b/debian/patches/look-for-test-data.patch
new file mode 100644
index 0000000..e67fa1c
--- /dev/null
+++ b/debian/patches/look-for-test-data.patch
@@ -0,0 +1,18 @@
+Author: Diane Trout <diane at ghic.org>
+Description: Look for the large test file that's not being installed
+ in the current directory, instead of the source module directory.
+ the autopkgtest runner will copy it out of the source tree into the
+ right place.
+
+--- a/importmagic/conftest.py
++++ b/importmagic/conftest.py
+@@ -7,6 +7,8 @@
+ 
+ @pytest.fixture(scope='session')
+ def index(request):
+-    dir = os.path.dirname(__file__)
++    #dir = os.path.dirname(__file__)
++    # On Debian the test file will be copied to a local directory
++    dir = os.getcwd()
+     with open(os.path.join(dir, 'test_index.json')) as fd:
+         return SymbolIndex.deserialize(fd)
diff --git a/debian/patches/series b/debian/patches/series
new file mode 100644
index 0000000..64eba27
--- /dev/null
+++ b/debian/patches/series
@@ -0,0 +1,2 @@
+use-debian-six.patch
+look-for-test-data.patch
diff --git a/debian/patches/use-debian-six.patch b/debian/patches/use-debian-six.patch
new file mode 100644
index 0000000..d996ed5
--- /dev/null
+++ b/debian/patches/use-debian-six.patch
@@ -0,0 +1,68 @@
+Author: Diane Trout <diane at ghic.org>
+Subject: Bring importmagic into compliance with Debian policy.
+ (Use locally installed copy of six instead of embedded convience copy)
+
+--- a/importmagic/util.py
++++ b/importmagic/util.py
+@@ -3,7 +3,7 @@
+ import sys
+ from ast import AST, iter_fields
+ 
+-from importmagic.six import text_type
++from six import text_type
+ 
+ 
+ CODING_COOKIE_RE = re.compile('(^\s*#.*)coding[:=]', re.M)
+--- a/setup.py
++++ b/setup.py
+@@ -38,6 +38,7 @@
+     author_email='alec at swapoff.org',
+     install_requires=[
+         'setuptools >= 0.6b1',
++        'six',
+     ],
+     cmdclass={'test': PyTest},
+ )
+--- a/importmagic/importer.py
++++ b/importmagic/importer.py
+@@ -3,7 +3,7 @@
+ import tokenize
+ from collections import defaultdict
+ 
+-from importmagic.six import StringIO
++from six import StringIO
+ 
+ 
+ class Iterator(object):
+--- a/importmagic/index_test.py
++++ b/importmagic/index_test.py
+@@ -5,7 +5,7 @@
+ from textwrap import dedent
+ 
+ from importmagic.index import SymbolIndex
+-from importmagic.six import b
++from six import b
+ 
+ 
+ def serialize(tree):
+--- a/importmagic/symbols.py
++++ b/importmagic/symbols.py
+@@ -5,7 +5,7 @@
+ from contextlib import contextmanager
+ from itertools import chain
+ 
+-from importmagic.six import string_types
++from six import string_types
+ from importmagic.util import parse_ast
+ 
+ 
+--- a/importmagic/symbols_test.py
++++ b/importmagic/symbols_test.py
+@@ -1,6 +1,6 @@
+ from textwrap import dedent
+ 
+-from importmagic.six import u
++from six import u
+ from importmagic.symbols import Scope, _symbol_series
+ 
+ 
diff --git a/debian/rules b/debian/rules
new file mode 100755
index 0000000..60c2393
--- /dev/null
+++ b/debian/rules
@@ -0,0 +1,11 @@
+#!/usr/bin/make -f
+
+# This file was automatically generated by stdeb 0.8.5 at
+# Mon, 14 Aug 2017 21:09:33 -0700
+export PYBUILD_NAME=importmagic
+%:
+	dh $@ --with python3 --buildsystem=pybuild
+
+override_dh_auto_install:
+	dh_auto_install
+	rm debian/python*-importmagic/usr/lib/python*/dist-packages/importmagic/six.py
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/options b/debian/source/options
new file mode 100644
index 0000000..b2b7b88
--- /dev/null
+++ b/debian/source/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..2764afb
--- /dev/null
+++ b/debian/tests/control
@@ -0,0 +1,12 @@
+Test-Command: set -e
+ ; cp "importmagic/test_index.json" $AUTOPKGTEST_TMP
+ ; for py in $(py3versions -r 2>/dev/null)
+ ; do cd "$AUTOPKGTEST_TMP"
+ ; echo "Testing with $py in :$(pwd)"
+ ; $py -m pytest -v --pyargs importmagic
+ ; done
+Depends: python3-all,
+         python3-importmagic,
+         python3-pytest
+
+
diff --git a/debian/watch b/debian/watch
new file mode 100644
index 0000000..cf5cb98
--- /dev/null
+++ b/debian/watch
@@ -0,0 +1,4 @@
+# please also check http://pypi.debian.net/importmagic/watch
+version=3
+opts=uversionmangle=s/(rc|a|b|c)/~$1/ \
+http://pypi.debian.net/importmagic/importmagic-(.+)\.(?:zip|tgz|tbz|txz|(?:tar\.(?:gz|bz2|xz)))
\ No newline at end of file

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



More information about the Python-modules-commits mailing list