From bf99556c75f9629d6da63b183540bf1af0043be4eda7092de017aedf0a2e1698 Mon Sep 17 00:00:00 2001 From: Jan Matejek Date: Wed, 15 Mar 2017 15:14:45 +0000 Subject: [PATCH] Accepting request 479715 from devel:languages:python:singlespec - update for singlespec - enable tests OBS-URL: https://build.opensuse.org/request/show/479715 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-mccabe?expand=0&rev=16 --- python-mccabe.changes | 6 ++++++ python-mccabe.spec | 21 +++++++++++---------- 2 files changed, 17 insertions(+), 10 deletions(-) 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}/*