[packages/python3-mccabe] - up to 0.7.0

baggins baggins at pld-linux.org
Mon Apr 7 02:13:12 CEST 2025


commit a5ce6a7a51333893357f89338c6c8f73f0c1d92c
Author: Jan Rękorajski <baggins at pld-linux.org>
Date:   Mon Apr 7 01:20:05 2025 +0200

    - up to 0.7.0

 python3-mccabe.spec | 60 +++++++++++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 60 insertions(+)
---
diff --git a/python3-mccabe.spec b/python3-mccabe.spec
new file mode 100644
index 0000000..1f87386
--- /dev/null
+++ b/python3-mccabe.spec
@@ -0,0 +1,60 @@
+#
+# Conditional build:
+%bcond_with	tests	# test target
+
+%define		module	mccabe
+Summary:	McCabe checker, plugin for flake8
+Summary(pl.UTF-8):	Wtyczka flake8 do sprawdzania złożoności McCabe'a
+Name:		python3-%{module}
+Version:	0.7.0
+Release:	1
+License:	Expat/MIT
+Group:		Libraries/Python
+#Source0Download: https://pypi.org/simple/mccabe/
+Source0:	https://files.pythonhosted.org/packages/source/m/mccabe/mccabe-%{version}.tar.gz
+# Source0-md5:	374ee2b9407546bb41d195e7436e5f62
+URL:		https://github.com/pycqa/mccabe
+BuildRequires:	rpm-pythonprov
+BuildRequires:	rpmbuild(macros) >= 1.714
+BuildRequires:	python3-devel >= 1:3.3
+BuildRequires:	python3-pytest-runner
+BuildRequires:	python3-setuptools
+%if %{with tests}
+BuildRequires:	python3-hypothesmith
+BuildRequires:	python3-pytest
+%endif
+Requires:	python-modules >= 1:2.7
+BuildArch:	noarch
+BuildRoot:	%{tmpdir}/%{name}-%{version}-root-%(id -u -n)
+
+%description
+Ned's script to check McCabe complexity.
+
+%description -l pl.UTF-8
+Skrypt Neda do sprawdzania złożoności McCabe'a (cyklomatycznej).
+
+%prep
+%setup -q -n %{module}-%{version}
+
+%build
+%py3_build
+
+%if %{with tests}
+PYTEST_DISABLE_PLUGIN_AUTOLOAD=1 \
+%{__python3} -m pytest test_mccabe.py
+%endif
+
+%install
+rm -rf $RPM_BUILD_ROOT
+
+%py3_install
+
+%clean
+rm -rf $RPM_BUILD_ROOT
+
+%files
+%defattr(644,root,root,755)
+%doc LICENSE README.rst
+%{py3_sitescriptdir}/mccabe.py
+%{py3_sitescriptdir}/__pycache__/mccabe.cpython-*.py[co]
+%{py3_sitescriptdir}/mccabe-%{version}-py*.egg-info
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/python3-mccabe.git/commitdiff/a5ce6a7a51333893357f89338c6c8f73f0c1d92c



More information about the pld-cvs-commit mailing list