summaryrefslogtreecommitdiff
path: root/python-django-mysql-geventpool.spec
diff options
context:
space:
mode:
authorCoprDistGit <infra@openeuler.org>2023-05-15 06:02:51 +0000
committerCoprDistGit <infra@openeuler.org>2023-05-15 06:02:51 +0000
commit7dd3c3c015ccfd9b061765b97a008c93c55ea103 (patch)
tree15a00565741681ddcb388d2aa0a172c14d61adda /python-django-mysql-geventpool.spec
parentafef36a5d47c85134b502c292566271d297a2298 (diff)
automatic import of python-django-mysql-geventpool
Diffstat (limited to 'python-django-mysql-geventpool.spec')
-rw-r--r--python-django-mysql-geventpool.spec222
1 files changed, 222 insertions, 0 deletions
diff --git a/python-django-mysql-geventpool.spec b/python-django-mysql-geventpool.spec
new file mode 100644
index 0000000..27830dc
--- /dev/null
+++ b/python-django-mysql-geventpool.spec
@@ -0,0 +1,222 @@
+%global _empty_manifest_terminate_build 0
+Name: python-django-mysql-geventpool
+Version: 0.2.5
+Release: 1
+Summary: Add a MySQL connection pool for django using gevent
+License: Apache 2.0
+URL: https://pypi.org/project/django-mysql-geventpool/
+Source0: https://mirrors.nju.edu.cn/pypi/web/packages/07/70/d9fa86b307d3abb0fb68399c365e7105c27c722c8fbd549385f571329dc5/django-mysql-geventpool-0.2.5.tar.gz
+BuildArch: noarch
+
+
+%description
+# django-mysql-geventpool
+
+[![CircleCI](https://circleci.com/gh/shunsukeaihara/django-mysql-geventpool/tree/master.svg?style=svg)](https://circleci.com/gh/shunsukeaihara/django-mysql-geventpool/tree/master)
+
+Mysql Connection Pooling backend for Django 2.0+ using gevent, only supports Python 3.4 or newer.
+It works with gunicorn async worker via gevent.
+
+This implimentation is based on django-db-geventpool(https://github.com/jneight/django-db-geventpool).
+
+## install
+
+```
+pip install django-mysql-geventpool
+```
+
+## Settings
+
+Add the 'django_mysql_geventpool' modules to the INSTALLED_APPS like this:
+
+```
+INSTALLED_APPS = (
+ 'django.contrib.admin',
+ 'django.contrib.auth',
+ 'django.contrib.contenttypes',
+ 'django.contrib.sessions',
+ 'django.contrib.messages',
+ 'django.contrib.staticfiles',
+ 'django_mysql_geventpool',
+ # ...other installed applications...
+)
+
+```
+
+Add MAX_CONNS to OPTIONS to set the maximun number of connections allowed to database (default=4)
+
+```
+DATABASES = {
+ 'default': {
+ 'ENGINE': 'django_mysql_geventpool.backends.mysql',
+ 'NAME': 'dbname',
+ 'USER': 'dbuser',
+ 'PASSWORD': 'dbpassword',
+ 'HOST': 'dbhost',
+ 'PORT': 'dbport',
+ 'OPTIONS': {
+ 'MAX_CONNS': 20,
+ 'MAX_LIFETIME': 5 * 60 # connection lifetime in seconds, and if set 0, unlimited persistent connections if usable. default is 0.
+ }
+ }
+}
+```
+
+%package -n python3-django-mysql-geventpool
+Summary: Add a MySQL connection pool for django using gevent
+Provides: python-django-mysql-geventpool
+BuildRequires: python3-devel
+BuildRequires: python3-setuptools
+BuildRequires: python3-pip
+%description -n python3-django-mysql-geventpool
+# django-mysql-geventpool
+
+[![CircleCI](https://circleci.com/gh/shunsukeaihara/django-mysql-geventpool/tree/master.svg?style=svg)](https://circleci.com/gh/shunsukeaihara/django-mysql-geventpool/tree/master)
+
+Mysql Connection Pooling backend for Django 2.0+ using gevent, only supports Python 3.4 or newer.
+It works with gunicorn async worker via gevent.
+
+This implimentation is based on django-db-geventpool(https://github.com/jneight/django-db-geventpool).
+
+## install
+
+```
+pip install django-mysql-geventpool
+```
+
+## Settings
+
+Add the 'django_mysql_geventpool' modules to the INSTALLED_APPS like this:
+
+```
+INSTALLED_APPS = (
+ 'django.contrib.admin',
+ 'django.contrib.auth',
+ 'django.contrib.contenttypes',
+ 'django.contrib.sessions',
+ 'django.contrib.messages',
+ 'django.contrib.staticfiles',
+ 'django_mysql_geventpool',
+ # ...other installed applications...
+)
+
+```
+
+Add MAX_CONNS to OPTIONS to set the maximun number of connections allowed to database (default=4)
+
+```
+DATABASES = {
+ 'default': {
+ 'ENGINE': 'django_mysql_geventpool.backends.mysql',
+ 'NAME': 'dbname',
+ 'USER': 'dbuser',
+ 'PASSWORD': 'dbpassword',
+ 'HOST': 'dbhost',
+ 'PORT': 'dbport',
+ 'OPTIONS': {
+ 'MAX_CONNS': 20,
+ 'MAX_LIFETIME': 5 * 60 # connection lifetime in seconds, and if set 0, unlimited persistent connections if usable. default is 0.
+ }
+ }
+}
+```
+
+%package help
+Summary: Development documents and examples for django-mysql-geventpool
+Provides: python3-django-mysql-geventpool-doc
+%description help
+# django-mysql-geventpool
+
+[![CircleCI](https://circleci.com/gh/shunsukeaihara/django-mysql-geventpool/tree/master.svg?style=svg)](https://circleci.com/gh/shunsukeaihara/django-mysql-geventpool/tree/master)
+
+Mysql Connection Pooling backend for Django 2.0+ using gevent, only supports Python 3.4 or newer.
+It works with gunicorn async worker via gevent.
+
+This implimentation is based on django-db-geventpool(https://github.com/jneight/django-db-geventpool).
+
+## install
+
+```
+pip install django-mysql-geventpool
+```
+
+## Settings
+
+Add the 'django_mysql_geventpool' modules to the INSTALLED_APPS like this:
+
+```
+INSTALLED_APPS = (
+ 'django.contrib.admin',
+ 'django.contrib.auth',
+ 'django.contrib.contenttypes',
+ 'django.contrib.sessions',
+ 'django.contrib.messages',
+ 'django.contrib.staticfiles',
+ 'django_mysql_geventpool',
+ # ...other installed applications...
+)
+
+```
+
+Add MAX_CONNS to OPTIONS to set the maximun number of connections allowed to database (default=4)
+
+```
+DATABASES = {
+ 'default': {
+ 'ENGINE': 'django_mysql_geventpool.backends.mysql',
+ 'NAME': 'dbname',
+ 'USER': 'dbuser',
+ 'PASSWORD': 'dbpassword',
+ 'HOST': 'dbhost',
+ 'PORT': 'dbport',
+ 'OPTIONS': {
+ 'MAX_CONNS': 20,
+ 'MAX_LIFETIME': 5 * 60 # connection lifetime in seconds, and if set 0, unlimited persistent connections if usable. default is 0.
+ }
+ }
+}
+```
+
+%prep
+%autosetup -n django-mysql-geventpool-0.2.5
+
+%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-django-mysql-geventpool -f filelist.lst
+%dir %{python3_sitelib}/*
+
+%files help -f doclist.lst
+%{_docdir}/*
+
+%changelog
+* Mon May 15 2023 Python_Bot <Python_Bot@openeuler.org> - 0.2.5-1
+- Package Spec generated