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
This commit is contained in:
Tomáš Chvátal 2019-04-02 15:43:53 +00:00 committed by Git OBS Bridge
parent 7091e00550
commit 0ebc7619d7
3 changed files with 50 additions and 3 deletions

View File

@ -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")

View File

@ -1,3 +1,11 @@
-------------------------------------------------------------------
Tue Apr 2 14:47:52 CEST 2019 - Matej Cepl <mcepl@suse.com>
- 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 <mimi.vx@gmail.com>

View File

@ -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}