diff options
author | Simon Hanna | 2017-03-03 17:28:13 +0100 |
---|---|---|
committer | Simon Hanna | 2017-03-03 17:28:13 +0100 |
commit | e63d9261eebc59894a9b85e1c16fd19a6a88f315 (patch) | |
tree | b9a2ccbe8ae0ab67039b7fe8ac95be04e0fa42cf | |
parent | fa0d42c98a02b7834cec8563cf017baa57812b43 (diff) | |
download | aur-e63d9261eebc59894a9b85e1c16fd19a6a88f315.tar.gz |
upgpkg: python-django-ical 1.4-1
upstream release
-rw-r--r-- | .SRCINFO | 18 | ||||
-rw-r--r-- | PKGBUILD | 28 | ||||
-rw-r--r-- | tests.patch | 67 | ||||
-rw-r--r-- | views.patch | 45 |
4 files changed, 17 insertions, 141 deletions
@@ -1,23 +1,21 @@ +# Generated by mksrcinfo v8 +# Fri Mar 3 16:28:13 UTC 2017 pkgbase = python-django-ical - pkgdesc = a simple library/framework for creating ical feeds based in Django's syndication feed framework - pkgver = 1.3 + pkgdesc = iCal feeds for Django based on Django's syndication feed framework + pkgver = 1.4 pkgrel = 1 - url = https://bitbucket.org/IanLewis/django-ical + url = https://github.com/pinkerton/django-ical arch = any license = MIT makedepends = python makedepends = python-setuptools makedepends = python2 makedepends = python2-setuptools - source = https://pypi.python.org/packages/source/d/django-ical/django-ical-1.3.tar.gz - source = tests.patch - source = views.patch - sha256sums = 9a002aa3dcb3c7a4fc1c6c81bae8906bb89e78b429f43108ff82f76080386740 - sha256sums = c6dd20758035581e829233000dd5263e2062fa8c1e43d98169412bbec92fc067 - sha256sums = a043092bcf3ec90fc8af8ad36865614c38636d5ebf36deb6ee3e4ddb91691134 + source = https://github.com/pinkerton/django-ical/archive/1.4.tar.gz + sha256sums = 92f77e3ec91f09d2d3c967b339e831abf6c17ae615cdc02b418f1575dea62419 pkgname = python-django-ical - depends = python-django>=1.4.2 + depends = python-django depends = python-icalendar pkgname = python2-django-ical @@ -1,34 +1,24 @@ # Maintainer: Simon Hanna <simon DOT hanna at serve-me dot info> pkgname=('python-django-ical' 'python2-django-ical') -pkgver=1.3 +pkgver=1.4 pkgrel=1 -pkgdesc="a simple library/framework for creating ical feeds based in Django's syndication feed framework" +pkgdesc="iCal feeds for Django based on Django's syndication feed framework" arch=('any') -url="https://bitbucket.org/IanLewis/django-ical" +url="https://github.com/pinkerton/django-ical" license=('MIT') makedepends=('python' 'python-setuptools' 'python2' 'python2-setuptools') -source=("https://pypi.python.org/packages/source/d/django-ical/django-ical-${pkgver}.tar.gz" - 'tests.patch' 'views.patch' -) -sha256sums=('9a002aa3dcb3c7a4fc1c6c81bae8906bb89e78b429f43108ff82f76080386740' - 'c6dd20758035581e829233000dd5263e2062fa8c1e43d98169412bbec92fc067' - 'a043092bcf3ec90fc8af8ad36865614c38636d5ebf36deb6ee3e4ddb91691134') -build() { - cp -r ${srcdir}/django-ical-${pkgver} ${srcdir}/django-ical-${pkgver}-py2 +source=("https://github.com/pinkerton/django-ical/archive/${pkgver}.tar.gz") +sha256sums=('92f77e3ec91f09d2d3c967b339e831abf6c17ae615cdc02b418f1575dea62419') +check() { cd ${srcdir}/django-ical-${pkgver} - cd django_ical - patch < ${srcdir}/views.patch - patch < ${srcdir}/tests.patch - cd .. - python setup.py build - + python setup.py test cd ${srcdir}/django-ical-${pkgver}-py2 - python2 setup.py build + python2 setup.py test } package_python-django-ical() { - depends=('python-django>=1.4.2' 'python-icalendar') + depends=('python-django' 'python-icalendar') cd ${srcdir}/django-ical-${pkgver} install -D -m644 LICENSE "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE" python setup.py install --prefix=/usr --root=${pkgdir} diff --git a/tests.patch b/tests.patch deleted file mode 100644 index b71151c4e05e..000000000000 --- a/tests.patch +++ /dev/null @@ -1,67 +0,0 @@ ---- django_ical/tests.py.old 2015-07-15 15:06:29.532564747 +0200 -+++ django_ical/tests.py 2015-07-15 15:06:42.705891733 +0200 -@@ -6,6 +6,7 @@ - - from django.test import TestCase - from django.test.client import RequestFactory -+from six import b - - from django_ical.feedgenerator import ICal20Feed - from django_ical.views import ICalFeed -@@ -69,7 +70,7 @@ - if organizer_dic: - if isinstance(organizer_dic, dict): - organizer = icalendar.vCalAddress('MAILTO:%s' % organizer_dic['email']) -- for key, val in organizer_dic.iteritems(): -+ for key, val in organizer_dic.items(): - if key is not 'email': - organizer.params[key] = icalendar.vText(val) - else: -@@ -119,20 +120,20 @@ - self.assertEquals(calendar.subcomponents[0]['SUMMARY'], 'Title1') - self.assertEquals(calendar.subcomponents[0]['DESCRIPTION'], 'Description1') - self.assertTrue(calendar.subcomponents[0]['URL'].endswith('/event/1')) -- self.assertEquals(calendar.subcomponents[0]['DTSTART'].to_ical(), '20120501T180000') -- self.assertEquals(calendar.subcomponents[0]['DTEND'].to_ical(), '20120501T200000') -+ self.assertEquals(calendar.subcomponents[0]['DTSTART'].to_ical(), b('20120501T180000')) -+ self.assertEquals(calendar.subcomponents[0]['DTEND'].to_ical(), b('20120501T200000')) - self.assertEquals(calendar.subcomponents[0]['GEO'].to_ical(), "37.386013;-122.082932") - self.assertEquals(calendar.subcomponents[0]['ORGANIZER'].to_ical(), -- "MAILTO:john.doe@example.com") -+ b("MAILTO:john.doe@example.com")) - - self.assertEquals(calendar.subcomponents[1]['SUMMARY'], 'Title2') - self.assertEquals(calendar.subcomponents[1]['DESCRIPTION'], 'Description2') - self.assertTrue(calendar.subcomponents[1]['URL'].endswith('/event/2')) -- self.assertEquals(calendar.subcomponents[1]['DTSTART'].to_ical(), '20120506T180000') -- self.assertEquals(calendar.subcomponents[1]['DTEND'].to_ical(), '20120506T200000') -+ self.assertEquals(calendar.subcomponents[1]['DTSTART'].to_ical(), b('20120506T180000')) -+ self.assertEquals(calendar.subcomponents[1]['DTEND'].to_ical(), b('20120506T200000')) - self.assertEquals(calendar.subcomponents[1]['GEO'].to_ical(), "37.386013;-122.082932") - self.assertEquals(calendar.subcomponents[0]['ORGANIZER'].to_ical(), -- "MAILTO:john.doe@example.com") -+ b("MAILTO:john.doe@example.com")) - - def test_wr_timezone(self): - """ -@@ -176,16 +177,16 @@ - calendar = icalendar.Calendar.from_ical(response.content) - self.assertEquals(len(calendar.subcomponents), 2) - -- self.assertEquals(calendar.subcomponents[0]['DTSTART'].to_ical(), '20120501T180000') -+ self.assertEquals(calendar.subcomponents[0]['DTSTART'].to_ical(), b('20120501T180000')) - self.assertEquals(calendar.subcomponents[0]['DTSTART'].params['TZID'], 'Asia/Tokyo') - -- self.assertEquals(calendar.subcomponents[0]['DTEND'].to_ical(), '20120501T200000') -+ self.assertEquals(calendar.subcomponents[0]['DTEND'].to_ical(), b('20120501T200000')) - self.assertEquals(calendar.subcomponents[0]['DTEND'].params['TZID'], 'Asia/Tokyo') - -- self.assertEquals(calendar.subcomponents[1]['DTSTART'].to_ical(), '20120506T180000') -+ self.assertEquals(calendar.subcomponents[1]['DTSTART'].to_ical(), b('20120506T180000')) - self.assertEquals(calendar.subcomponents[1]['DTSTART'].params['TZID'], 'US/Eastern') - -- self.assertEquals(calendar.subcomponents[1]['DTEND'].to_ical(), '20120506T200000') -+ self.assertEquals(calendar.subcomponents[1]['DTEND'].to_ical(), b('20120506T200000')) - self.assertEquals(calendar.subcomponents[1]['DTEND'].params['TZID'], 'US/Eastern') - - def test_file_name(self): diff --git a/views.patch b/views.patch deleted file mode 100644 index 6b973dc0890a..000000000000 --- a/views.patch +++ /dev/null @@ -1,45 +0,0 @@ ---- django_ical/views.py.old 2015-07-15 15:06:34.969228732 +0200 -+++ django_ical/views.py 2015-07-15 15:06:42.705891733 +0200 -@@ -11,6 +11,10 @@ - from django.core.exceptions import ObjectDoesNotExist - from django.contrib.syndication.views import Feed - from django.utils.http import http_date -+try: -+ from django.utils import six -+except ImportError: -+ import six - - from django_ical import feedgenerator - -@@ -94,22 +98,21 @@ - - def _get_dynamic_attr(self, attname, obj, default=None): - """ -- Copied from django.contrib.syndication.views.Feed -+ Copied from django.contrib.syndication.views.Feed (v1.7.1) - """ - try: - attr = getattr(self, attname) - except AttributeError: - return default - if callable(attr): -- # Check func_code.co_argcount rather than try/excepting the -- # function and catching the TypeError, because something inside -- # the function may raise the TypeError. This technique is more -- # accurate. -- if hasattr(attr, 'func_code'): -- argcount = attr.func_code.co_argcount -- else: -- argcount = attr.__call__.func_code.co_argcount -- if argcount == 2: # one argument is 'self' -+ # Check co_argcount rather than try/excepting the function and -+ # catching the TypeError, because something inside the function -+ # may raise the TypeError. This technique is more accurate. -+ try: -+ code = six.get_function_code(attr) -+ except AttributeError: -+ code = six.get_function_code(attr.__call__) -+ if code.co_argcount == 2: # one argument is 'self' - return attr(obj) - else: - return attr() |