[python-mccabe] Initial commit

Matej Cepl mcepl at fedoraproject.org
Tue Apr 30 11:31:56 UTC 2013


commit c02613631189216137bc783c69f36f0e0f73ccbd
Author: Matěj Cepl <mcepl at redhat.com>
Date:   Tue Apr 30 12:31:34 2013 +0100

    Initial commit

 .gitignore         |    1 +
 python-mccabe.spec |   96 ++++++++++++++++++++++++++++++++++++++++++++++++++++
 sources            |    1 +
 3 files changed, 98 insertions(+), 0 deletions(-)
---
diff --git a/.gitignore b/.gitignore
index e69de29..5619224 100644
--- a/.gitignore
+++ b/.gitignore
@@ -0,0 +1 @@
+/mccabe-0.2.1.tar.gz
diff --git a/python-mccabe.spec b/python-mccabe.spec
new file mode 100644
index 0000000..7c3eebb
--- /dev/null
+++ b/python-mccabe.spec
@@ -0,0 +1,96 @@
+%if 0%{?fedora} > 12 || 0%{?rhel} > 6
+%global with_python3 1
+%endif
+
+%global modname mccabe
+
+Name:               python-mccabe
+Version:            0.2.1
+Release:            2%{?dist}
+Summary:            McCabe complexity checker
+
+Group:              Development/Libraries
+License:            MIT
+URL:                http://pypi.python.org/pypi/mccabe
+Source0:            http://pypi.python.org/packages/source/m/%{modname}/%{modname}-%{version}.tar.gz
+
+BuildArch:          noarch
+BuildRequires:      python2-devel, python-setuptools
+
+%if 0%{?with_python3}
+BuildRequires:      python3-devel, python3-setuptools
+%endif
+
+%description
+Ned's script to check McCabe complexity.
+
+This module provides a plugin for ``flake8``, the Python code
+checker.
+
+%if 0%{?with_python3}
+%package -n python3-mccabe
+Summary:            McCabe checker, plugin for flake8
+Group:              Development/Libraries
+
+%description -n python3-mccabe
+Ned's script to check McCabe complexity.
+
+This module provides a plugin for ``flake8``, the Python code
+checker.
+%endif
+
+%prep
+%setup -q -n %{modname}-%{version}
+
+# Remove bundled egg-info in case it exists
+rm -rf %{modname}.egg-info
+%if 0%{?with_python3}
+rm -rf %{py3dir}
+cp -a . %{py3dir}
+%endif
+
+%build
+%{__python} setup.py build
+%if 0%{?with_python3}
+pushd %{py3dir}
+%{__python3} setup.py build
+popd
+%endif
+
+
+%install
+%if 0%{?with_python3}
+pushd %{py3dir}
+%{__python3} setup.py install -O1 --skip-build --root=%{buildroot}
+popd
+%endif
+%{__python} setup.py install -O1 --skip-build --root=%{buildroot}
+
+%check
+%{__python} setup.py test
+%if 0%{?with_python3}
+pushd %{py3dir}
+%{__python3} setup.py test
+popd
+%endif
+
+%files
+%doc README.rst
+%{python_sitelib}/%{modname}.py*
+%{python_sitelib}/%{modname}-%{version}*
+
+%if 0%{?with_python3}
+%files -n python3-mccabe
+%doc README.rst
+%{python3_sitelib}/%{modname}.py*
+%{python3_sitelib}/%{modname}-%{version}-*
+%{python3_sitelib}/__pycache__/%{modname}.*
+
+%endif
+
+%changelog
+* Mon Apr 15 2013 Matěj Cepl <mcepl at redhat.com> 0.2.1-2
+- Fix %%changelog.
+
+* Sun Apr 14 2013 Matěj Cepl <mcepl at redhat.com> 0.2.1-1
+- initial package for Fedora
diff --git a/sources b/sources
index e69de29..398d2da 100644
--- a/sources
+++ b/sources
@@ -0,0 +1 @@
+5a3f3fa6a4bad126c88aaaa7dab682f5  mccabe-0.2.1.tar.gz


More information about the scm-commits mailing list