]> git.pld-linux.org Git - packages/python-mccabe.git/commitdiff
- initial auto/th/python-mccabe-0.2.1-1
authorArkadiusz Miśkiewicz <arekm@maven.pl>
Thu, 27 Nov 2014 21:39:04 +0000 (22:39 +0100)
committerArkadiusz Miśkiewicz <arekm@maven.pl>
Thu, 27 Nov 2014 21:39:04 +0000 (22:39 +0100)
python-mccabe.spec [new file with mode: 0644]

diff --git a/python-mccabe.spec b/python-mccabe.spec
new file mode 100644 (file)
index 0000000..e6675ef
--- /dev/null
@@ -0,0 +1,96 @@
+#
+# Conditional build:
+%bcond_without tests   # do not perform "make test"
+%bcond_without python2 # CPython 2.x module
+%bcond_without python3 # CPython 3.x module
+
+%define        module  mccabe
+Summary:       McCabe checker, plugin for flake8
+Name:          python-%{module}
+Version:       0.2.1
+Release:       1
+License:       MIT
+Group:         Libraries/Python
+Source0:       https://pypi.python.org/packages/source/m/mccabe/mccabe-%{version}.tar.gz
+# Source0-md5: 5a3f3fa6a4bad126c88aaaa7dab682f5
+URL:           https://github.com/flintwork/mccabe
+BuildRequires: rpm-pythonprov
+BuildRequires: rpmbuild(macros) >= 1.219
+%if %{with python2}
+BuildRequires: python-devel
+BuildRequires: python-distribute
+%endif
+%if %{with python3}
+BuildRequires: python3-devel
+BuildRequires: python3-distribute
+BuildRequires: python3-modules
+%endif
+Requires:      python-modules
+BuildArch:     noarch
+BuildRoot:     %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
+
+%description
+Ned's script to check McCabe complexity.
+
+%package -n python3-%{module}
+Summary:       McCabe checker, plugin for flake8
+Group:         Libraries/Python
+Requires:      python3-modules
+
+%description -n python3-%{module}
+Ned's script to check McCabe complexity.
+
+%prep
+%setup -q -n %{module}-%{version}
+
+%build
+%if %{with python2}
+%{__python} setup.py build --build-base build-2 %{?with_tests:test}
+%endif
+
+%if %{with python3}
+%{__python3} setup.py build --build-base build-3 %{?with_tests:test}
+%endif
+
+%install
+rm -rf $RPM_BUILD_ROOT
+
+%if %{with python2}
+%{__python} setup.py \
+       build --build-base build-2 \
+       install --skip-build \
+       --optimize=2 \
+       --root=$RPM_BUILD_ROOT
+
+%py_postclean
+%endif
+
+%if %{with python3}
+%{__python3} setup.py \
+       build --build-base build-3 \
+       install --skip-build \
+       --optimize=2 \
+       --root=$RPM_BUILD_ROOT
+%endif
+
+%clean
+rm -rf $RPM_BUILD_ROOT
+
+%if %{with python2}
+%files
+%defattr(644,root,root,755)
+%doc README.rst
+%{py_sitescriptdir}/*.py[co]
+%if "%{py_ver}" > "2.4"
+%{py_sitescriptdir}/%{module}-%{version}-py*.egg-info
+%endif
+%endif
+
+%if %{with python3}
+%files -n python3-%{module}
+%defattr(644,root,root,755)
+%doc README.rst
+%{py3_sitescriptdir}/%{module}.py
+%{py3_sitescriptdir}/__pycache__/%{module}.cpython-*.py[co]
+%{py3_sitescriptdir}/%{module}-%{version}-py*.egg-info
+%endif
This page took 0.06268 seconds and 4 git commands to generate.