commit 39aae7f7824ae9b8a11eafac2ad2f4d7a68bc169
Author: Jakub Bogusz <[email protected]>
Date:   Mon Dec 11 22:11:55 2023 +0100

    - updated to 3.3.1, added python3 package

 django-celery-requires.patch |  11 ++++
 python-django-celery.spec    | 134 +++++++++++++++++++++++++++++++++++--------
 2 files changed, 122 insertions(+), 23 deletions(-)
---
diff --git a/python-django-celery.spec b/python-django-celery.spec
index ac6d26c..1f3191f 100644
--- a/python-django-celery.spec
+++ b/python-django-celery.spec
@@ -1,25 +1,53 @@
 #
 # Conditional build:
-%bcond_without tests   # do not perform "make test"
+%bcond_without doc     # Sphinx documentation
+%bcond_with    tests   # unit tests (require some db)
+%bcond_without python2 # CPython 2.x module
+%bcond_without python3 # CPython 3.x module
 
 %define        module  django-celery
-Summary:       django-celery provides Celery intergration for Django
-Name:          python-%module
-Version:       2.5.1
-Release:       0.9
+Summary:       Celery integration for Django
+Summary(pl.UTF-8):     Integracja Celery z Django
+Name:          python-%{module}
+Version:       3.3.1
+Release:       1
 License:       BSD
-Group:         Development/Languages
-Source0:       
http://pypi.python.org/packages/source/d/%{module}/%{module}-%{version}.tar.gz
-# Source0-md5: 4cfaa8e1ae3741ecd85a9cfe4af5e4dc
-URL:           http://code.google.com/p/django-celery/
-BuildRequires: python-modules
+Group:         Development/Languages/Python
+Source0:       
https://files.pythonhosted.org/packages/source/d/django-celery/%{module}-%{version}.tar.gz
+# Source0-md5: 935503afef427ae70400c6ec3b5791c8
+Patch0:                django-celery-requires.patch
+URL:           https://pypi.org/project/django-celery/
+%if %{with python2}
+BuildRequires: python-modules >= 1:2.7
 BuildRequires: python-setuptools
+%if %{with tests}
+BuildRequires: python-celery >= 3.1.15
+BuildRequires: python-django >= 1.8
+BuildRequires: python-django-nose
+BuildRequires: python-mock
+BuildRequires: python-nose
+BuildRequires: python-nose-cover3
+%endif
+%endif
+%if %{with python3}
+BuildRequires: python3-modules >= 1:3.5
+BuildRequires: python3-setuptools
+%if %{with tests}
+BuildRequires: python3-celery >= 3.1.15
+BuildRequires: python3-django >= 1.8
+BuildRequires: python3-django-nose
+BuildRequires: python3-nose
+BuildRequires: python3-nose-cover3
+%endif
+%endif
 BuildRequires: rpm-pythonprov
-BuildRequires: rpmbuild(macros) >= 1.710
+BuildRequires: rpmbuild(macros) >= 1.714
 BuildRequires: sed >= 4.0
-Requires:      python-celery >= %{version}
-Requires:      python-django
-Requires:      python-django-picklefield
+%if %{with doc}
+BuildRequires: python-django >= 1.8
+BuildRequires: python-sphinxcontrib-issuetracker
+BuildRequires: sphinx-pdg-2
+%endif
 BuildArch:     noarch
 BuildRoot:     %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 
@@ -28,30 +56,90 @@ Provides Celery integration for Django; Using Django ORM 
and cache
 backend for storing results, autodiscovery of task modules for
 applications listed in INSTALLED_APPS, and more.
 
+%description -l pl.UTF-8
+Pakiet dostarcza integrację Celery z Django - korzystanie z djangowego
+ORM, backendu pamięci podręcznej do przechowywania wyników,
+automatycznego wykrywania modułów zadań do aplikacji wymienionych w
+INSTALLED_APPS itd.
+
+%package -n python3-%{module}
+Summary:       Celery integration for Django
+Summary(pl.UTF-8):     Integracja Celery z Django
+Group:         Development/Languages/Python
+
+%description -n python3-%{module}
+Provides Celery integration for Django; Using Django ORM and cache
+backend for storing results, autodiscovery of task modules for
+applications listed in INSTALLED_APPS, and more.
+
+%description -n python3-%{module} -l pl.UTF-8
+Pakiet dostarcza integrację Celery z Django - korzystanie z djangowego
+ORM, backendu pamięci podręcznej do przechowywania wyników,
+automatycznego wykrywania modułów zadań do aplikacji wymienionych w
+INSTALLED_APPS itd.
+
+%package apidocs
+Summary:       API documentation for Python django-celery module
+Summary(pl.UTF-8):     Dokumentacja API modułu Pythona django-celery
+Group:         Documentation
+
+%description apidocs
+API documentation for Python django-celery module.
+
+%description apidocs -l pl.UTF-8
+Dokumentacja API modułu Pythona django-celery.
+
 %prep
 %setup -q -n %{module}-%{version}
+%patch0 -p1
 
 %build
-%py_build
+%if %{with python2}
+%py_build %{?with_tests:test}
+%endif
+
+%if %{with python3}
+%py3_build %{?with_tests:test}
+%endif
+
+%if %{with doc}
+PYTHONPATH=$(pwd) \
+%{__make} -C docs html \
+       SPHINXBUILD=sphinx-build-2
+%endif
 
 %install
 rm -rf $RPM_BUILD_ROOT
-%py_install \
-       --root $RPM_BUILD_ROOT
+
+%if %{with python2}
+%py_install
 
 %py_postclean
 
-rm -rf $RPM_BUILD_ROOT%{py_sitescriptdir}/%{module}/tests
-rm -rf $RPM_BUILD_ROOT%{py_sitescriptdir}/tests
+%{__rm} -r $RPM_BUILD_ROOT%{py_sitescriptdir}/djcelery/tests
+%endif
+
+%if %{with python3}
+%py3_install
+
+%{__rm} -r $RPM_BUILD_ROOT%{py3_sitescriptdir}/djcelery/tests
+%endif
 
 %clean
 rm -rf $RPM_BUILD_ROOT
 
+%if %{with python2}
 %files
 %defattr(644,root,root,755)
-%doc AUTHORS LICENSE README docs
-%attr(755,root,root)%{_bindir}/djcelerymon
+%doc AUTHORS Changelog FAQ LICENSE README.rst THANKS
 %{py_sitescriptdir}/djcelery
-%if "%{py_ver}" > "2.4"
-%{py_sitescriptdir}/django_celery-%{version}-*.egg-info
+%{py_sitescriptdir}/django_celery-%{version}-py*.egg-info
+%endif
+
+%if %{with python2}
+%files -n python3-django-celery
+%defattr(644,root,root,755)
+%doc AUTHORS Changelog FAQ LICENSE README.rst THANKS
+%{py3_sitescriptdir}/djcelery
+%{py3_sitescriptdir}/django_celery-%{version}-py*.egg-info
 %endif
diff --git a/django-celery-requires.patch b/django-celery-requires.patch
new file mode 100644
index 0000000..b7e5be5
--- /dev/null
+++ b/django-celery-requires.patch
@@ -0,0 +1,11 @@
+--- django-celery-3.3.1/setup.py.orig  2019-08-14 06:08:29.000000000 +0200
++++ django-celery-3.3.1/setup.py       2023-12-11 22:09:55.118228568 +0100
+@@ -181,7 +181,7 @@ setup(
+     package_data=package_data,
+     zip_safe=False,
+     install_requires=[
+-        'celery>=3.1.15,<4.0',
++        'celery>=3.1.15',
+         'django>=1.8',
+     ],
+     cmdclass={'test': RunTests,
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/python-django-celery.git/commitdiff/39aae7f7824ae9b8a11eafac2ad2f4d7a68bc169

_______________________________________________
pld-cvs-commit mailing list
[email protected]
http://lists.pld-linux.org/mailman/listinfo/pld-cvs-commit

Reply via email to