[packages/python-flake8] python2 only flake8
arekm
arekm at pld-linux.org
Mon Apr 7 22:41:19 CEST 2025
commit bccabaf548b25e0881680e3e71cbaa96d5e928e8
Author: Arkadiusz Miśkiewicz <arekm at maven.pl>
Date: Mon Apr 7 22:39:39 2025 +0200
python2 only flake8
flake8.spec | 224 -----------------------------------------------------
python-flake8.spec | 116 +++++++++++++++++++++++++++
2 files changed, 116 insertions(+), 224 deletions(-)
---
diff --git a/flake8.spec b/flake8.spec
deleted file mode 100644
index eaf9c08..0000000
--- a/flake8.spec
+++ /dev/null
@@ -1,224 +0,0 @@
-#
-# Conditional build:
-%bcond_without python2 # CPython 2.x module
-%bcond_without python3 # CPython 3.x module
-%bcond_with tests # pytest tests
-%bcond_without doc # Sphinx documentation
-
-Summary: The modular source code checker: pycodestyle, pyflakes and co.
-Summary(pl.UTF-8): Modularne narzędzie do sprawdzania kodu źródłowego: pycodestyle, pyflakes itp.
-Name: flake8
-# before updating to 4.x fork python-flake8.spec with last 3.x version
-Version: 3.9.2
-Release: 5
-License: MIT
-Group: Development/Tools
-#Source0Download: https://pypi.org/simple/flake8/
-Source0: https://files.pythonhosted.org/packages/source/f/flake8/%{name}-%{version}.tar.gz
-# Source0-md5: 5c102972d3d0f35255c56a20613fcec5
-Patch0: %{name}-duplicate.patch
-URL: https://gitlab.com/pycqa/flake8
-BuildRequires: rpmbuild(macros) >= 1.714
-BuildRequires: rpm-pythonprov
-%if %{with python2}
-BuildRequires: python-modules >= 1:2.7
-BuildRequires: python-setuptools >= 1:30
-%if %{with tests}
-BuildRequires: python-configparser
-BuildRequires: python-enum34
-BuildRequires: python-functools32
-BuildRequires: python-importlib_metadata
-BuildRequires: python-mccabe >= 0.6.0
-BuildRequires: python-mccabe < 0.7.0
-BuildRequires: python-mock >= 2.0.0
-BuildRequires: python-pycodestyle >= 2.7.0
-BuildRequires: python-pycodestyle < 2.8.0
-BuildRequires: python-pyflakes >= 2.3.0
-BuildRequires: python-pyflakes < 2.4.0
-BuildRequires: python-pytest
-BuildRequires: python-typing
-%endif
-%endif
-%if %{with python3}
-BuildRequires: python3-modules >= 1:3.5
-BuildRequires: python3-setuptools >= 1:30
-%if %{with tests}
-%if "%{py3_ver}" < "3.8"
-BuildRequires: python3-importlib_metadata
-%endif
-BuildRequires: python3-mccabe >= 0.6.0
-BuildRequires: python3-mccabe < 0.7.0
-BuildRequires: python3-pycodestyle >= 2.7.0
-BuildRequires: python3-pycodestyle < 2.8.0
-BuildRequires: python3-pyflakes >= 2.3.0
-BuildRequires: python3-pyflakes < 2.4.0
-BuildRequires: python3-pytest
-BuildRequires: sed >= 4.0
-%endif
-%endif
-%if %{with doc}
-BuildRequires: python3-sphinx-prompt
-BuildRequires: sphinx-pdg-3 >= 1.3
-%endif
-%if %{with python3}
-Requires: python3-flake8 = %{version}-%{release}
-%else
-Requires: python-flake8 = %{version}-%{release}
-%endif
-BuildArch: noarch
-BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
-
-%description
-The modular source code checker. It is a wrapper around these tools:
-- PyFlakes
-- pycodestyle
-- Ned Batchelder's McCabe script
-
-%description -l pl.UTF-8
-Modularne narzędzie do sprawdzania kodu źródłowego. Jest to opakowanie
-dla narzędzi:
-- PyFlakes
-- pycodestyle
-- skrypt McCabe autorstwa Neda Batcheldera
-
-%package -n python-flake8
-Summary: The modular source code checker: pycodestyle, pyflakes and co.
-Summary(pl.UTF-8): Modularne narzędzie do sprawdzania kodu źródłowego: pycodestyle, pyflakes itp.
-Group: Libraries/Python
-Requires: python-mccabe >= 0.6.0
-Requires: python-mccabe < 0.7.0
-Requires: python-modules >= 1:2.7
-Requires: python-pycodestyle >= 2.7.0
-Requires: python-pycodestyle < 2.8.0
-Requires: python-pyflakes >= 2.3.0
-Requires: python-pyflakes < 2.4.0
-
-%description -n python-flake8
-The modular source code checker. It is a wrapper around these tools:
-- PyFlakes
-- pycodestyle
-- Ned Batchelder's McCabe script
-
-%description -n python-flake8 -l pl.UTF-8
-Modularne narzędzie do sprawdzania kodu źródłowego. Jest to opakowanie
-dla narzędzi:
-- PyFlakes
-- pycodestyle
-- skrypt McCabe autorstwa Neda Batcheldera
-
-%package -n python3-flake8
-Summary: The modular source code checker: pycodestyle, pyflakes and co
-Summary(pl.UTF-8): Modularne narzędzie do sprawdzania kodu źródłowego: pycodestyle, pyflakes itp.
-Group: Libraries/Python
-Requires: python3-mccabe >= 0.6.0
-Requires: python3-mccabe < 0.7.0
-Requires: python3-modules >= 1:3.4
-Requires: python3-pycodestyle >= 2.7.0
-Requires: python3-pycodestyle < 2.8.0
-Requires: python3-pyflakes >= 2.3.0
-Requires: python3-pyflakes < 2.4.0
-
-%description -n python3-flake8
-The modular source code checker. It is a wrapper around these tools:
-- PyFlakes
-- pycodestyle
-- Ned Batchelder's McCabe script
-
-%description -n python3-flake8 -l pl.UTF-8
-Modularne narzędzie do sprawdzania kodu źródłowego. Jest to opakowanie
-dla narzędzi:
-- PyFlakes
-- pycodestyle
-- skrypt McCabe autorstwa Neda Batcheldera
-
-%package -n python-flake8-apidocs
-Summary: API documentation for Python flake8 module
-Summary(pl.UTF-8): Dokumentacja API modułu Pythona flake8
-Group: Documentation
-
-%description -n python-flake8-apidocs
-API documentation for Python flake8 module.
-
-%description -n python-flake8-apidocs -l pl.UTF-8
-Dokumentacja API modułu Pythona flake8.
-
-%prep
-%setup -q
-%patch -P 0 -p1
-
-%build
-%if %{with python2}
-%py_build
-
-%if %{with tests}
-PYTEST_DISABLE_PLUGIN_AUTOLOAD=1 \
-PYTHONPATH=$(pwd)/src \
-%{__python} -m pytest -rw tests
-%endif
-%endif
-
-%if %{with python3}
-# don't require standalone mock
-%{__sed} -i -e 's/import mock/from unittest import mock/' $(grep 'import mock' tests/ -rl)
-
-%py3_build
-
-%if %{with tests}
-PYTEST_DISABLE_PLUGIN_AUTOLOAD=1 \
-PYTHONPATH=$(pwd)/src \
-%{__python3} -m pytest -rw tests
-%endif
-%endif
-
-%if %{with doc}
-cd docs/source
-PYTHONPATH=$(pwd)/../../src \
-sphinx-build-3 -b html . _build/html
-%endif
-
-%install
-rm -rf $RPM_BUILD_ROOT
-
-%if %{with python2}
-%py_install
-%{__mv} $RPM_BUILD_ROOT%{_bindir}/flake8{,-2}
-%py_postclean
-%endif
-
-%if %{with python3}
-%py3_install
-%{__mv} $RPM_BUILD_ROOT%{_bindir}/flake8{,-3}
-%endif
-
-ln -s flake-%{!?with_python3:2}%{?with_python3:3} $RPM_BUILD_ROOT%{_bindir}/flake8
-
-%clean
-rm -rf $RPM_BUILD_ROOT
-
-%files
-%defattr(644,root,root,755)
-%attr(755,root,root) %{_bindir}/flake8
-
-%if %{with python2}
-%files -n python-flake8
-%defattr(644,root,root,755)
-%doc CONTRIBUTORS.txt LICENSE README.rst
-%attr(755,root,root) %{_bindir}/flake8-2
-%{py_sitescriptdir}/flake8
-%{py_sitescriptdir}/flake8-%{version}-py*.egg-info
-%endif
-
-%if %{with python3}
-%files -n python3-flake8
-%defattr(644,root,root,755)
-%doc CONTRIBUTORS.txt LICENSE README.rst
-%attr(755,root,root) %{_bindir}/flake8-3
-%{py3_sitescriptdir}/flake8
-%{py3_sitescriptdir}/flake8-%{version}-py*.egg-info
-%endif
-
-%if %{with doc}
-%files -n python-flake8-apidocs
-%defattr(644,root,root,755)
-%doc docs/source/_build/html/{_modules,_static,internal,plugin-development,release-notes,user,*.html,*.js}
-%endif
diff --git a/python-flake8.spec b/python-flake8.spec
new file mode 100644
index 0000000..93420af
--- /dev/null
+++ b/python-flake8.spec
@@ -0,0 +1,116 @@
+#
+# Conditional build:
+%bcond_with tests # pytest tests
+%bcond_without doc # Sphinx documentation
+
+Summary: The modular source code checker: pycodestyle, pyflakes and co.
+Summary(pl.UTF-8): Modularne narzędzie do sprawdzania kodu źródłowego: pycodestyle, pyflakes itp.
+Name: python-flake8
+# Keep version < 4.x here as it is last version with python2 support
+Version: 3.9.2
+Release: 6
+License: MIT
+Group: Development/Tools
+#Source0Download: https://pypi.org/simple/flake8/
+Source0: https://files.pythonhosted.org/packages/source/f/flake8/flake8-%{version}.tar.gz
+# Source0-md5: 5c102972d3d0f35255c56a20613fcec5
+Patch0: flake8-duplicate.patch
+URL: https://gitlab.com/pycqa/flake8
+BuildRequires: rpmbuild(macros) >= 1.714
+BuildRequires: rpm-pythonprov
+BuildRequires: python-modules >= 1:2.7
+BuildRequires: python-setuptools >= 1:30
+%if %{with tests}
+BuildRequires: python-configparser
+BuildRequires: python-enum34
+BuildRequires: python-functools32
+BuildRequires: python-importlib_metadata
+%endif
+BuildRequires: python-mccabe >= 0.6.0
+BuildRequires: python-mccabe < 0.7.0
+BuildRequires: python-mock >= 2.0.0
+BuildRequires: python-pycodestyle >= 2.7.0
+BuildRequires: python-pycodestyle < 2.8.0
+BuildRequires: python-pyflakes >= 2.3.0
+BuildRequires: python-pyflakes < 2.4.0
+BuildRequires: python-pytest
+BuildRequires: python-typing
+%if %{with doc}
+BuildRequires: python-sphinx-prompt
+BuildRequires: sphinx-pdg-2 >= 1.3
+%endif
+Requires: python-mccabe >= 0.6.0
+Requires: python-mccabe < 0.7.0
+Requires: python-modules >= 1:2.7
+Requires: python-pycodestyle >= 2.7.0
+Requires: python-pycodestyle < 2.8.0
+Requires: python-pyflakes >= 2.3.0
+Requires: python-pyflakes < 2.4.0
+BuildArch: noarch
+BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
+
+%description
+The modular source code checker. It is a wrapper around these tools:
+- PyFlakes
+- pycodestyle
+- Ned Batchelder's McCabe script
+
+%description -l pl.UTF-8
+Modularne narzędzie do sprawdzania kodu źródłowego. Jest to opakowanie
+dla narzędzi:
+- PyFlakes
+- pycodestyle
+- skrypt McCabe autorstwa Neda Batcheldera
+
+%package apidocs
+Summary: API documentation for Python flake8 module
+Summary(pl.UTF-8): Dokumentacja API modułu Pythona flake8
+Group: Documentation
+
+%description apidocs
+API documentation for Python flake8 module.
+
+%description apidocs -l pl.UTF-8
+Dokumentacja API modułu Pythona flake8.
+
+%prep
+%setup -q -n flake8-%{version}
+%patch -P 0 -p1
+
+%build
+%py_build
+
+%if %{with tests}
+PYTEST_DISABLE_PLUGIN_AUTOLOAD=1 \
+PYTHONPATH=$(pwd)/src \
+%{__python} -m pytest -rw tests
+%endif
+
+%if %{with doc}
+cd docs/source
+PYTHONPATH=$(pwd)/../../src \
+sphinx-build-2 -b html . _build/html
+%endif
+
+%install
+rm -rf $RPM_BUILD_ROOT
+
+%py_install
+%{__mv} $RPM_BUILD_ROOT%{_bindir}/flake8{,-2}
+%py_postclean
+
+%clean
+rm -rf $RPM_BUILD_ROOT
+
+%files
+%defattr(644,root,root,755)
+%doc CONTRIBUTORS.txt LICENSE README.rst
+%attr(755,root,root) %{_bindir}/flake8-2
+%{py_sitescriptdir}/flake8
+%{py_sitescriptdir}/flake8-%{version}-py*.egg-info
+
+%if %{with doc}
+%files apidocs
+%defattr(644,root,root,755)
+%doc docs/source/_build/html/{_modules,_static,internal,plugin-development,release-notes,user,*.html,*.js}
+%endif
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/python-flake8.git/commitdiff/bccabaf548b25e0881680e3e71cbaa96d5e928e8
More information about the pld-cvs-commit
mailing list