diff --git a/python-sure.changes b/python-sure.changes index 9fadc93..f506340 100644 --- a/python-sure.changes +++ b/python-sure.changes @@ -1,3 +1,10 @@ +------------------------------------------------------------------- +Sun Dec 12 16:15:50 UTC 2021 - Ben Greiner + +- Update to 2.0.0 + * No longer patch the builtin dir() function, which fixes pytest + in some cases such as projects using gevent. + ------------------------------------------------------------------- Fri Jun 12 07:59:31 UTC 2020 - pgajdos@suse.com diff --git a/python-sure.spec b/python-sure.spec index ae45b06..dde88c7 100644 --- a/python-sure.spec +++ b/python-sure.spec @@ -1,7 +1,7 @@ # # spec file for package python-sure # -# Copyright (c) 2020 SUSE LLC +# Copyright (c) 2021 SUSE LLC # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -18,7 +18,7 @@ %{?!python_module:%define python_module() python-%{**} python3-%{**}} Name: python-sure -Version: 1.4.11 +Version: 2.0.0 Release: 0 Summary: Utility belt for automated testing in python for python License: GPL-3.0-or-later @@ -31,8 +31,11 @@ BuildRequires: %{python_module setuptools} BuildRequires: %{python_module six >= 1.10.0} BuildRequires: fdupes BuildRequires: python-rpm-macros +# regarding mock: https://github.com/gabrielfalcao/sure/pull/161 Requires: python-mock >= 2.0.0 Requires: python-six >= 1.10.0 +Requires(post): update-alternatives +Requires(postun):update-alternatives BuildArch: noarch %python_subpackages @@ -43,12 +46,14 @@ heavily inspired by should.js %prep %setup -q -n sure-%{version} sed -i '/^#!/d' sure/*.py +sed -i 's/--cov=sure//' setup.cfg %build %python_build %install %python_install +%python_clone -a %{buildroot}%{_bindir}/sure %python_expand %fdupes %{buildroot}%{$python_sitelib} %check @@ -56,9 +61,17 @@ sed -i '/^#!/d' sure/*.py rm tests/test_old_api.py %pytest +%post +%python_install_alternative sure + +%postun +%python_uninstall_alternative sure + %files %{python_files} %license COPYING %doc README.rst -%{python_sitelib}/* +%python_alternative %{_bindir}/sure +%{python_sitelib}/sure +%{python_sitelib}/sure-%{version}*-info %changelog diff --git a/sure-1.4.11.tar.gz b/sure-1.4.11.tar.gz deleted file mode 100644 index 4aff908..0000000 --- a/sure-1.4.11.tar.gz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:3c8d5271fb18e2c69e2613af1ad400d8df090f1456081635bd3171847303cdaa -size 45933 diff --git a/sure-2.0.0.tar.gz b/sure-2.0.0.tar.gz new file mode 100644 index 0000000..e8ac0c3 --- /dev/null +++ b/sure-2.0.0.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:34ae88c846046742ef074036bf311dc90ab152b7bc09c342b281cebf676727a2 +size 46747