diff options
| author | CoprDistGit <infra@openeuler.org> | 2023-05-18 03:10:25 +0000 |
|---|---|---|
| committer | CoprDistGit <infra@openeuler.org> | 2023-05-18 03:10:25 +0000 |
| commit | 4b83df842ae0ee921598d64fc7daf5c8b302bbe0 (patch) | |
| tree | a7c07bd33aa60b42943064968de2c728944534ab | |
| parent | 85c34e343bd39630f55f81b6c678dc69cfa772ed (diff) | |
automatic import of python-mysql-server-has-gone-away
| -rw-r--r-- | .gitignore | 1 | ||||
| -rw-r--r-- | python-mysql-server-has-gone-away.spec | 138 | ||||
| -rw-r--r-- | sources | 1 |
3 files changed, 140 insertions, 0 deletions
@@ -0,0 +1 @@ +/mysql_server_has_gone_away-2.0.0.tar.gz diff --git a/python-mysql-server-has-gone-away.spec b/python-mysql-server-has-gone-away.spec new file mode 100644 index 0000000..6e53919 --- /dev/null +++ b/python-mysql-server-has-gone-away.spec @@ -0,0 +1,138 @@ +%global _empty_manifest_terminate_build 0 +Name: python-mysql-server-has-gone-away +Version: 2.0.0 +Release: 1 +Summary: Django myslq backend that fixes issue with long living connection +License: MIT +URL: https://github.com/akoidan/MySQL-server-has-gone-away +Source0: https://mirrors.nju.edu.cn/pypi/web/packages/d2/cb/b9bdefe42ac53dec8626ab816fd42e578121aef791b5268f5d98d22481c4/mysql_server_has_gone_away-2.0.0.tar.gz +BuildArch: noarch + + +%description +# MySQL-server-has-gone-away + +This repository solves issue where database connection inside of django overlives MySQL database connection timeout specified in `/etc/my.cnf` `wait_timeout = xxxx`. [See this issue](https://stackoverflow.com/questions/26958592/django-after-upgrade-mysql-server-has-gone-away) + + +## How to use: +1. For Django 1.x and 2.x use `pip install mysql_server_has_gone_away==1.0.0` + +1. For django 3.x use `pip install mysql_server_has_gone_away==2.0.0` + +1. Put this engine into Django `settings.py`: + +```python +DATABASES = { + 'default': { + 'ENGINE': 'mysql_server_has_gone_away', + #'NAME': 'database-name', + #'USER': 'database-user', + #'PASSWORD': 'database-password', + #'HOST': 'localhost', + } +} +``` + +%package -n python3-mysql-server-has-gone-away +Summary: Django myslq backend that fixes issue with long living connection +Provides: python-mysql-server-has-gone-away +BuildRequires: python3-devel +BuildRequires: python3-setuptools +BuildRequires: python3-pip +%description -n python3-mysql-server-has-gone-away +# MySQL-server-has-gone-away + +This repository solves issue where database connection inside of django overlives MySQL database connection timeout specified in `/etc/my.cnf` `wait_timeout = xxxx`. [See this issue](https://stackoverflow.com/questions/26958592/django-after-upgrade-mysql-server-has-gone-away) + + +## How to use: +1. For Django 1.x and 2.x use `pip install mysql_server_has_gone_away==1.0.0` + +1. For django 3.x use `pip install mysql_server_has_gone_away==2.0.0` + +1. Put this engine into Django `settings.py`: + +```python +DATABASES = { + 'default': { + 'ENGINE': 'mysql_server_has_gone_away', + #'NAME': 'database-name', + #'USER': 'database-user', + #'PASSWORD': 'database-password', + #'HOST': 'localhost', + } +} +``` + +%package help +Summary: Development documents and examples for mysql-server-has-gone-away +Provides: python3-mysql-server-has-gone-away-doc +%description help +# MySQL-server-has-gone-away + +This repository solves issue where database connection inside of django overlives MySQL database connection timeout specified in `/etc/my.cnf` `wait_timeout = xxxx`. [See this issue](https://stackoverflow.com/questions/26958592/django-after-upgrade-mysql-server-has-gone-away) + + +## How to use: +1. For Django 1.x and 2.x use `pip install mysql_server_has_gone_away==1.0.0` + +1. For django 3.x use `pip install mysql_server_has_gone_away==2.0.0` + +1. Put this engine into Django `settings.py`: + +```python +DATABASES = { + 'default': { + 'ENGINE': 'mysql_server_has_gone_away', + #'NAME': 'database-name', + #'USER': 'database-user', + #'PASSWORD': 'database-password', + #'HOST': 'localhost', + } +} +``` + +%prep +%autosetup -n mysql-server-has-gone-away-2.0.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-mysql-server-has-gone-away -f filelist.lst +%dir %{python3_sitelib}/* + +%files help -f doclist.lst +%{_docdir}/* + +%changelog +* Thu May 18 2023 Python_Bot <Python_Bot@openeuler.org> - 2.0.0-1 +- Package Spec generated @@ -0,0 +1 @@ +6d532003efc86aaeedd881f50e8d2810 mysql_server_has_gone_away-2.0.0.tar.gz |
