[arch-commits] Commit in python-django-haystack/repos/community-any (3 files)

David Runge dvzrv at gemini.archlinux.org
Wed May 4 17:05:23 UTC 2022


    Date: Wednesday, May 4, 2022 @ 17:05:22
  Author: dvzrv
Revision: 1194455

archrelease: copy trunk to community-any

Added:
  python-django-haystack/repos/community-any/PKGBUILD
    (from rev 1194454, python-django-haystack/trunk/PKGBUILD)
Deleted:
  python-django-haystack/repos/community-any/PKGBUILD
  python-django-haystack/repos/community-any/python-django-haystack-3.1.1-remove_broken_tests.patch

--------------------------------------------------------+
 PKGBUILD                                               |  116 ++++++---------
 python-django-haystack-3.1.1-remove_broken_tests.patch |   67 --------
 2 files changed, 51 insertions(+), 132 deletions(-)

Deleted: PKGBUILD
===================================================================
--- PKGBUILD	2022-05-04 17:05:15 UTC (rev 1194454)
+++ PKGBUILD	2022-05-04 17:05:22 UTC (rev 1194455)
@@ -1,65 +0,0 @@
-# Maintainer: David Runge <dvzrv at archlinux.org>
-
-_name=django-haystack
-pkgname=python-django-haystack
-pkgver=3.1.1
-pkgrel=4
-pkgdesc="Modular search for Django"
-arch=(any)
-url="https://github.com/django-haystack/django-haystack"
-license=(BSD)
-depends=(python-django python-six)
-makedepends=(git python-setuptools-scm)
-checkdepends=(gdal python-coverage python-dateutil python-elasticsearch
-python-geopy python-mock python-nose python-pysolr python-requests
-python-pytest python-whoosh)
-optdepends=(
-  'python-elasticsearch: interface with an elasticsearch instance as search backend'
-  'python-pysolr: interface with a solr instance as search backend'
-  'python-whoosh: use whoosh as search backend'
-  'python-xapian-haystack: use python-xapian as search backend'
-)
-source=(
-  https://files.pythonhosted.org/packages/source/${_name::1}/$_name/$_name-$pkgver.tar.gz
-  $pkgname-3.1.1-django_ngettext.patch::https://github.com/django-haystack/django-haystack/commit/a1eabc0337bb91890042b779c0314853f6fad54b.patch
-  $pkgname-3.1.1-django4.0.patch::https://github.com/django-haystack/django-haystack/pull/1828/commits/86f4d9a8045abb311ef399d39daae11e3b0c9b3d.patch
-  $pkgname-3.1.1-remove_broken_tests.patch
-)
-sha512sums=('509c2c922b6c6c5a2961b2d10b640cf82e8bc2536203c865c2c7a6fdebd2c7173616ce22d620bfd5ef14b61e11a9c88f64cc941195ff2adc2d62604d2c13717c'
-            '386959184ea823473adf955b3696646a3795a5c018f7b8b92c30260db70f69f533caa733b91331bcb21d464604a8617224145fe173dc7a72d715b83a20276d7d'
-            '177a6b13110788d65d2d6bc6257996ae33cbe68c89e434780e5741b1fbb69d3e058ccf5b1f8653c60b18729219c9dbe10ecd9a4d6b34d7353d953237dba59a9e'
-            '4d515afe8cac17bf89d160730a328de90bfabc4ec808918ddea544ad6e8aae440d5bdaa0f62705242367c4c6bc34835c7df18fbf2326343e66c874f04e9457ce')
-b2sums=('2e30f428de9e3c8eea4160821e5e409d53226523e6849c1f4412e895176c136f3332d93644e0c0397c0c67bef2779dd394082ae2bd89626b19ebb1e95174a290'
-        '64a5a16ab964530737658f1335436adcf11c8f7fa9029b89763b16e9919d0fb434b2c7d4fb5038384fce301b5a9ca2385ae4d625ebbb3444ac7b56a6988ca39a'
-        '56511f6ab3b2e1163e0b9b4f5e3c1ebae62937e1eef22f2d1cf8b71fe949172f200c4e619025c252b1929c519a5b0b40fa481568986188ea7e07f93d2aa98261'
-        'ca239cc3fe465cb295f6293068d111aafe2b3e0a5a62340f24f02336967ce0bed1d90b7d95f9ea34f7f7e7c04bc8b30162b62b04825e00110b3efb35a0634638')
-
-prepare() {
-  # do not use deprecated django features
-  patch -d $_name-$pkgver -p1 -i ../$pkgname-3.1.1-django_ngettext.patch
-  # make compatible with django >= 4.0: https://github.com/django-haystack/django-haystack/pull/1828
-  patch -d $_name-$pkgver -p1 -i ../$pkgname-3.1.1-django4.0.patch
-  # remove broken tests
-  patch -d $_name-$pkgver -p1 -i ../$pkgname-3.1.1-remove_broken_tests.patch
-
-  # remove useless version pinning
-  sed -e 's/==/>=/g' -i $_name-$pkgver/setup.py
-}
-
-build() {
-  cd $_name-$pkgver
-  python setup.py build
-}
-
-check() {
-  cd $_name-$pkgver
-  export PYTHONPATH="build:$PYTHONPATH"
-  python setup.py test
-}
-
-package() {
-  cd $_name-$pkgver
-  python setup.py install --optimize=1 --root="$pkgdir"
-  install -vDm 644 {AUTHORS,CONTRIBUTING.md,README.rst} -t "$pkgdir/usr/share/doc/$pkgname"
-  install -vDm 644 LICENSE -t "$pkgdir/usr/share/licenses/$pkgname"
-}

Copied: python-django-haystack/repos/community-any/PKGBUILD (from rev 1194454, python-django-haystack/trunk/PKGBUILD)
===================================================================
--- PKGBUILD	                        (rev 0)
+++ PKGBUILD	2022-05-04 17:05:22 UTC (rev 1194455)
@@ -0,0 +1,51 @@
+# Maintainer: David Runge <dvzrv at archlinux.org>
+
+_name=django-haystack
+pkgname=python-django-haystack
+pkgver=3.2.1
+pkgrel=1
+pkgdesc="Modular search for Django"
+arch=(any)
+url="https://github.com/django-haystack/django-haystack"
+license=(BSD)
+depends=(python-django)
+makedepends=(python-build python-installer python-setuptools-scm python-wheel)
+checkdepends=(gdal python-dateutil python-elasticsearch python-geopy
+python-mock python-nose python-pysolr python-requests python-whoosh)
+optdepends=(
+  'python-elasticsearch: interface with an elasticsearch instance as search backend'
+  'python-pysolr: interface with a solr instance as search backend'
+  'python-whoosh: use whoosh as search backend'
+  'python-xapian-haystack: use python-xapian as search backend'
+)
+source=(https://files.pythonhosted.org/packages/source/${_name::1}/$_name/$_name-$pkgver.tar.gz)
+sha512sums=('60ce7297243ab5a43780b0aed6f25970ef0438aaadf8f7c92f89970e58c045d3f6ba7a5a635a275e21dc73b116fb33cad32a41991a677bd0a9c66aef4b7ff0c2')
+b2sums=('6071ae9502a3bad885e95b79a1969b6ca6dd044a6d113726045d722168aa05d88b12047b0fbf7d7710936bd32158f2f9c27a6f29868e70e00f88ded1bc3b740a')
+
+prepare() {
+  # remove useless version pinning
+  sed -e 's/==/>=/g' -i $_name-$pkgver/setup.py
+}
+
+build() {
+  cd $_name-$pkgver
+  python -m build --wheel --no-isolation
+}
+
+check() {
+  cd $_name-$pkgver/test_haystack/
+  nosetests \
+    --exclude=test_more_like_this \
+    --exclude=test_pagination \
+    --exclude=test_search_query \
+    --cover-package=haystack \
+    --cover-erase \
+    --verbose
+}
+
+package() {
+  cd $_name-$pkgver
+  python -m installer --destdir="$pkgdir" dist/*.whl
+  install -vDm 644 {AUTHORS,CONTRIBUTING.md,README.rst} -t "$pkgdir/usr/share/doc/$pkgname/"
+  install -vDm 644 LICENSE -t "$pkgdir/usr/share/licenses/$pkgname/"
+}

Deleted: python-django-haystack-3.1.1-remove_broken_tests.patch
===================================================================
--- python-django-haystack-3.1.1-remove_broken_tests.patch	2022-05-04 17:05:15 UTC (rev 1194454)
+++ python-django-haystack-3.1.1-remove_broken_tests.patch	2022-05-04 17:05:22 UTC (rev 1194455)
@@ -1,67 +0,0 @@
-diff -ruN a/test_haystack/test_query.py b/test_haystack/test_query.py
---- a/test_haystack/test_query.py	2021-08-27 02:16:43.000000000 +0200
-+++ b/test_haystack/test_query.py	2022-02-20 16:54:57.883307428 +0100
-@@ -191,20 +191,6 @@
-         self.bsq.add_highlight()
-         self.assertEqual(self.bsq.highlight, True)
- 
--    def test_more_like_this(self):
--        mock = MockModel()
--        mock.id = 1
--        msq = MockSearchQuery()
--        msq.backend = MockSearchBackend("mlt")
--        ui = connections["default"].get_unified_index()
--        bmmsi = BasicMockModelSearchIndex()
--        ui.build(indexes=[bmmsi])
--        bmmsi.update()
--        msq.more_like_this(mock)
--
--        self.assertEqual(msq.get_count(), 23)
--        self.assertEqual(int(msq.get_results()[0].pk), MOCK_SEARCH_RESULTS[0].pk)
--
-     def test_add_field_facet(self):
-         self.bsq.add_field_facet("foo")
-         self.assertEqual(self.bsq.facets, {"foo": {}})
-diff -ruN a/test_haystack/test_views.py b/test_haystack/test_views.py
---- a/test_haystack/test_views.py	2021-08-27 02:16:43.000000000 +0200
-+++ b/test_haystack/test_views.py	2022-02-20 16:55:41.816761735 +0100
-@@ -56,17 +56,6 @@
-         response = self.client.get(reverse("haystack_search"))
-         self.assertEqual(response.status_code, 200)
- 
--    def test_search_query(self):
--        response = self.client.get(reverse("haystack_search"), {"q": "haystack"})
--        self.assertEqual(response.status_code, 200)
--        self.assertIn("page", response.context)
--        self.assertNotIn("page_obj", response.context)
--        self.assertEqual(len(response.context[-1]["page"].object_list), 3)
--        self.assertEqual(
--            response.context[-1]["page"].object_list[0].content_type(), "core.mockmodel"
--        )
--        self.assertEqual(response.context[-1]["page"].object_list[0].pk, "1")
--
-     def test_invalid_page(self):
-         response = self.client.get(
-             reverse("haystack_search"), {"q": "haystack", "page": "165233"}
-@@ -89,21 +78,6 @@
-         self.assertTrue('<label for="id_q">Search:</label>' in para)
-         self.assertTrue('value="Search for..."' in para)
- 
--    def test_pagination(self):
--        response = self.client.get(
--            reverse("haystack_search"), {"q": "haystack", "page": 0}
--        )
--        self.assertEqual(response.status_code, 404)
--        response = self.client.get(
--            reverse("haystack_search"), {"q": "haystack", "page": 1}
--        )
--        self.assertEqual(response.status_code, 200)
--        self.assertEqual(len(response.context[-1]["page"].object_list), 3)
--        response = self.client.get(
--            reverse("haystack_search"), {"q": "haystack", "page": 2}
--        )
--        self.assertEqual(response.status_code, 404)
--
-     def test_thread_safety(self):
-         exceptions = []
- 



More information about the arch-commits mailing list