summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCoprDistGit <infra@openeuler.org>2023-05-10 06:48:34 +0000
committerCoprDistGit <infra@openeuler.org>2023-05-10 06:48:34 +0000
commitf4bbc35e5b527a98d6df2df9e6b8b4d6bc3a7162 (patch)
tree00cac0a9a31dcf383d8496c5e30f135fc3f09dc0
parent4d7b5a287be2e3388ce92250bc04baa01e18dac7 (diff)
automatic import of python-django-postgrespool2
-rw-r--r--.gitignore1
-rw-r--r--python-django-postgrespool2.spec120
-rw-r--r--sources1
3 files changed, 122 insertions, 0 deletions
diff --git a/.gitignore b/.gitignore
index e69de29..b0217e3 100644
--- a/.gitignore
+++ b/.gitignore
@@ -0,0 +1 @@
+/django-postgrespool2-2.0.5.tar.gz
diff --git a/python-django-postgrespool2.spec b/python-django-postgrespool2.spec
new file mode 100644
index 0000000..0584f90
--- /dev/null
+++ b/python-django-postgrespool2.spec
@@ -0,0 +1,120 @@
+%global _empty_manifest_terminate_build 0
+Name: python-django-postgrespool2
+Version: 2.0.5
+Release: 1
+Summary: PostgreSQL connection pooling for Django.
+License: MIT
+URL: https://github.com/lcd1232/django-postgrespool2
+Source0: https://mirrors.nju.edu.cn/pypi/web/packages/31/66/da9acf125d9a8f29532eba9187751c52f83d6c6b2e6cb9968b7409e1c931/django-postgrespool2-2.0.5.tar.gz
+BuildArch: noarch
+
+
+%description
+Optionally, you can provide pool class to construct the pool (default `sqlalchemy.pool.QueuePool`) or additional options to pass to SQLAlchemy's pool creation.
+List of possible values `DATABASE_POOL_CLASS` is [here](https://docs.sqlalchemy.org/en/14/core/pooling.html#api-documentation-available-pool-implementations)
+```python
+DATABASE_POOL_CLASS = 'sqlalchemy.pool.QueuePool'
+DATABASE_POOL_ARGS = {
+ 'max_overflow': 10,
+ 'pool_size': 5,
+ 'recycle': 300,
+}
+```
+Here's a basic explanation of two of these options:
+- **pool_size** – The *minimum* number of connections to maintain in the pool.
+- **max_overflow** – The maximum *overflow* size of the pool. This is not the maximum size of the pool.
+- **recycle** - Number of seconds between connection recycling, which means upon checkout, if this timeout is surpassed the connection will be closed and replaced with a newly opened connection.
+The total number of "sleeping" connections the pool will allow is `pool_size`. The total simultaneous connections the pool will allow is `pool_size + max_overflow`.
+As an example, databases in the [Heroku Postgres](https://www.heroku.com/postgres) starter tier have a maximum connection limit of 20. In that case your `pool_size` and `max_overflow`, when combined, should not exceed 20.
+Check out the official [SQLAlchemy Connection Pooling](http://docs.sqlalchemy.org/en/latest/core/pooling.html#sqlalchemy.pool.QueuePool.__init__) docs to learn more about the optoins that can be defined in `DATABASE_POOL_ARGS`.
+
+%package -n python3-django-postgrespool2
+Summary: PostgreSQL connection pooling for Django.
+Provides: python-django-postgrespool2
+BuildRequires: python3-devel
+BuildRequires: python3-setuptools
+BuildRequires: python3-pip
+%description -n python3-django-postgrespool2
+Optionally, you can provide pool class to construct the pool (default `sqlalchemy.pool.QueuePool`) or additional options to pass to SQLAlchemy's pool creation.
+List of possible values `DATABASE_POOL_CLASS` is [here](https://docs.sqlalchemy.org/en/14/core/pooling.html#api-documentation-available-pool-implementations)
+```python
+DATABASE_POOL_CLASS = 'sqlalchemy.pool.QueuePool'
+DATABASE_POOL_ARGS = {
+ 'max_overflow': 10,
+ 'pool_size': 5,
+ 'recycle': 300,
+}
+```
+Here's a basic explanation of two of these options:
+- **pool_size** – The *minimum* number of connections to maintain in the pool.
+- **max_overflow** – The maximum *overflow* size of the pool. This is not the maximum size of the pool.
+- **recycle** - Number of seconds between connection recycling, which means upon checkout, if this timeout is surpassed the connection will be closed and replaced with a newly opened connection.
+The total number of "sleeping" connections the pool will allow is `pool_size`. The total simultaneous connections the pool will allow is `pool_size + max_overflow`.
+As an example, databases in the [Heroku Postgres](https://www.heroku.com/postgres) starter tier have a maximum connection limit of 20. In that case your `pool_size` and `max_overflow`, when combined, should not exceed 20.
+Check out the official [SQLAlchemy Connection Pooling](http://docs.sqlalchemy.org/en/latest/core/pooling.html#sqlalchemy.pool.QueuePool.__init__) docs to learn more about the optoins that can be defined in `DATABASE_POOL_ARGS`.
+
+%package help
+Summary: Development documents and examples for django-postgrespool2
+Provides: python3-django-postgrespool2-doc
+%description help
+Optionally, you can provide pool class to construct the pool (default `sqlalchemy.pool.QueuePool`) or additional options to pass to SQLAlchemy's pool creation.
+List of possible values `DATABASE_POOL_CLASS` is [here](https://docs.sqlalchemy.org/en/14/core/pooling.html#api-documentation-available-pool-implementations)
+```python
+DATABASE_POOL_CLASS = 'sqlalchemy.pool.QueuePool'
+DATABASE_POOL_ARGS = {
+ 'max_overflow': 10,
+ 'pool_size': 5,
+ 'recycle': 300,
+}
+```
+Here's a basic explanation of two of these options:
+- **pool_size** – The *minimum* number of connections to maintain in the pool.
+- **max_overflow** – The maximum *overflow* size of the pool. This is not the maximum size of the pool.
+- **recycle** - Number of seconds between connection recycling, which means upon checkout, if this timeout is surpassed the connection will be closed and replaced with a newly opened connection.
+The total number of "sleeping" connections the pool will allow is `pool_size`. The total simultaneous connections the pool will allow is `pool_size + max_overflow`.
+As an example, databases in the [Heroku Postgres](https://www.heroku.com/postgres) starter tier have a maximum connection limit of 20. In that case your `pool_size` and `max_overflow`, when combined, should not exceed 20.
+Check out the official [SQLAlchemy Connection Pooling](http://docs.sqlalchemy.org/en/latest/core/pooling.html#sqlalchemy.pool.QueuePool.__init__) docs to learn more about the optoins that can be defined in `DATABASE_POOL_ARGS`.
+
+%prep
+%autosetup -n django-postgrespool2-2.0.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-postgrespool2 -f filelist.lst
+%dir %{python3_sitelib}/*
+
+%files help -f doclist.lst
+%{_docdir}/*
+
+%changelog
+* Wed May 10 2023 Python_Bot <Python_Bot@openeuler.org> - 2.0.5-1
+- Package Spec generated
diff --git a/sources b/sources
new file mode 100644
index 0000000..5003791
--- /dev/null
+++ b/sources
@@ -0,0 +1 @@
+8990eec470dfbae0a46b6bea22999618 django-postgrespool2-2.0.5.tar.gz