[packages/python3-fissix] Initial, improved 2to3
arekm
arekm at pld-linux.org
Mon Mar 17 17:30:43 CET 2025
commit d880e1ffc680ca0ce5efda309476b8817a1a2b95
Author: Arkadiusz Miśkiewicz <arekm at maven.pl>
Date: Mon Mar 17 17:00:08 2025 +0100
Initial, improved 2to3
python3-fissix.spec | 87 +++++++++++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 87 insertions(+)
---
diff --git a/python3-fissix.spec b/python3-fissix.spec
new file mode 100644
index 0000000..45e418a
--- /dev/null
+++ b/python3-fissix.spec
@@ -0,0 +1,87 @@
+# Conditional build:
+%bcond_with tests # Tests
+%bcond_with doc # API documentation
+
+%define module fissix
+Summary: Backport of latest lib2to3, with enhancements
+Name: python3-%{module}
+Version: 24.4.24
+Release: 1
+License: PSL
+Group: Libraries/Python
+Source0: https://pypi.debian.net/%{module}/%{module}-%{version}.tar.gz
+# Source0-md5: 5c8f06e0081ddac102a0fcf8c62e4254
+URL: https://pypi.org/project/fissix/
+BuildRequires: python3-build
+BuildRequires: python3-flit_core
+BuildRequires: python3-installer
+BuildRequires: python3-modules >= 1:3.2
+BuildRequires: rpm-pythonprov
+BuildRequires: rpmbuild(macros) >= 2.044
+%if %{with tests}
+BuildRequires: python3-appdirs
+%endif
+%if %{with doc}
+BuildRequires: sphinx-pdg-3
+%endif
+Requires: python3-modules >= 1:3.2
+BuildArch: noarch
+BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
+
+%description
+Backport of latest lib2to3, with enhancements.
+
+%package apidocs
+Summary: API documentation for Python %{module} module
+Summary(pl.UTF-8): Dokumentacja API modułu Pythona %{module}
+Group: Documentation
+
+%description apidocs
+API documentation for Python %{module} module.
+
+%description apidocs -l pl.UTF-8
+Dokumentacja API modułu Pythona %{module}.
+
+%prep
+%setup -q -n %{module}-%{version}
+
+%{__sed} -E -i -e '1s,#!\s*/usr/bin/env\s+python3(\s|$),#!%{__python3}\1,' \
+ fissix/pgen2/token.py \
+
+mv fissix/tests tests
+
+%build
+%py3_build_pyproject
+
+%if %{with tests}
+%{__python3} -m zipfile -e build-3/*.whl build-3-test
+# use explicit plugins list for reliable builds (delete PYTEST_PLUGINS if empty)
+PYTEST_DISABLE_PLUGIN_AUTOLOAD=1 \
+PYTEST_PLUGINS= \
+%{__python3} -m pytest -o pythonpath="$PWD/build-3-test" tests
+%endif
+
+%if %{with doc}
+sphinx-build-3 -b html docs docs/_build/html
+rm -rf docs/_build/html/_sources
+%endif
+
+%install
+rm -rf $RPM_BUILD_ROOT
+
+%py3_install_pyproject
+
+%clean
+rm -rf $RPM_BUILD_ROOT
+
+%files
+%defattr(644,root,root,755)
+%doc CHANGELOG.md README.md
+%{py3_sitescriptdir}/%{module}
+%{py3_sitescriptdir}/%{module}-%{version}.dist-info
+
+%if %{with doc}
+%files apidocs
+%defattr(644,root,root,755)
+%doc docs/_build/html/*
+%endif
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/python3-fissix.git/commitdiff/d880e1ffc680ca0ce5efda309476b8817a1a2b95
More information about the pld-cvs-commit
mailing list