[arch-commits] Commit in python-django-fake-model/repos/community-staging-any (4 files)

Felix Yan felixonmars at archlinux.org
Thu Nov 12 17:00:03 UTC 2020


    Date: Thursday, November 12, 2020 @ 17:00:03
  Author: felixonmars
Revision: 752163

archrelease: copy trunk to community-staging-any

Added:
  python-django-fake-model/repos/community-staging-any/PKGBUILD
    (from rev 752160, python-django-fake-model/trunk/PKGBUILD)
  python-django-fake-model/repos/community-staging-any/django2.diff
    (from rev 752160, python-django-fake-model/trunk/django2.diff)
Deleted:
  python-django-fake-model/repos/community-staging-any/PKGBUILD
  python-django-fake-model/repos/community-staging-any/django2.diff

--------------+
 PKGBUILD     |   94 ++++++++++++++++++++++++++++-----------------------------
 django2.diff |   92 +++++++++++++++++++++++++++----------------------------
 2 files changed, 93 insertions(+), 93 deletions(-)

Deleted: PKGBUILD
===================================================================
--- PKGBUILD	2020-11-12 17:00:00 UTC (rev 752162)
+++ PKGBUILD	2020-11-12 17:00:03 UTC (rev 752163)
@@ -1,47 +0,0 @@
-# Maintainer: Chih-Hsuan Yen <yan12125 at archlinux.org>
-
-_pkgname=django-fake-model
-pkgname=python-$_pkgname
-pkgver=0.1.4
-pkgrel=2
-pkgdesc='Simple library for creating fake Django models in the unit tests'
-arch=(any)
-url='https://github.com/erm0l0v/django-fake-model'
-license=(BSD)
-makedepends=(python-setuptools)
-depends=(python-django)
-# Not using PyPI source tarball as it does not include tests
-source=("https://github.com/erm0l0v/django-fake-model/archive/$pkgver/$pkgname-$pkgver.tar.gz"
-        django2.diff)
-sha256sums=('cce30e32dc73a0b6280511cb92079755308a4b79fbfebda48fc55c48230b1d60'
-            'ffc0baaacf4a0b507ef99fc0975166cb2a36dde061a2be72e91959157183889d')
-
-prepare() {
-  cd $_pkgname-$pkgver
-  # Fix compatibility with newer Django
-  # 1. on_delete is required for ForeignKey since 2.0 [1]
-  # 2. Failure in toggling off foreign_keys are reported since 2.2 [2].
-  #    The underlying cause is that django.test.TestCase puts the whole test
-  #    in a transaction, and toggling foreign_keys in a transaction is not
-  #    supported in SQLite. Use django.test.TransactionTestCase to work
-  #    around it.
-  # [1] https://github.com/django/django/commit/ddd3268975dca9094d94ab1df56dae0a24a58865
-  # [2] https://github.com/django/django/commit/315357ad25a6590e7f4564ec2e56a22132b09001
-  patch -Np1 -i ../django2.diff
-}
-
-build() {
-  cd $_pkgname-$pkgver
-  python setup.py build
-}
-
-check() {
-  cd $_pkgname-$pkgver
-  python runtests.py tests
-}
-
-package() {
-  cd $_pkgname-$pkgver
-  python setup.py install --root="$pkgdir" --optimize=1 --skip-build
-  install -Dm644 LICENSE -t "$pkgdir"/usr/share/licenses/$pkgname
-}

Copied: python-django-fake-model/repos/community-staging-any/PKGBUILD (from rev 752160, python-django-fake-model/trunk/PKGBUILD)
===================================================================
--- PKGBUILD	                        (rev 0)
+++ PKGBUILD	2020-11-12 17:00:03 UTC (rev 752163)
@@ -0,0 +1,47 @@
+# Maintainer: Chih-Hsuan Yen <yan12125 at archlinux.org>
+
+_pkgname=django-fake-model
+pkgname=python-$_pkgname
+pkgver=0.1.4
+pkgrel=3
+pkgdesc='Simple library for creating fake Django models in the unit tests'
+arch=(any)
+url='https://github.com/erm0l0v/django-fake-model'
+license=(BSD)
+makedepends=(python-setuptools)
+depends=(python-django)
+# Not using PyPI source tarball as it does not include tests
+source=("https://github.com/erm0l0v/django-fake-model/archive/$pkgver/$pkgname-$pkgver.tar.gz"
+        django2.diff)
+sha256sums=('cce30e32dc73a0b6280511cb92079755308a4b79fbfebda48fc55c48230b1d60'
+            'ffc0baaacf4a0b507ef99fc0975166cb2a36dde061a2be72e91959157183889d')
+
+prepare() {
+  cd $_pkgname-$pkgver
+  # Fix compatibility with newer Django
+  # 1. on_delete is required for ForeignKey since 2.0 [1]
+  # 2. Failure in toggling off foreign_keys are reported since 2.2 [2].
+  #    The underlying cause is that django.test.TestCase puts the whole test
+  #    in a transaction, and toggling foreign_keys in a transaction is not
+  #    supported in SQLite. Use django.test.TransactionTestCase to work
+  #    around it.
+  # [1] https://github.com/django/django/commit/ddd3268975dca9094d94ab1df56dae0a24a58865
+  # [2] https://github.com/django/django/commit/315357ad25a6590e7f4564ec2e56a22132b09001
+  patch -Np1 -i ../django2.diff
+}
+
+build() {
+  cd $_pkgname-$pkgver
+  python setup.py build
+}
+
+check() {
+  cd $_pkgname-$pkgver
+  python runtests.py tests
+}
+
+package() {
+  cd $_pkgname-$pkgver
+  python setup.py install --root="$pkgdir" --optimize=1 --skip-build
+  install -Dm644 LICENSE -t "$pkgdir"/usr/share/licenses/$pkgname
+}

Deleted: django2.diff
===================================================================
--- django2.diff	2020-11-12 17:00:00 UTC (rev 752162)
+++ django2.diff	2020-11-12 17:00:03 UTC (rev 752163)
@@ -1,46 +0,0 @@
-diff --git a/tests/test_class_extension.py b/tests/test_class_extension.py
-index 066283a..09662d2 100644
---- a/tests/test_class_extension.py
-+++ b/tests/test_class_extension.py
-@@ -1,10 +1,10 @@
- from __future__ import unicode_literals
--from django.test import TestCase
-+from django.test import TransactionTestCase
- from tests.fake_models import MyFakeModel
- 
- 
- @MyFakeModel.fake_me
--class MyFakeModelTests(TestCase):
-+class MyFakeModelTests(TransactionTestCase):
- 
-     def test_create_model(self):
-         MyFakeModel.objects.create(name='123')
-diff --git a/tests/test_func_decorator.py b/tests/test_func_decorator.py
-index 4394e7c..37a05fa 100644
---- a/tests/test_func_decorator.py
-+++ b/tests/test_func_decorator.py
-@@ -1,9 +1,9 @@
- from __future__ import unicode_literals
--from django.test import TestCase
-+from django.test import TransactionTestCase
- from tests.fake_models import MyFakeModel
- 
- 
--class MyFakeModelTests(TestCase):
-+class MyFakeModelTests(TransactionTestCase):
- 
-     @MyFakeModel.fake_me
-     def test_create_model(self):
-diff --git a/tests/test_related_model.py b/tests/test_related_model.py
-index 4184a68..5be0ad6 100644
---- a/tests/test_related_model.py
-+++ b/tests/test_related_model.py
-@@ -11,7 +11,7 @@ class RelatedModel(f.FakeModel):
- 
- class MyModel(f.FakeModel):
-     text = models.CharField(max_length=400)
--    related_model = models.ForeignKey(RelatedModel)
-+    related_model = models.ForeignKey(RelatedModel, on_delete=models.CASCADE)
- 
- 
- @MyModel.fake_me

Copied: python-django-fake-model/repos/community-staging-any/django2.diff (from rev 752160, python-django-fake-model/trunk/django2.diff)
===================================================================
--- django2.diff	                        (rev 0)
+++ django2.diff	2020-11-12 17:00:03 UTC (rev 752163)
@@ -0,0 +1,46 @@
+diff --git a/tests/test_class_extension.py b/tests/test_class_extension.py
+index 066283a..09662d2 100644
+--- a/tests/test_class_extension.py
++++ b/tests/test_class_extension.py
+@@ -1,10 +1,10 @@
+ from __future__ import unicode_literals
+-from django.test import TestCase
++from django.test import TransactionTestCase
+ from tests.fake_models import MyFakeModel
+ 
+ 
+ @MyFakeModel.fake_me
+-class MyFakeModelTests(TestCase):
++class MyFakeModelTests(TransactionTestCase):
+ 
+     def test_create_model(self):
+         MyFakeModel.objects.create(name='123')
+diff --git a/tests/test_func_decorator.py b/tests/test_func_decorator.py
+index 4394e7c..37a05fa 100644
+--- a/tests/test_func_decorator.py
++++ b/tests/test_func_decorator.py
+@@ -1,9 +1,9 @@
+ from __future__ import unicode_literals
+-from django.test import TestCase
++from django.test import TransactionTestCase
+ from tests.fake_models import MyFakeModel
+ 
+ 
+-class MyFakeModelTests(TestCase):
++class MyFakeModelTests(TransactionTestCase):
+ 
+     @MyFakeModel.fake_me
+     def test_create_model(self):
+diff --git a/tests/test_related_model.py b/tests/test_related_model.py
+index 4184a68..5be0ad6 100644
+--- a/tests/test_related_model.py
++++ b/tests/test_related_model.py
+@@ -11,7 +11,7 @@ class RelatedModel(f.FakeModel):
+ 
+ class MyModel(f.FakeModel):
+     text = models.CharField(max_length=400)
+-    related_model = models.ForeignKey(RelatedModel)
++    related_model = models.ForeignKey(RelatedModel, on_delete=models.CASCADE)
+ 
+ 
+ @MyModel.fake_me



More information about the arch-commits mailing list