summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.gitignore1
-rw-r--r--python-django-jsonfallback.spec103
-rw-r--r--sources1
3 files changed, 105 insertions, 0 deletions
diff --git a/.gitignore b/.gitignore
index e69de29..d862b0b 100644
--- a/.gitignore
+++ b/.gitignore
@@ -0,0 +1 @@
+/django-jsonfallback-2.1.2.tar.gz
diff --git a/python-django-jsonfallback.spec b/python-django-jsonfallback.spec
new file mode 100644
index 0000000..c9ff5d7
--- /dev/null
+++ b/python-django-jsonfallback.spec
@@ -0,0 +1,103 @@
+%global _empty_manifest_terminate_build 0
+Name: python-django-jsonfallback
+Version: 2.1.2
+Release: 1
+Summary: JSONField from django.contrib.postgres, but with a fallback to TextField
+License: Apache License 2.0
+URL: https://github.com/raphaelm/django-jsonfallback
+Source0: https://mirrors.nju.edu.cn/pypi/web/packages/61/66/76401cb44b2a1882db71764709f93b324a5e36b8d53b7359c75766e5e0a8/django-jsonfallback-2.1.2.tar.gz
+BuildArch: noarch
+
+Requires: python3-django-mysql
+
+%description
+This is an extension to ``django.contrib.postgres.fields.JSONField``, that works on other
+databases than PostgreSQL.
+* On **MySQL** and **MariaDB**, it uses the native JSON data type and supports most features.
+* On **SQLite** and all other databases, it just stores JSON strings in a text field and does not support querying.
+This is tested against:
+* Python 3.4 to 3.6
+* Django 2.0 to 2.1
+* MySQL 5.7
+* MariaDB 10.3
+* PostgreSQL 9.4
+* SQLite (no querying funcationality)
+
+%package -n python3-django-jsonfallback
+Summary: JSONField from django.contrib.postgres, but with a fallback to TextField
+Provides: python-django-jsonfallback
+BuildRequires: python3-devel
+BuildRequires: python3-setuptools
+BuildRequires: python3-pip
+%description -n python3-django-jsonfallback
+This is an extension to ``django.contrib.postgres.fields.JSONField``, that works on other
+databases than PostgreSQL.
+* On **MySQL** and **MariaDB**, it uses the native JSON data type and supports most features.
+* On **SQLite** and all other databases, it just stores JSON strings in a text field and does not support querying.
+This is tested against:
+* Python 3.4 to 3.6
+* Django 2.0 to 2.1
+* MySQL 5.7
+* MariaDB 10.3
+* PostgreSQL 9.4
+* SQLite (no querying funcationality)
+
+%package help
+Summary: Development documents and examples for django-jsonfallback
+Provides: python3-django-jsonfallback-doc
+%description help
+This is an extension to ``django.contrib.postgres.fields.JSONField``, that works on other
+databases than PostgreSQL.
+* On **MySQL** and **MariaDB**, it uses the native JSON data type and supports most features.
+* On **SQLite** and all other databases, it just stores JSON strings in a text field and does not support querying.
+This is tested against:
+* Python 3.4 to 3.6
+* Django 2.0 to 2.1
+* MySQL 5.7
+* MariaDB 10.3
+* PostgreSQL 9.4
+* SQLite (no querying funcationality)
+
+%prep
+%autosetup -n django-jsonfallback-2.1.2
+
+%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-jsonfallback -f filelist.lst
+%dir %{python3_sitelib}/*
+
+%files help -f doclist.lst
+%{_docdir}/*
+
+%changelog
+* Mon May 29 2023 Python_Bot <Python_Bot@openeuler.org> - 2.1.2-1
+- Package Spec generated
diff --git a/sources b/sources
new file mode 100644
index 0000000..fbee2cb
--- /dev/null
+++ b/sources
@@ -0,0 +1 @@
+5041c67c5127507f48eab462224944d6 django-jsonfallback-2.1.2.tar.gz