commit 5b68e9bbd24126d4d25a7b7de384cfcc73b94694
Author: Jakub Bogusz <[email protected]>
Date:   Sun Dec 10 17:05:40 2023 +0100

    - initial

 mockldap-requires.patch |  11 +++++
 python-mockldap.spec    | 119 ++++++++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 130 insertions(+)
---
diff --git a/python-mockldap.spec b/python-mockldap.spec
new file mode 100644
index 0000000..15826a6
--- /dev/null
+++ b/python-mockldap.spec
@@ -0,0 +1,119 @@
+#
+# Conditional build:
+%bcond_without doc     # Sphinx documentation
+%bcond_without python2 # CPython 2.x module
+%bcond_without python3 # CPython 3.x module
+
+Summary:       A simple mock implementation of python-ldap
+Summary(pl.UTF-8):     Prosta implementacja atrapy python-ldap
+Name:          python-mockldap
+Version:       0.3.0.post1
+Release:       1
+License:       CC0 v1.0
+Group:         Libraries/Python
+#Source0Download: https://pypi.org/simple/mockldap/
+Source0:       
https://files.pythonhosted.org/packages/source/m/mockldap/mockldap-%{version}.tar.gz
+# Source0-md5: d48dc593c7afe9c7a97b561b869501b0
+Patch0:                mockldap-requires.patch
+URL:           https://pypi.org/project/mockldap/
+%if %{with python2}
+BuildRequires: python-modules >= 1:2.7
+BuildRequires: python-setuptools >= 1:0.6c11
+%endif
+%if %{with python3}
+BuildRequires: python3-modules >= 1:3.4
+BuildRequires: python3-setuptools >= 1:0.6c11
+%endif
+BuildRequires: rpm-pythonprov
+BuildRequires: rpmbuild(macros) >= 1.714
+%if %{with doc}
+BuildRequires: sphinx-pdg-3
+%endif
+Requires:      python-modules >= 1:2.7
+BuildArch:     noarch
+BuildRoot:     %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
+
+%description
+A simple mock implementation of python-ldap.
+
+%description -l pl.UTF-8
+Prosta implementacja atrapy python-ldap.
+
+%package -n python3-mockldap
+Summary:       A simple mock implementation of python-ldap
+Summary(pl.UTF-8):     Prosta implementacja atrapy python-ldap
+Group:         Libraries/Python
+Requires:      python3-modules >= 1:3.4
+
+%description -n python3-mockldap
+A simple mock implementation of python-ldap.
+
+%description -n python3-mockldap -l pl.UTF-8
+Prosta implementacja atrapy python-ldap.
+
+%package apidocs
+Summary:       API documentation for Python mockldap module
+Summary(pl.UTF-8):     Dokumentacja API modułu Pythona mockldap
+Group:         Documentation
+
+%description apidocs
+API documentation for Python mockldap module.
+
+%description apidocs -l pl.UTF-8
+Dokumentacja API modułu Pythona mockldap.
+
+%prep
+%setup -q -n mockldap-%{version}
+%patch0 -p1
+
+%build
+%if %{with python2}
+%py_build
+%endif
+
+%if %{with python3}
+%py3_build
+%endif
+
+%if %{with doc}
+%{__make} -C docs html \
+       SPHINXBUILD=sphinx-build-3
+%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 CHANGES LICENSE.rst README.rst
+%{py_sitescriptdir}/mockldap
+%{py_sitescriptdir}/mockldap-%{version}-py*.egg-info
+%endif
+
+%if %{with python3}
+%files -n python3-mockldap
+%defattr(644,root,root,755)
+%doc CHANGES LICENSE.rst README.rst
+%{py3_sitescriptdir}/mockldap
+%{py3_sitescriptdir}/mockldap-%{version}-py*.egg-info
+%endif
+
+%if %{with doc}
+%files apidocs
+%defattr(644,root,root,755)
+%doc docs/build/html/{_modules,_static,*.html,*.js}
+%endif
diff --git a/mockldap-requires.patch b/mockldap-requires.patch
new file mode 100644
index 0000000..23b7005
--- /dev/null
+++ b/mockldap-requires.patch
@@ -0,0 +1,11 @@
+--- mockldap-0.3.0.post1/setup.py.orig 2019-08-28 19:22:31.000000000 +0200
++++ mockldap-0.3.0.post1/setup.py      2023-12-10 16:23:50.675454847 +0100
+@@ -37,7 +37,7 @@ setup(
+     ],
+     keywords=['mock', 'ldap'],
+     install_requires=[
+-        'funcparserlib == 0.3.6',
++        'funcparserlib >= 0.3.6',
+         'mock; python_version < "3.0"',
+         'python-ldap >= 3.0',
+     ],
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/python-mockldap.git/commitdiff/5b68e9bbd24126d4d25a7b7de384cfcc73b94694

_______________________________________________
pld-cvs-commit mailing list
[email protected]
http://lists.pld-linux.org/mailman/listinfo/pld-cvs-commit

Reply via email to