From fe18ab20ddf1417df54cde8cdf6e40c036ebced93f27f7ea047de56269b04cae Mon Sep 17 00:00:00 2001 From: Dirk Mueller Date: Wed, 30 Apr 2025 08:43:52 +0000 Subject: [PATCH] Accepting request 1273469 from home:mcalabkova:branches:devel:languages:python needed by weblate OBS-URL: https://build.opensuse.org/request/show/1273469 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python:django/python-djangorestframework-csv?expand=0&rev=1 --- .gitattributes | 23 ++++++++++ .gitignore | 1 + djangorestframework-csv-3.0.2.tar.gz | 3 ++ python-djangorestframework-csv.changes | 4 ++ python-djangorestframework-csv.spec | 63 ++++++++++++++++++++++++++ testsettings.py | 15 ++++++ 6 files changed, 109 insertions(+) create mode 100644 .gitattributes create mode 100644 .gitignore create mode 100644 djangorestframework-csv-3.0.2.tar.gz create mode 100644 python-djangorestframework-csv.changes create mode 100644 python-djangorestframework-csv.spec create mode 100644 testsettings.py diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..9b03811 --- /dev/null +++ b/.gitattributes @@ -0,0 +1,23 @@ +## Default LFS +*.7z filter=lfs diff=lfs merge=lfs -text +*.bsp filter=lfs diff=lfs merge=lfs -text +*.bz2 filter=lfs diff=lfs merge=lfs -text +*.gem filter=lfs diff=lfs merge=lfs -text +*.gz filter=lfs diff=lfs merge=lfs -text +*.jar filter=lfs diff=lfs merge=lfs -text +*.lz filter=lfs diff=lfs merge=lfs -text +*.lzma filter=lfs diff=lfs merge=lfs -text +*.obscpio filter=lfs diff=lfs merge=lfs -text +*.oxt filter=lfs diff=lfs merge=lfs -text +*.pdf filter=lfs diff=lfs merge=lfs -text +*.png filter=lfs diff=lfs merge=lfs -text +*.rpm filter=lfs diff=lfs merge=lfs -text +*.tbz filter=lfs diff=lfs merge=lfs -text +*.tbz2 filter=lfs diff=lfs merge=lfs -text +*.tgz filter=lfs diff=lfs merge=lfs -text +*.ttf filter=lfs diff=lfs merge=lfs -text +*.txz filter=lfs diff=lfs merge=lfs -text +*.whl filter=lfs diff=lfs merge=lfs -text +*.xz filter=lfs diff=lfs merge=lfs -text +*.zip filter=lfs diff=lfs merge=lfs -text +*.zst filter=lfs diff=lfs merge=lfs -text diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..57affb6 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +.osc diff --git a/djangorestframework-csv-3.0.2.tar.gz b/djangorestframework-csv-3.0.2.tar.gz new file mode 100644 index 0000000..1cadcde --- /dev/null +++ b/djangorestframework-csv-3.0.2.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:b269b692feda1971e1342f395a21d339c6a16d2961ff64357a9a6188f27af10f +size 32039 diff --git a/python-djangorestframework-csv.changes b/python-djangorestframework-csv.changes new file mode 100644 index 0000000..1caf63a --- /dev/null +++ b/python-djangorestframework-csv.changes @@ -0,0 +1,4 @@ +------------------------------------------------------------------- +Tue Apr 29 14:00:57 UTC 2025 - Markéta Machová + +- Initial packaging (v3.0.2), needed by Weblate diff --git a/python-djangorestframework-csv.spec b/python-djangorestframework-csv.spec new file mode 100644 index 0000000..99c4bae --- /dev/null +++ b/python-djangorestframework-csv.spec @@ -0,0 +1,63 @@ +# +# spec file for package python-djangorestframework-csv +# +# Copyright (c) 2025 SUSE LLC +# +# All modifications and additions to the file contributed by third parties +# remain the property of their copyright owners, unless otherwise agreed +# upon. The license for this file, and modifications and additions to the +# file, is the same license as for the pristine package itself (unless the +# license for the pristine package is not an Open Source License, in which +# case the license is the MIT License). An "Open Source License" is a +# license that conforms to the Open Source Definition (Version 1.9) +# published by the Open Source Initiative. + +# Please submit bugfixes or comments via https://bugs.opensuse.org/ +# + + +Name: python-djangorestframework-csv +Version: 3.0.2 +Release: 0 +Summary: CSV Tools for Django REST Framework +License: BSD +URL: https://github.com/mjumbewu/django-rest-framework-csv +Source: https://files.pythonhosted.org/packages/source/d/djangorestframework-csv/djangorestframework-csv-%{version}.tar.gz +Source1: https://raw.githubusercontent.com/mjumbewu/django-rest-framework-csv/refs/heads/master/testsettings.py +BuildRequires: python-rpm-macros +BuildRequires: %{python_module pip} +BuildRequires: %{python_module setuptools} +BuildRequires: %{python_module wheel} +# SECTION test requirements +BuildRequires: %{python_module djangorestframework} +# /SECTION +BuildRequires: fdupes +Requires: python-djangorestframework +BuildArch: noarch +%python_subpackages + +%description +CSV Tools for Django REST Framework + +%prep +%autosetup -p1 -n djangorestframework-csv-%{version} +cp %{SOURCE1} rest_framework_csv + +%build +%pyproject_wheel + +%install +%pyproject_install +%python_expand %fdupes %{buildroot}%{$python_sitelib} + +%check +export DJANGO_SETTINGS_MODULE=rest_framework_csv.testsettings +%pyunittest + +%files %{python_files} +%doc README.rst +%license LICENSE +%{python_sitelib}/rest_framework_csv +%{python_sitelib}/djangorestframework_csv-%{version}.dist-info + +%changelog diff --git a/testsettings.py b/testsettings.py new file mode 100644 index 0000000..91fb848 --- /dev/null +++ b/testsettings.py @@ -0,0 +1,15 @@ +USE_TZ = True + +DATABASES = { + 'default': { + 'ENGINE': 'django.db.backends.sqlite3', + 'NAME': ':memory:', + }, +} + +INSTALLED_APPS = ( + 'django.contrib.contenttypes', + 'rest_framework_csv', +) + +SECRET_KEY = 'testsecretkey'