From 0f83c3e4abec2541a3f2cdb5750e387bfdd90bd7 Mon Sep 17 00:00:00 2001 From: CoprDistGit Date: Thu, 9 Mar 2023 15:07:17 +0000 Subject: automatic import of python-pluginbase --- python-pluginbase.spec | 111 +++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 111 insertions(+) create mode 100644 python-pluginbase.spec (limited to 'python-pluginbase.spec') diff --git a/python-pluginbase.spec b/python-pluginbase.spec new file mode 100644 index 0000000..894026b --- /dev/null +++ b/python-pluginbase.spec @@ -0,0 +1,111 @@ +%global _empty_manifest_terminate_build 0 +Name: python-pluginbase +Version: 1.0.1 +Release: 1 +Summary: PluginBase is a module for Python that enables the development of flexible plugin systems in Python. +License: BSD License +URL: http://github.com/mitsuhiko/pluginbase +Source0: https://mirrors.nju.edu.cn/pypi/web/packages/f3/07/753451e80d2b0bf3bceec1162e8d23638ac3cb18d1c38ad340c586e90b42/pluginbase-1.0.1.tar.gz +BuildArch: noarch + + +%description +PluginBase is a module for Python that enables the development of flexible plugin systems in Python. +Step 1: + from pluginbase import PluginBase + plugin_base = PluginBase(package='yourapplication.plugins') +Step 2: + plugin_source = plugin_base.make_plugin_source( + searchpath=['./path/to/plugins', './path/to/more/plugins']) +Step 3: + with plugin_source: + from yourapplication.plugins import my_plugin + my_plugin.do_something_cool() +Or alternatively: + my_plugin = plugin_source.load_plugin('my_plugin') + my_plugin.do_something_cool() + +%package -n python3-pluginbase +Summary: PluginBase is a module for Python that enables the development of flexible plugin systems in Python. +Provides: python-pluginbase +BuildRequires: python3-devel +BuildRequires: python3-setuptools +BuildRequires: python3-pip +%description -n python3-pluginbase +PluginBase is a module for Python that enables the development of flexible plugin systems in Python. +Step 1: + from pluginbase import PluginBase + plugin_base = PluginBase(package='yourapplication.plugins') +Step 2: + plugin_source = plugin_base.make_plugin_source( + searchpath=['./path/to/plugins', './path/to/more/plugins']) +Step 3: + with plugin_source: + from yourapplication.plugins import my_plugin + my_plugin.do_something_cool() +Or alternatively: + my_plugin = plugin_source.load_plugin('my_plugin') + my_plugin.do_something_cool() + +%package help +Summary: Development documents and examples for pluginbase +Provides: python3-pluginbase-doc +%description help +PluginBase is a module for Python that enables the development of flexible plugin systems in Python. +Step 1: + from pluginbase import PluginBase + plugin_base = PluginBase(package='yourapplication.plugins') +Step 2: + plugin_source = plugin_base.make_plugin_source( + searchpath=['./path/to/plugins', './path/to/more/plugins']) +Step 3: + with plugin_source: + from yourapplication.plugins import my_plugin + my_plugin.do_something_cool() +Or alternatively: + my_plugin = plugin_source.load_plugin('my_plugin') + my_plugin.do_something_cool() + +%prep +%autosetup -n pluginbase-1.0.1 + +%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-pluginbase -f filelist.lst +%dir %{python3_sitelib}/* + +%files help -f doclist.lst +%{_docdir}/* + +%changelog +* Thu Mar 09 2023 Python_Bot - 1.0.1-1 +- Package Spec generated -- cgit v1.2.3