Codebase list setuptools-scm / 3841037
Repackage an old version since the Python 2 version is still needed Julien Puydt 4 years ago
7 changed file(s) with 77 addition(s) and 9 deletion(s). Raw diff Collapse all Expand all
0 setuptools-scm (3.4.3+really3.3.3-1) UNRELEASED; urgency=medium
1
2 * Re-upload an old version since the Python 2 version is
3 still needed.
4
5 -- Julien Puydt <jpuydt@debian.org> Fri, 31 Jan 2020 22:39:11 +0100
6
07 setuptools-scm (3.4.3-1) unstable; urgency=medium
18
29 * Document the patch was forwarded and is from me.
88 dh-python,
99 git,
1010 mercurial,
11 python,
12 python-py,
13 python-pytest,
14 python-setuptools,
1115 python3-all,
1216 python3-py,
1317 python3-pytest,
1620 Vcs-Git: https://salsa.debian.org/python-team/modules/setuptools-scm.git
1721 Vcs-Browser: https://salsa.debian.org/python-team/modules/setuptools-scm
1822
23 Package: python-setuptools-scm
24 Architecture: all
25 Depends: python-pkg-resources,
26 ${misc:Depends},
27 ${python:Depends}
28 Description: blessed package to manage your versions by scm tags for Python 2
29 setuptools_scm handles managing your Python package versions in scm metadata.
30 It also handles file finders for the suppertes scm's.
31 .
32 This package installs the library for Python 2.
33
1934 Package: python3-setuptools-scm
2035 Architecture: all
2136 Depends: python3-distutils,
2237 python3-pkg-resources,
23 python3-toml,
2438 ${misc:Depends},
2539 ${python3:Depends}
2640 Description: blessed package to manage your versions by scm tags for Python 3
1111
1212 log = logging.getLogger(__name__)
1313
14 @@ -50,6 +51,7 @@
15 return _git_interpret_archive(proc.stdout, toplevel)
16 finally:
17 # ensure we avoid resource warnings by cleaning up the process
18 + proc.stdout.close()
19 proc.terminate()
14 @@ -28,16 +29,16 @@
15
16
17 def _git_interpret_archive(fd, toplevel):
18 - tf = tarfile.open(fileobj=fd, mode="r|*")
19 - git_files = set()
20 - git_dirs = {toplevel}
21 - for member in tf.getmembers():
22 - name = os.path.normcase(member.name).replace("/", os.path.sep)
23 - if member.type == tarfile.DIRTYPE:
24 - git_dirs.add(name)
25 - else:
26 - git_files.add(name)
27 - return git_files, git_dirs
28 + with tarfile.open(fileobj=fd, mode="r|*") as tf:
29 + git_files = set()
30 + git_dirs = {toplevel}
31 + for member in tf.getmembers():
32 + name = os.path.normcase(member.name).replace("/", os.path.sep)
33 + if member.type == tarfile.DIRTYPE:
34 + git_dirs.add(name)
35 + else:
36 + git_files.add(name)
37 + return git_files, git_dirs
38
39
40 def _git_ls_files_and_dirs(toplevel):
41 @@ -46,7 +47,8 @@
42 cmd = ["git", "archive", "--prefix", toplevel + os.path.sep, "HEAD"]
43 proc = subprocess.Popen(cmd, stdout=subprocess.PIPE, cwd=toplevel)
44 try:
45 - return _git_interpret_archive(proc.stdout, toplevel)
46 + with closing(proc.stdout):
47 + return _git_interpret_archive(proc.stdout, toplevel)
2048 except Exception:
2149 if proc.wait() != 0:
50 log.exception("listing git files failed - pretending there aren't any")
66 export SETUPTOOLS_SCM_PRETEND_VERSION=$(DEB_VERSION_UPSTREAM)
77
88 %:
9 dh $@ --with python3,pypy --buildsystem=pybuild
9 dh $@ --with python2,python3 --buildsystem=pybuild
1010
1111 override_dh_auto_test:
1212
1313 override_dh_auto_install:
14 python3 setup.py egg_info
14 python setup.py egg_info
1515 dh_auto_install
22
33 Tests: testsuite
44 Depends: git, mercurial, python3-pytest, python3-setuptools, python3-setuptools-scm
5
6 Tests: import2
7 Depends: python-setuptools-scm
8
9 Tests: testsuite2
10 Depends: git, mercurial, python-pytest, python-setuptools, python-setuptools-scm
0 #!/bin/sh
1
2 set -e
3 python2 -c "import setuptools_scm"
0 #!/bin/sh
1
2 set -e
3 # setuptools_support and test_pip_download: network access is disabled
4 # test_pkg_info_noscmroot and test_use_scm_version_callable: upstream issue #209
5 TESTS_TO_EXCLUDE="not setuptools_support and not test_pip_download"
6 TESTS_TO_EXCLUDE="$TESTS_TO_EXCLUDE and not test_pkginfo_noscmroot and not test_use_scm_version_callable"
7 python2 -m pytest -k "$TESTS_TO_EXCLUDE"