Hello community,
here is the log from the commit of package python-setuptools_scm for openSUSE:Factory checked in at 2018-08-15 10:32:45
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-setuptools_scm (Old)
and /work/SRC/openSUSE:Factory/.python-setuptools_scm.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-setuptools_scm"
Wed Aug 15 10:32:45 2018 rev:16 rq:628792 version:3.1.0
Changes:
--------
--- /work/SRC/openSUSE:Factory/python-setuptools_scm/python-setuptools_scm.changes 2018-08-02 14:56:05.332070556 +0200
+++ /work/SRC/openSUSE:Factory/.python-setuptools_scm.new/python-setuptools_scm.changes 2018-08-15 10:32:49.595685030 +0200
@@ -1,0 +2,19 @@
+Sat Aug 11 16:28:16 UTC 2018 - arun@gmx.de
+
+- update to version 3.1.0:
+ * fix #297 - correct the invocation in version_from_scm and
+ deprecate it as its exposed by accident
+ * fix #298 - handle git file listing on empty repositories
+ * fix #268 - deprecate ScmVersion.extra
+
+-------------------------------------------------------------------
+Wed Aug 8 15:54:22 UTC 2018 - jengelh@inai.de
+
+- Use noun phrase in summary.
+
+-------------------------------------------------------------------
+Tue Aug 7 07:19:37 UTC 2018 - tchvatal@suse.com
+
+- Fix the multibuild code
+
+-------------------------------------------------------------------
Old:
----
setuptools_scm-3.0.6.tar.gz
New:
----
setuptools_scm-3.1.0.tar.gz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ python-setuptools_scm.spec ++++++
--- /var/tmp/diff_new_pack.cFvF8k/_old 2018-08-15 10:32:50.143686021 +0200
+++ /var/tmp/diff_new_pack.cFvF8k/_new 2018-08-15 10:32:50.143686021 +0200
@@ -24,26 +24,30 @@
%else
%bcond_with test
%endif
-Name: python-setuptools_scm
-Version: 3.0.6
+Version: 3.1.0
Release: 0
-Summary: Manage your versions by scm tags
+Summary: Python setuptools handler for SCM tags
License: MIT
Group: Development/Languages/Python
URL: https://github.com/pypa/setuptools_scm
Source: https://files.pythonhosted.org/packages/source/s/setuptools_scm/setuptools_scm-%{version}.tar.gz
BuildRequires: %{python_module setuptools}
+BuildRequires: fdupes
BuildRequires: python-rpm-macros
Requires: python-setuptools
-BuildRequires: fdupes
BuildArch: noarch
%if %{with test}
+Name: python-setuptools_scm-%{flavor}
+%else
+Name: python-setuptools_scm
+%endif
+%if %{with test}
# Testing requirements
BuildRequires: %{python_module pip}
BuildRequires: %{python_module pytest}
+BuildRequires: %{python_module setuptools_scm = %{version}}
BuildRequires: git
BuildRequires: mercurial
-Requires: this-is-only-for-build-envs
%endif
%if 0%{?suse_version} || 0%{?fedora_version} >= 24
Recommends: git
@@ -52,8 +56,8 @@
%python_subpackages
%description
-The setuptools_scm package handles managing your python package versions
-in scm metadata. It also handles file finders for the supperted scm's.
+The setuptools_scm package handles managing one's Python package versions
+in SCM metadata. It also handles file finders for the supperted SCMs.
%prep
%setup -q -n setuptools_scm-%{version}
@@ -62,17 +66,21 @@
%python_build
%install
+%if !%{with test}
%python_install
%python_expand %fdupes %{buildroot}%{$python_sitelib}
+%endif
%if %{with test}
%check
-%python_expand PYTHONPATH=%{buildroot}%{$python_sitelib} py.test-%{$python_bin_suffix} -v -k 'not (test_pip_download or test_old_setuptools_fails or test_old_setuptools_allows_with_warnings or test_distlib_setuptools_works)'
+%python_expand PYTHONPATH=%{$python_sitelib} py.test-%{$python_bin_suffix} -v -k 'not (test_pip_download or test_old_setuptools_fails or test_old_setuptools_allows_with_warnings or test_distlib_setuptools_works)'
%endif
%files %{python_files}
%license LICENSE
+%if !%{with test}
%doc README.rst CHANGELOG.rst
%{python_sitelib}/setuptools_scm*
+%endif
%changelog
++++++ setuptools_scm-3.0.6.tar.gz -> setuptools_scm-3.1.0.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/setuptools_scm-3.0.6/CHANGELOG.rst new/setuptools_scm-3.1.0/CHANGELOG.rst
--- old/setuptools_scm-3.0.6/CHANGELOG.rst 2018-07-31 18:27:39.000000000 +0200
+++ new/setuptools_scm-3.1.0/CHANGELOG.rst 2018-08-09 08:35:22.000000000 +0200
@@ -1,3 +1,10 @@
+v3.1.0
+=======
+
+* fix #297 - correct the invocation in version_from_scm and deprecate it as its exposed by accident
+* fix #298 - handle git file listing on empty repositories
+* fix #268 - deprecate ScmVersion.extra
+
v3.0.6
======
* fix #295 - correctly handle selfinstall from tarballs
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/setuptools_scm-3.0.6/PKG-INFO new/setuptools_scm-3.1.0/PKG-INFO
--- old/setuptools_scm-3.0.6/PKG-INFO 2018-07-31 18:28:10.000000000 +0200
+++ new/setuptools_scm-3.1.0/PKG-INFO 2018-08-09 08:35:58.000000000 +0200
@@ -1,6 +1,6 @@
Metadata-Version: 1.2
Name: setuptools_scm
-Version: 3.0.6
+Version: 3.1.0
Summary: the blessed package to manage your versions by scm tags
Home-page: https://github.com/pypa/setuptools_scm/
Author: Ronny Pfannschmidt
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/setuptools_scm-3.0.6/src/setuptools_scm/__init__.py new/setuptools_scm-3.1.0/src/setuptools_scm/__init__.py
--- old/setuptools_scm-3.0.6/src/setuptools_scm/__init__.py 2018-07-31 18:27:39.000000000 +0200
+++ new/setuptools_scm-3.1.0/src/setuptools_scm/__init__.py 2018-08-09 08:35:22.000000000 +0200
@@ -24,8 +24,14 @@
def version_from_scm(root):
+ warnings.warn(
+ "version_from_scm is deprecated please use get_version",
+ category=DeprecationWarning,
+ )
+ config = Configuration()
+ config.root = root
# TODO: Is it API?
- return _version_from_entrypoint(root, "setuptools_scm.parse_scm")
+ return _version_from_entrypoint(config, "setuptools_scm.parse_scm")
def _call_entrypoint_fn(config, fn):
@@ -35,7 +41,8 @@
warnings.warn(
"parse functions are required to provide a named argument"
" 'config' in the future.",
- PendingDeprecationWarning,
+ category=PendingDeprecationWarning,
+ stacklevel=2,
)
return fn(config.absolute_root)
@@ -71,7 +78,7 @@
if pretended:
# we use meta here since the pretended version
# must adhere to the pep to begin with
- return meta(tag=pretended, preformatted=True)
+ return meta(tag=pretended, preformatted=True, config=config)
if config.parse:
parse_result = _call_entrypoint_fn(config, config.parse)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/setuptools_scm-3.0.6/src/setuptools_scm/file_finder_git.py new/setuptools_scm-3.1.0/src/setuptools_scm/file_finder_git.py
--- old/setuptools_scm-3.0.6/src/setuptools_scm/file_finder_git.py 2018-07-31 18:27:39.000000000 +0200
+++ new/setuptools_scm-3.1.0/src/setuptools_scm/file_finder_git.py 2018-08-09 08:35:22.000000000 +0200
@@ -1,8 +1,11 @@
import os
import subprocess
import tarfile
-
+import logging
from .file_finder import scm_find_files
+from .utils import trace
+
+log = logging.getLogger(__name__)
def _git_toplevel(path):
@@ -14,6 +17,7 @@
universal_newlines=True,
stderr=devnull,
)
+ trace("find files toplevel", out)
return os.path.normcase(os.path.realpath(out.strip()))
except subprocess.CalledProcessError:
# git returned error, we are not in a git repo
@@ -23,12 +27,8 @@
return None
-def _git_ls_files_and_dirs(toplevel):
- # use git archive instead of git ls-file to honor
- # export-ignore git attribute
- cmd = ["git", "archive", "--prefix", toplevel + os.path.sep, "HEAD"]
- proc = subprocess.Popen(cmd, stdout=subprocess.PIPE, cwd=toplevel)
- tf = tarfile.open(fileobj=proc.stdout, mode="r|*")
+def _git_interpret_archive(fd, toplevel):
+ tf = tarfile.open(fileobj=fd, mode="r|*")
git_files = set()
git_dirs = {toplevel}
for member in tf.getmembers():
@@ -40,6 +40,19 @@
return git_files, git_dirs
+def _git_ls_files_and_dirs(toplevel):
+ # use git archive instead of git ls-file to honor
+ # export-ignore git attribute
+ cmd = ["git", "archive", "--prefix", toplevel + os.path.sep, "HEAD"]
+ proc = subprocess.Popen(cmd, stdout=subprocess.PIPE, cwd=toplevel)
+ try:
+ return _git_interpret_archive(proc.stdout, toplevel)
+ except Exception:
+ if proc.wait() != 0:
+ log.exception("listing git files failed - pretending there aren't any")
+ return (), ()
+
+
def git_find_files(path=""):
toplevel = _git_toplevel(path)
if not toplevel:
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/setuptools_scm-3.0.6/src/setuptools_scm/git.py new/setuptools_scm-3.1.0/src/setuptools_scm/git.py
--- old/setuptools_scm-3.0.6/src/setuptools_scm/git.py 2018-07-31 18:27:39.000000000 +0200
+++ new/setuptools_scm-3.1.0/src/setuptools_scm/git.py 2018-08-09 08:35:22.000000000 +0200
@@ -108,7 +108,7 @@
dirty = wd.is_dirty()
if rev_node is None:
- return meta("0.0", distance=0, dirty=dirty)
+ return meta("0.0", distance=0, dirty=dirty, config=config)
return meta(
"0.0",
@@ -116,6 +116,7 @@
node="g" + rev_node,
dirty=dirty,
branch=wd.get_branch(),
+ config=config,
)
else:
tag, number, node, dirty = _git_parse_describe(out)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/setuptools_scm-3.0.6/src/setuptools_scm/hacks.py new/setuptools_scm-3.1.0/src/setuptools_scm/hacks.py
--- old/setuptools_scm-3.0.6/src/setuptools_scm/hacks.py 2018-07-31 18:27:39.000000000 +0200
+++ new/setuptools_scm-3.1.0/src/setuptools_scm/hacks.py 2018-08-09 08:35:22.000000000 +0200
@@ -3,17 +3,17 @@
from .version import meta
-def parse_pkginfo(root):
+def parse_pkginfo(root, config=None):
pkginfo = os.path.join(root, "PKG-INFO")
trace("pkginfo", pkginfo)
data = data_from_mime(pkginfo)
version = data.get("Version")
if version != "UNKNOWN":
- return meta(version, preformatted=True)
+ return meta(version, preformatted=True, config=config)
-def parse_pip_egg_info(root):
+def parse_pip_egg_info(root, config=None):
pipdir = os.path.join(root, "pip-egg-info")
if not os.path.isdir(pipdir):
return
@@ -21,4 +21,4 @@
trace("pip-egg-info", pipdir, items)
if not items:
return
- return parse_pkginfo(os.path.join(pipdir, items[0]))
+ return parse_pkginfo(os.path.join(pipdir, items[0]), config=config)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/setuptools_scm-3.0.6/src/setuptools_scm/hg.py new/setuptools_scm-3.1.0/src/setuptools_scm/hg.py
--- old/setuptools_scm-3.0.6/src/setuptools_scm/hg.py 2018-07-31 18:27:39.000000000 +0200
+++ new/setuptools_scm-3.1.0/src/setuptools_scm/hg.py 2018-08-09 08:35:22.000000000 +0200
@@ -4,7 +4,7 @@
from .version import meta, tags_to_versions
-def _hg_tagdist_normalize_tagcommit(root, tag, dist, node, branch):
+def _hg_tagdist_normalize_tagcommit(config, tag, dist, node, branch):
dirty = node.endswith("+")
node = "h" + node.strip("+")
@@ -19,14 +19,19 @@
tag=tag
)
if tag != "0.0":
- commits = do(["hg", "log", "-r", revset, "--template", "{node|short}"], root)
+ commits = do(
+ ["hg", "log", "-r", revset, "--template", "{node|short}"],
+ config.absolute_root,
+ )
else:
commits = True
trace("normalize", locals())
if commits or dirty:
- return meta(tag, distance=dist, node=node, dirty=dirty, branch=branch)
+ return meta(
+ tag, distance=dist, node=node, dirty=dirty, branch=branch, config=config
+ )
else:
- return meta(tag)
+ return meta(tag, config=config)
def parse(root, config=None):
@@ -40,12 +45,13 @@
return
node = identity_data.pop(0)
branch = identity_data.pop(0)
+ if "tip" in identity_data:
+ # tip is not a real tag
+ identity_data.remove("tip")
tags = tags_to_versions(identity_data)
- # filter tip in degraded mode on old setuptools
- tags = [x for x in tags if x != "tip"]
dirty = node[-1] == "+"
if tags:
- return meta(tags[0], dirty=dirty, branch=branch)
+ return meta(tags[0], dirty=dirty, branch=branch, config=config)
if node.strip("+") == "0" * 12:
trace("initial node", config.absolute_root)
@@ -57,9 +63,7 @@
if tag == "null":
tag = "0.0"
dist = int(dist) + 1
- return _hg_tagdist_normalize_tagcommit(
- config.absolute_root, tag, dist, node, branch
- )
+ return _hg_tagdist_normalize_tagcommit(config, tag, dist, node, branch)
except ValueError:
pass # unpacking failed, old hg
@@ -80,20 +84,25 @@
return len(out.strip().splitlines()) - 1
-def archival_to_version(data):
+def archival_to_version(data, config=None):
trace("data", data)
node = data.get("node", "")[:12]
if node:
node = "h" + node
if "tag" in data:
- return meta(data["tag"])
+ return meta(data["tag"], config=config)
elif "latesttag" in data:
- return meta(data["latesttag"], distance=data["latesttagdistance"], node=node)
+ return meta(
+ data["latesttag"],
+ distance=data["latesttagdistance"],
+ node=node,
+ config=config,
+ )
else:
- return meta("0.0", node=node)
+ return meta("0.0", node=node, config=config)
-def parse_archival(root):
+def parse_archival(root, config=None):
archival = os.path.join(root, ".hg_archival.txt")
data = data_from_mime(archival)
- return archival_to_version(data)
+ return archival_to_version(data, config=config)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/setuptools_scm-3.0.6/src/setuptools_scm/version.py new/setuptools_scm-3.1.0/src/setuptools_scm/version.py
--- old/setuptools_scm-3.0.6/src/setuptools_scm/version.py 2018-07-31 18:27:39.000000000 +0200
+++ new/setuptools_scm-3.1.0/src/setuptools_scm/version.py 2018-08-09 08:35:22.000000000 +0200
@@ -141,18 +141,27 @@
self.distance = distance
self.node = node
self.time = datetime.datetime.now()
- self.extra = kw
+ self._extra = kw
self.dirty = dirty
self.preformatted = preformatted
self.branch = branch
@property
+ def extra(self):
+ warnings.warn(
+ "ScmVersion.extra is deprecated and will be removed in future",
+ category=DeprecationWarning,
+ stacklevel=2,
+ )
+ return self._extra
+
+ @property
def exact(self):
return self.distance is None
def __repr__(self):
return self.format_with(
- "