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}