[packages/python-pybind11] - new

baggins baggins at pld-linux.org
Sun Apr 21 11:14:51 CEST 2019


commit 42b43fcab9f0ecc2203c99d0f92fe49b6089fe9e
Author: Jan Rękorajski <baggins at pld-linux.org>
Date:   Sun Apr 21 11:14:33 2019 +0200

    - new

 python-pybind11.spec | 114 +++++++++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 114 insertions(+)
---
diff --git a/python-pybind11.spec b/python-pybind11.spec
new file mode 100644
index 0000000..a13fe70
--- /dev/null
+++ b/python-pybind11.spec
@@ -0,0 +1,114 @@
+#
+# This is template for pure python modules (noarch)
+# use template-specs/python-ext.spec for binary python packages
+#
+#
+# Conditional build:
+%bcond_without	python2 # CPython 2.x module
+%bcond_without	python3 # CPython 3.x module
+
+# NOTES:
+# - 'module' should match the Python import path (first component?)
+# - 'egg_name' should equal to Python egg name
+# - 'pypi_name' must match the Python Package Index name
+%define		module		pybind11
+%define		egg_name	pybind11
+%define		pypi_name	pybind11
+Summary:	Seamless operability between C++11 and Python
+Name:		python-%{pypi_name}
+Version:	2.2.4
+Release:	0.1
+License:	BSD
+Group:		Libraries/Python
+Source0:	https://files.pythonhosted.org/packages/source/p/%{pypi_name}/%{pypi_name}-%{version}.tar.gz
+# Source0-md5:	159d9ac0b6570c2888511b14019a2578
+URL:		https://pypi.org/project/pybind11/
+BuildRequires:	rpmbuild(macros) >= 1.714
+%if %{with python2}
+BuildRequires:	python-modules
+BuildRequires:	python-setuptools
+BuildRequires:	rpm-pythonprov
+%endif
+%if %{with python3}
+BuildRequires:	python3-modules
+BuildRequires:	python3-setuptools
+%endif
+# when using /usr/bin/env or other in-place substitutions
+#BuildRequires:	sed >= 4.0
+# replace with other requires if defined in setup.py
+Requires:	python-modules
+BuildArch:	noarch
+BuildRoot:	%{tmpdir}/%{name}-%{version}-root-%(id -u -n)
+
+%description
+pybind11 is a lightweight header-only library that exposes C++ types
+in Python and vice versa, mainly to create Python bindings of existing
+C++ code. Its goals and syntax are similar to the excellent
+Boost.Python library by David Abrahams: to minimize boilerplate code
+in traditional extension modules by inferring type information using
+compile-time introspection.
+
+%package -n python3-%{pypi_name}
+Summary:	Seamless operability between C++11 and Python
+Group:		Libraries/Python
+Requires:	python3-modules
+
+%description -n python3-%{pypi_name}
+pybind11 is a lightweight header-only library that exposes C++ types
+in Python and vice versa, mainly to create Python bindings of existing
+C++ code. Its goals and syntax are similar to the excellent
+Boost.Python library by David Abrahams: to minimize boilerplate code
+in traditional extension modules by inferring type information using
+compile-time introspection.
+
+%prep
+%setup -q -n %{pypi_name}-%{version}
+
+%build
+%if %{with python2}
+%py_build
+%endif
+
+%if %{with python3}
+%py3_build
+%endif
+
+%install
+rm -rf $RPM_BUILD_ROOT
+
+%if %{with python2}
+%py_install
+
+# when files are installed in other way that standard 'setup.py
+# they need to be (re-)compiled
+# change %{py_sitedir} to %{py_sitescriptdir} for 'noarch' packages!
+%py_ocomp $RPM_BUILD_ROOT%{py_sitedir}
+%py_comp $RPM_BUILD_ROOT%{py_sitedir}
+
+%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 CONTRIBUTING.md README.md
+%{py_sitescriptdir}/%{module}
+%{py_sitescriptdir}/%{egg_name}-%{version}-py*.egg-info
+%{py_incdir}/pybind11
+%endif
+
+%if %{with python3}
+%files -n python3-%{pypi_name}
+%defattr(644,root,root,755)
+%doc CONTRIBUTING.md README.md
+%{py3_sitescriptdir}/%{module}
+%{py3_sitescriptdir}/%{egg_name}-%{version}-py*.egg-info
+%{py3_incdir}/pybind11
+%endif
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/python-pybind11.git/commitdiff/42b43fcab9f0ecc2203c99d0f92fe49b6089fe9e



More information about the pld-cvs-commit mailing list