[packages/python-forbiddenfruit] - new

qboosh qboosh at pld-linux.org
Fri Jul 4 19:29:49 CEST 2025


commit b83304c88883c43018d73c56b68c94192ffd239c
Author: Jakub Bogusz <qboosh at pld-linux.org>
Date:   Fri Jul 4 19:31:08 2025 +0200

    - new

 python-forbiddenfruit.spec | 120 +++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 120 insertions(+)
---
diff --git a/python-forbiddenfruit.spec b/python-forbiddenfruit.spec
new file mode 100644
index 0000000..d5cb4db
--- /dev/null
+++ b/python-forbiddenfruit.spec
@@ -0,0 +1,120 @@
+#
+# Conditional build:
+%bcond_without	tests	# unit tests
+%bcond_without	python2 # CPython 2.x module
+%bcond_without	python3 # CPython 3.x module
+
+Summary:	Patch Python built-in objects
+Summary(pl.UTF-8):	Łatanie wbudowanych obiektów Pythona
+Name:		python-forbiddenfruit
+Version:	0.1.4
+Release:	1
+License:	GPL v3+ or MIT
+Group:		Libraries/Python
+#Source0Download: https://pypi.org/simple/forbiddenfruit/
+Source0:	https://files.pythonhosted.org/packages/source/f/forbiddenfruit/forbiddenfruit-%{version}.tar.gz
+# Source0-md5:	2f6765447076f15bbfa34da39dbdba03
+URL:		https://pypi.org/project/forbiddenfruit/
+%if %{with python2}
+BuildRequires:	python-devel >= 1:2.7
+BuildRequires:	python-setuptools
+%if %{with tests}
+BuildRequires:	python-nose
+%endif
+%endif
+%if %{with python3}
+BuildRequires:	python3-devel >= 1:3.3
+BuildRequires:	python3-setuptools
+%if %{with tests}
+BuildRequires:	python3-pynose
+%endif
+%endif
+BuildRequires:	rpm-pythonprov
+BuildRequires:	rpmbuild(macros) >= 1.714
+Requires:	python-modules >= 1:2.7
+BuildArch:	noarch
+BuildRoot:	%{tmpdir}/%{name}-%{version}-root-%(id -u -n)
+
+%description
+This project allows Python code to extend built-in types.
+
+%description -l pl.UTF-8
+Ten projekt pozwala rozszerzać wbudowane typy z poziomu kodu
+pythonowego.
+
+%package -n python3-forbiddenfruit
+Summary:	Patch Python built-in objects
+Summary(pl.UTF-8):	Łatanie wbudowanych obiektów Pythona
+Group:		Libraries/Python
+Requires:	python3-modules >= 1:3.3
+
+%description -n python3-forbiddenfruit
+This project allows Python code to extend built-in types.
+
+%description -n python3-forbiddenfruit -l pl.UTF-8
+Ten projekt pozwala rozszerzać wbudowane typy z poziomu kodu
+pythonowego.
+
+%prep
+%setup -q -n forbiddenfruit-%{version}
+
+%build
+%if %{with tests}
+export FFRUIT_EXTENSION=true
+%endif
+
+%if %{with python2}
+%py_build
+
+%if %{with tests}
+ln -sf ../../$(echo build-2/lib.*/*.so) tests/unit
+
+nosetests-%{py_ver} tests
+
+%{__rm} tests/unit/*.so
+%endif
+%endif
+
+%if %{with python3}
+%py3_build
+
+%if %{with tests}
+ln -sf ../../$(echo build-3/lib.*/*.so) tests/unit
+
+nosetests-%{py3_ver} tests
+
+%{__rm} tests/unit/*.so
+%endif
+%endif
+
+%install
+rm -rf $RPM_BUILD_ROOT
+
+%if %{with python2}
+%py_install
+
+%py_postclean
+%endif
+
+%if %{with python3}
+%py3_install
+%endif
+
+%clean
+rm -rf $RPM_BUILD_ROOT
+
+%if %{with python2}
+%files
+%defattr(644,root,root,755)
+%doc COPYING.mit README.md
+%{py_sitescriptdir}/forbiddenfruit
+%{py_sitescriptdir}/forbiddenfruit-%{version}-py*.egg-info
+%endif
+
+%if %{with python3}
+%files -n python3-forbiddenfruit
+%defattr(644,root,root,755)
+%doc COPYING.mit README.md
+%{py3_sitescriptdir}/forbiddenfruit
+%{py3_sitescriptdir}/forbiddenfruit-%{version}-py*.egg-info
+%endif
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/python-forbiddenfruit.git/commitdiff/b83304c88883c43018d73c56b68c94192ffd239c



More information about the pld-cvs-commit mailing list