diff --git a/no-generic-python.patch b/no-generic-python.patch new file mode 100644 index 0000000..c4d3597 --- /dev/null +++ b/no-generic-python.patch @@ -0,0 +1,33 @@ +diff --git a/testing/test_regressions.py b/testing/test_regressions.py +index 4a067b3..9d24d61 100644 +--- a/testing/test_regressions.py ++++ b/testing/test_regressions.py +@@ -18,16 +18,16 @@ def test_pkginfo_noscmroot(tmpdir, monkeypatch): + 'from setuptools import setup;' + 'setup(use_scm_version={"root": ".."})') + +- _, stderr, ret = do_ex('python setup.py --version', p) ++ _, stderr, ret = do_ex((sys.executable, 'setup.py', '--version'), p) + assert 'setuptools-scm was unable to detect version for' in stderr + assert ret == 1 + + p.join("PKG-INFO").write('Version: 1.0') +- res = do('python setup.py --version', p) ++ res = do((sys.executable, 'setup.py', '--version'), p) + assert res == '1.0' + + do('git init', p.dirpath()) +- res = do('python setup.py --version', p) ++ res = do((sys.executable, 'setup.py', '--version'), p) + assert res == '1.0' + + +@@ -64,7 +64,7 @@ setup(use_scm_version=vcfg) + ''') + p.join("PKG-INFO").write('Version: 1.0') + +- res = do('python setup.py --version', p) ++ res = do((sys.executable, 'setup.py', '--version'), p) + assert res == '1.0' + + diff --git a/python-setuptools_scm.changes b/python-setuptools_scm.changes index 20c9790..a3ef1bf 100644 --- a/python-setuptools_scm.changes +++ b/python-setuptools_scm.changes @@ -1,3 +1,10 @@ +------------------------------------------------------------------- +Fri Mar 3 15:24:56 UTC 2017 - jmatejek@suse.com + +- fix singlespec build +- no-generic-python.patch - run tests with the right python executable + to prevent stray pyc files where they don't belong + ------------------------------------------------------------------- Thu Mar 2 15:06:07 UTC 2017 - tbechtold@suse.com diff --git a/python-setuptools_scm.spec b/python-setuptools_scm.spec index 7cc70d0..c88adae 100644 --- a/python-setuptools_scm.spec +++ b/python-setuptools_scm.spec @@ -25,6 +25,8 @@ 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 +# PATCH-FIX-UPSTREAM use sys.executable for running python in test_regressions.py +Patch0: no-generic-python.patch BuildRequires: %{python_module devel} BuildRequires: %{python_module setuptools} BuildRequires: python-rpm-macros @@ -32,7 +34,7 @@ BuildRequires: python-rpm-macros BuildRequires: %{python_module pytest} BuildRequires: git BuildRequires: mercurial -Requires: %{python_module setuptools} +Requires: python-setuptools Recommends: git Recommends: mecurial BuildRoot: %{_tmppath}/%{name}-%{version}-build @@ -46,6 +48,7 @@ in scm metadata. It also handles file finders for the supperted scm's. %prep %setup -q -n setuptools_scm-%{version} +%patch0 -p1 %build %python_build @@ -54,7 +57,7 @@ in scm metadata. It also handles file finders for the supperted scm's. %python_install %check -%python_expand PYTHONPATH=%{buildroot}%{python_sitelib} py.test-%{python_version} +%python_expand PYTHONPATH=%{buildroot}%{$python_sitelib} py.test-%{$python_bin_suffix} %files %python_files %defattr(-,root,root,-)