diff options
author | CoprDistGit <infra@openeuler.org> | 2023-06-20 06:39:25 +0000 |
---|---|---|
committer | CoprDistGit <infra@openeuler.org> | 2023-06-20 06:39:25 +0000 |
commit | dfdca157d287a4e23d04107d0078375bb96feef2 (patch) | |
tree | 4b00e901569f12eeddff9ae6a20200ab0e4364af | |
parent | 47576f15de3cd0c81cb9d7390b7e8edee7f051fd (diff) |
automatic import of python-django-purgeopeneuler20.03
-rw-r--r-- | .gitignore | 1 | ||||
-rw-r--r-- | python-django-purge.spec | 344 | ||||
-rw-r--r-- | sources | 1 |
3 files changed, 346 insertions, 0 deletions
@@ -0,0 +1 @@ +/django-purge-1.0.0.tar.gz diff --git a/python-django-purge.spec b/python-django-purge.spec new file mode 100644 index 0000000..4b57220 --- /dev/null +++ b/python-django-purge.spec @@ -0,0 +1,344 @@ +%global _empty_manifest_terminate_build 0 +Name: python-django-purge +Version: 1.0.0 +Release: 1 +Summary: A reusable Django app for purging database records (e.g., logs). +License: MIT +URL: https://github.com/gregschmit/django-purge +Source0: https://mirrors.aliyun.com/pypi/web/packages/2c/ea/1ac4614e9eee649054b3a149398991a88f88ec3755e761a98a18a9e955f0/django-purge-1.0.0.tar.gz +BuildArch: noarch + +Requires: python3-Django +Requires: python3-dateutil + +%description +Purge +##### + +.. inclusion-marker-do-not-remove + +.. image:: https://travis-ci.org/gregschmit/django-purge.svg?branch=master + :alt: Build Status + :target: https://travis-ci.org/gregschmit/django-purge + +.. image:: https://readthedocs.org/projects/django-purge/badge/?version=latest + :alt: Documentation Status + :target: https://django-purge.readthedocs.io/en/latest/?badge=latest + +.. image:: https://img.shields.io/pypi/v/django-purge + :alt: PyPI + :target: https://pypi.org/project/django-purge/ + +.. image:: https://coveralls.io/repos/github/gregschmit/django-purge/badge.svg?branch=master + :alt: Coverage Report + :target: https://coveralls.io/github/gregschmit/django-purge?branch=master + +Documentation: https://django-purge.readthedocs.io + +Source: https://github.com/gregschmit/django-purge + +PyPI: https://pypi.org/project/django-purge/ + +Purge is a reusable Django app for regularly purging old database entries, like +logs. + +**The Problem**: Tables/models like sessions and logs can grow without limit. + +**The Solution**: This app allows you to schedule database purging of old +records. You can also make FilePurgers which can purge old files based on +datestamps in the filename or timestamps in the meta-data (atime/mtime/ctime). + +How to Use +########## + +.. code-block:: shell + + $ pip install django-purge + +Include :code:`purge` in your :code:`INSTALLED_APPS`. Then, create your +database purgers or file purgers in the admin interface. + +Then, either periodically call the :code:`purge` management command (e.g., via a +system cronjob), or install and configure :code:`django-cron` (add +:code:`purge.cron` to your :code:`CRON_CLASSES` in your +:code:`settings.py`). The builtin :code:`CronJob` class is set to run every 4 +hours. You can change this by altering your :code:`settings.py` and adding +:code:`PURGE_CRON_RUN_AT_TIMES` to an array of times you want to run the job at +(e.g., :code:`['1:00']` to run at 1am). + +Contributing +############ + +Email gschmi4@uic.edu if you want to contribute. You must only contribute code +that you have authored or otherwise hold the copyright to, and you must +make any contributions to this project available under the MIT license. + +To collaborators: don't push using the :code:`--force` option. + +Dev Quickstart +############## + +Purge comes with a `settings.py` file, technically making it a Django project as +well as a Django app. First clone, the repository into a location of your +choosing: + +.. code-block:: shell + + $ git clone https://github.com/gregschmit/django-purge + +Then you can go into the :code:`django-purge` directory and do the initial +migrations and run the server (you may need to type :code:`python3` rather than +:code:`python`): + +.. code-block:: shell + + $ cd django-purge + $ python manage.py makemigrations + $ python manage.py migrate + $ python manage.py createsuperuser + ... + $ python manage.py runserver + +Then you can see the models at http://127.0.0.1:8000/admin. + + + + +%package -n python3-django-purge +Summary: A reusable Django app for purging database records (e.g., logs). +Provides: python-django-purge +BuildRequires: python3-devel +BuildRequires: python3-setuptools +BuildRequires: python3-pip +%description -n python3-django-purge +Purge +##### + +.. inclusion-marker-do-not-remove + +.. image:: https://travis-ci.org/gregschmit/django-purge.svg?branch=master + :alt: Build Status + :target: https://travis-ci.org/gregschmit/django-purge + +.. image:: https://readthedocs.org/projects/django-purge/badge/?version=latest + :alt: Documentation Status + :target: https://django-purge.readthedocs.io/en/latest/?badge=latest + +.. image:: https://img.shields.io/pypi/v/django-purge + :alt: PyPI + :target: https://pypi.org/project/django-purge/ + +.. image:: https://coveralls.io/repos/github/gregschmit/django-purge/badge.svg?branch=master + :alt: Coverage Report + :target: https://coveralls.io/github/gregschmit/django-purge?branch=master + +Documentation: https://django-purge.readthedocs.io + +Source: https://github.com/gregschmit/django-purge + +PyPI: https://pypi.org/project/django-purge/ + +Purge is a reusable Django app for regularly purging old database entries, like +logs. + +**The Problem**: Tables/models like sessions and logs can grow without limit. + +**The Solution**: This app allows you to schedule database purging of old +records. You can also make FilePurgers which can purge old files based on +datestamps in the filename or timestamps in the meta-data (atime/mtime/ctime). + +How to Use +########## + +.. code-block:: shell + + $ pip install django-purge + +Include :code:`purge` in your :code:`INSTALLED_APPS`. Then, create your +database purgers or file purgers in the admin interface. + +Then, either periodically call the :code:`purge` management command (e.g., via a +system cronjob), or install and configure :code:`django-cron` (add +:code:`purge.cron` to your :code:`CRON_CLASSES` in your +:code:`settings.py`). The builtin :code:`CronJob` class is set to run every 4 +hours. You can change this by altering your :code:`settings.py` and adding +:code:`PURGE_CRON_RUN_AT_TIMES` to an array of times you want to run the job at +(e.g., :code:`['1:00']` to run at 1am). + +Contributing +############ + +Email gschmi4@uic.edu if you want to contribute. You must only contribute code +that you have authored or otherwise hold the copyright to, and you must +make any contributions to this project available under the MIT license. + +To collaborators: don't push using the :code:`--force` option. + +Dev Quickstart +############## + +Purge comes with a `settings.py` file, technically making it a Django project as +well as a Django app. First clone, the repository into a location of your +choosing: + +.. code-block:: shell + + $ git clone https://github.com/gregschmit/django-purge + +Then you can go into the :code:`django-purge` directory and do the initial +migrations and run the server (you may need to type :code:`python3` rather than +:code:`python`): + +.. code-block:: shell + + $ cd django-purge + $ python manage.py makemigrations + $ python manage.py migrate + $ python manage.py createsuperuser + ... + $ python manage.py runserver + +Then you can see the models at http://127.0.0.1:8000/admin. + + + + +%package help +Summary: Development documents and examples for django-purge +Provides: python3-django-purge-doc +%description help +Purge +##### + +.. inclusion-marker-do-not-remove + +.. image:: https://travis-ci.org/gregschmit/django-purge.svg?branch=master + :alt: Build Status + :target: https://travis-ci.org/gregschmit/django-purge + +.. image:: https://readthedocs.org/projects/django-purge/badge/?version=latest + :alt: Documentation Status + :target: https://django-purge.readthedocs.io/en/latest/?badge=latest + +.. image:: https://img.shields.io/pypi/v/django-purge + :alt: PyPI + :target: https://pypi.org/project/django-purge/ + +.. image:: https://coveralls.io/repos/github/gregschmit/django-purge/badge.svg?branch=master + :alt: Coverage Report + :target: https://coveralls.io/github/gregschmit/django-purge?branch=master + +Documentation: https://django-purge.readthedocs.io + +Source: https://github.com/gregschmit/django-purge + +PyPI: https://pypi.org/project/django-purge/ + +Purge is a reusable Django app for regularly purging old database entries, like +logs. + +**The Problem**: Tables/models like sessions and logs can grow without limit. + +**The Solution**: This app allows you to schedule database purging of old +records. You can also make FilePurgers which can purge old files based on +datestamps in the filename or timestamps in the meta-data (atime/mtime/ctime). + +How to Use +########## + +.. code-block:: shell + + $ pip install django-purge + +Include :code:`purge` in your :code:`INSTALLED_APPS`. Then, create your +database purgers or file purgers in the admin interface. + +Then, either periodically call the :code:`purge` management command (e.g., via a +system cronjob), or install and configure :code:`django-cron` (add +:code:`purge.cron` to your :code:`CRON_CLASSES` in your +:code:`settings.py`). The builtin :code:`CronJob` class is set to run every 4 +hours. You can change this by altering your :code:`settings.py` and adding +:code:`PURGE_CRON_RUN_AT_TIMES` to an array of times you want to run the job at +(e.g., :code:`['1:00']` to run at 1am). + +Contributing +############ + +Email gschmi4@uic.edu if you want to contribute. You must only contribute code +that you have authored or otherwise hold the copyright to, and you must +make any contributions to this project available under the MIT license. + +To collaborators: don't push using the :code:`--force` option. + +Dev Quickstart +############## + +Purge comes with a `settings.py` file, technically making it a Django project as +well as a Django app. First clone, the repository into a location of your +choosing: + +.. code-block:: shell + + $ git clone https://github.com/gregschmit/django-purge + +Then you can go into the :code:`django-purge` directory and do the initial +migrations and run the server (you may need to type :code:`python3` rather than +:code:`python`): + +.. code-block:: shell + + $ cd django-purge + $ python manage.py makemigrations + $ python manage.py migrate + $ python manage.py createsuperuser + ... + $ python manage.py runserver + +Then you can see the models at http://127.0.0.1:8000/admin. + + + + +%prep +%autosetup -n django-purge-1.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-django-purge -f filelist.lst +%dir %{python3_sitelib}/* + +%files help -f doclist.lst +%{_docdir}/* + +%changelog +* Tue Jun 20 2023 Python_Bot <Python_Bot@openeuler.org> - 1.0.0-1 +- Package Spec generated @@ -0,0 +1 @@ +0eae804aadaf4aef0cead208e750a732 django-purge-1.0.0.tar.gz |