From 0ebc7619d7ec1a99c907008d777dc4ce41857306b2c5247f17286ff6dfd9e8ea Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1=C5=A1=20Chv=C3=A1tal?= Date: Tue, 2 Apr 2019 15:43:53 +0000 Subject: [PATCH 1/2] Accepting request 690649 from home:mcepl:branches:devel:languages:python - Original patch by John Vandenberg, modified: - Move pytest -k test exclusions into add-rpmfail-pytest-markers.patch to clarify the reason for those failures - Refine runtime Recommends from git to git-core OBS-URL: https://build.opensuse.org/request/show/690649 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-setuptools_scm?expand=0&rev=45 --- add-rpmfail-pytest-markers.patch | 37 ++++++++++++++++++++++++++++++++ python-setuptools_scm.changes | 8 +++++++ python-setuptools_scm.spec | 8 ++++--- 3 files changed, 50 insertions(+), 3 deletions(-) create mode 100644 add-rpmfail-pytest-markers.patch diff --git a/add-rpmfail-pytest-markers.patch b/add-rpmfail-pytest-markers.patch new file mode 100644 index 0000000..1901c37 --- /dev/null +++ b/add-rpmfail-pytest-markers.patch @@ -0,0 +1,37 @@ +diff -ru setuptools_scm-3.2.0-orig/testing/test_regressions.py setuptools_scm-3.2.0/testing/test_regressions.py +--- setuptools_scm-3.2.0-orig/testing/test_regressions.py 2019-01-17 02:34:04.000000000 +0700 ++++ setuptools_scm-3.2.0/testing/test_regressions.py 2019-03-15 13:15:33.248842438 +0700 +@@ -49,6 +49,7 @@ + assert get_version(root=p.strpath) == "1.0" + + ++@pytest.mark.rpmfail_github_connect + @pytest.mark.issue(164) + def test_pip_download(tmpdir, monkeypatch): + monkeypatch.chdir(tmpdir) +diff -ru setuptools_scm-3.2.0-orig/testing/test_setuptools_support.py setuptools_scm-3.2.0/testing/test_setuptools_support.py +--- setuptools_scm-3.2.0-orig/testing/test_setuptools_support.py 2019-01-17 02:34:04.000000000 +0700 ++++ setuptools_scm-3.2.0/testing/test_setuptools_support.py 2019-03-15 13:16:43.573444176 +0700 +@@ -65,12 +65,14 @@ + ) + + ++@pytest.mark.rpmfail_github_connect + def test_old_setuptools_fails(get_setuptools_packagedir): + packagedir = get_setuptools_packagedir("0.9.8") + with pytest.raises(subprocess.CalledProcessError): + check(packagedir, "0.9.8") + + ++@pytest.mark.rpmfail_github_connect + def test_old_setuptools_allows_with_warnings(get_setuptools_packagedir): + + packagedir = get_setuptools_packagedir("0.9.8") +@@ -78,6 +80,7 @@ + check(packagedir, "0.9.8", PYTHONWARNINGS="once::Warning") + + ++@pytest.mark.rpmfail_github_connect + def test_distlib_setuptools_works(get_setuptools_packagedir): + packagedir = get_setuptools_packagedir("12.0.1") + check(packagedir, "12.0.1") diff --git a/python-setuptools_scm.changes b/python-setuptools_scm.changes index e70e16e..bd67e20 100644 --- a/python-setuptools_scm.changes +++ b/python-setuptools_scm.changes @@ -1,3 +1,11 @@ +------------------------------------------------------------------- +Tue Apr 2 14:47:52 CEST 2019 - Matej Cepl + +- Original patch by John Vandenberg, modified: + - Move pytest -k test exclusions into add-rpmfail-pytest-markers.patch + to clarify the reason for those failures + - Refine runtime Recommends from git to git-core + ------------------------------------------------------------------- Fri Mar 1 12:37:15 UTC 2019 - Ondřej Súkup diff --git a/python-setuptools_scm.spec b/python-setuptools_scm.spec index e7dccba..df489b0 100644 --- a/python-setuptools_scm.spec +++ b/python-setuptools_scm.spec @@ -36,6 +36,7 @@ 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 +Patch0: add-rpmfail-pytest-markers.patch BuildRequires: %{python_module setuptools} BuildRequires: fdupes BuildRequires: python-rpm-macros @@ -46,10 +47,10 @@ BuildArch: noarch BuildRequires: %{python_module pip} BuildRequires: %{python_module pytest} BuildRequires: %{python_module setuptools_scm = %{version}} -BuildRequires: git +BuildRequires: git-core %endif %if 0%{?suse_version} || 0%{?fedora_version} >= 24 -Recommends: git +Recommends: git-core %endif %python_subpackages @@ -59,6 +60,7 @@ in SCM metadata. It also handles file finders for the supperted SCMs. %prep %setup -q -n setuptools_scm-%{version} +%autopatch -p1 rm tox.ini %build @@ -72,7 +74,7 @@ rm tox.ini %if %{with test} %check -%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 or test_mercurial or hg)' +%python_expand PYTHONPATH=%{$python_sitelib} py.test-%{$python_bin_suffix} -v -k 'not rpmfail_github_connect' %endif %files %{python_files} From 1a37164b3bc12a6d6366c1f989b6732540e5efdb60c4e2205ea71b53931336ab Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1=C5=A1=20Chv=C3=A1tal?= Date: Wed, 3 Apr 2019 08:02:15 +0000 Subject: [PATCH 2/2] OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-setuptools_scm?expand=0&rev=46 --- python-setuptools_scm.spec | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/python-setuptools_scm.spec b/python-setuptools_scm.spec index df489b0..cee2749 100644 --- a/python-setuptools_scm.spec +++ b/python-setuptools_scm.spec @@ -74,12 +74,12 @@ rm tox.ini %if %{with test} %check -%python_expand PYTHONPATH=%{$python_sitelib} py.test-%{$python_bin_suffix} -v -k 'not rpmfail_github_connect' +%python_expand PYTHONPATH=%{$python_sitelib} py.test-%{$python_bin_suffix} -v -k 'not (rpmfail_github_connect or test_mercurial or hg)' %endif +%if !%{with test} %files %{python_files} %license LICENSE -%if !%{with test} %doc README.rst CHANGELOG.rst %{python_sitelib}/setuptools_scm* %endif