summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.gitignore1
-rw-r--r--python-pybind11-stubgen.spec81
-rw-r--r--sources1
3 files changed, 83 insertions, 0 deletions
diff --git a/.gitignore b/.gitignore
index e69de29..8c6c4e7 100644
--- a/.gitignore
+++ b/.gitignore
@@ -0,0 +1 @@
+/pybind11-stubgen-0.15.0.tar.gz
diff --git a/python-pybind11-stubgen.spec b/python-pybind11-stubgen.spec
new file mode 100644
index 0000000..9bed048
--- /dev/null
+++ b/python-pybind11-stubgen.spec
@@ -0,0 +1,81 @@
+%global _empty_manifest_terminate_build 0
+Name: python-pybind11-stubgen
+Version: 0.15.0
+Release: 1
+Summary: PEP 561 type stubs generator for pybind11 modules
+License: BSD
+URL: https://github.com/sizmailov/pybind11-stubgen
+Source0: https://mirrors.aliyun.com/pypi/web/packages/47/cc/973c9ed53d2de91586425cb8c3d1a3d4cd4a07275e523bc06d32dd81c364/pybind11-stubgen-0.15.0.tar.gz
+BuildArch: noarch
+
+
+%description
+Generates stubs for python modules
+There are several tweaks to target specifically modules compiled using `pybind11 <https://github.com/pybind/pybind11>`_
+Package targets python3 only. (In fact, it's compatible with python2 but it's not officially supported)
+Issues/PR are welcome
+
+%package -n python3-pybind11-stubgen
+Summary: PEP 561 type stubs generator for pybind11 modules
+Provides: python-pybind11-stubgen
+BuildRequires: python3-devel
+BuildRequires: python3-setuptools
+BuildRequires: python3-pip
+%description -n python3-pybind11-stubgen
+Generates stubs for python modules
+There are several tweaks to target specifically modules compiled using `pybind11 <https://github.com/pybind/pybind11>`_
+Package targets python3 only. (In fact, it's compatible with python2 but it's not officially supported)
+Issues/PR are welcome
+
+%package help
+Summary: Development documents and examples for pybind11-stubgen
+Provides: python3-pybind11-stubgen-doc
+%description help
+Generates stubs for python modules
+There are several tweaks to target specifically modules compiled using `pybind11 <https://github.com/pybind/pybind11>`_
+Package targets python3 only. (In fact, it's compatible with python2 but it's not officially supported)
+Issues/PR are welcome
+
+%prep
+%autosetup -n pybind11-stubgen-0.15.0
+
+%build
+%py3_build
+
+%install
+%py3_install
+install -d -m755 %{buildroot}/%{_pkgdocdir}
+if [ -d doc ]; then cp -arf doc %{buildroot}/%{_pkgdocdir}; fi
+if [ -d docs ]; then cp -arf docs %{buildroot}/%{_pkgdocdir}; fi
+if [ -d example ]; then cp -arf example %{buildroot}/%{_pkgdocdir}; fi
+if [ -d examples ]; then cp -arf examples %{buildroot}/%{_pkgdocdir}; fi
+pushd %{buildroot}
+if [ -d usr/lib ]; then
+ find usr/lib -type f -printf "\"/%h/%f\"\n" >> filelist.lst
+fi
+if [ -d usr/lib64 ]; then
+ find usr/lib64 -type f -printf "\"/%h/%f\"\n" >> filelist.lst
+fi
+if [ -d usr/bin ]; then
+ find usr/bin -type f -printf "\"/%h/%f\"\n" >> filelist.lst
+fi
+if [ -d usr/sbin ]; then
+ find usr/sbin -type f -printf "\"/%h/%f\"\n" >> filelist.lst
+fi
+touch doclist.lst
+if [ -d usr/share/man ]; then
+ find usr/share/man -type f -printf "\"/%h/%f.gz\"\n" >> doclist.lst
+fi
+popd
+mv %{buildroot}/filelist.lst .
+mv %{buildroot}/doclist.lst .
+
+%files -n python3-pybind11-stubgen -f filelist.lst
+%dir %{python3_sitelib}/*
+
+%files help -f doclist.lst
+%{_docdir}/*
+
+%changelog
+* Fri Jun 09 2023 Python_Bot <Python_Bot@openeuler.org> - 0.15.0-1
+- Package Spec generated
diff --git a/sources b/sources
new file mode 100644
index 0000000..f8335a1
--- /dev/null
+++ b/sources
@@ -0,0 +1 @@
+0f5e6ebe57e3ab573a17f6aa40915360 pybind11-stubgen-0.15.0.tar.gz