diff --git a/python-mccabe.changes b/python-mccabe.changes index 5cd4ff6..0cb0694 100644 --- a/python-mccabe.changes +++ b/python-mccabe.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Mon Mar 6 14:03:34 UTC 2017 - jmatejek@suse.com + +- update for singlespec +- enable tests + ------------------------------------------------------------------- Mon Feb 20 10:36:41 UTC 2017 - tbechtold@suse.com diff --git a/python-mccabe.spec b/python-mccabe.spec index b6024c4..fa52193 100644 --- a/python-mccabe.spec +++ b/python-mccabe.spec @@ -16,6 +16,7 @@ # +%{?!python_module:%define python_module() python-%{**} python3-%{**}} Name: python-mccabe Version: 0.6.1 Release: 0 @@ -24,15 +25,12 @@ License: MIT Group: Development/Languages/Python Url: https://github.com/flintwork/mccabe Source: https://pypi.io/packages/source/m/mccabe/mccabe-%{version}.tar.gz -BuildRequires: python-devel -BuildRequires: python-pytest-runner -BuildRequires: python-setuptools +BuildRequires: %{python_module pytest-runner} +BuildRequires: %{python_module setuptools} +BuildRequires: python-rpm-macros BuildRoot: %{_tmppath}/%{name}-%{version}-build -%if 0%{?suse_version} && 0%{?suse_version} <= 1110 -%{!?python_sitelib: %global python_sitelib %(python -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")} -%else BuildArch: noarch -%endif +%python_subpackages %description Ned's script to check McCabe complexity. @@ -42,12 +40,15 @@ This module provides a plugin for flake8, the Python code checker. %setup -q -n mccabe-%{version} %build -python setup.py build +%python_build %install -python setup.py install --prefix=%{_prefix} --root=%{buildroot} +%python_install -%files +%check +%python_exec %{_bindir}/py.test + +%files %{python_files} %defattr(-,root,root,-) %doc LICENSE README.rst %{python_sitelib}/*