Login
[x]
Log in using an account from:
Fedora Account System
Red Hat Associate
Red Hat Customer
Or login using a Red Hat Bugzilla account
Forgot Password
Login:
Hide Forgot
Create an Account
Red Hat Bugzilla – Attachment 831840 Details for
Bug 1036954
add python3-django-tagging subpackage
[?]
New
Simple Search
Advanced Search
My Links
Browse
Requests
Reports
Current State
Search
Tabular reports
Graphical reports
Duplicates
Other Reports
User Changes
Plotly Reports
Bug Status
Bug Severity
Non-Defaults
|
Product Dashboard
Help
Page Help!
Bug Writing Guidelines
What's new
Browser Support Policy
5.0.4.rh83 Release notes
FAQ
Guides index
User guide
Web Services
Contact
Legal
This site requires JavaScript to be enabled to function correctly, please enable it.
[patch]
git commit adding python3 subpackage
0001-added-python3-subpackage.patch (text/plain), 7.92 KB, created by
Jakub Dorňák
on 2013-12-02 23:48:48 UTC
(
hide
)
Description:
git commit adding python3 subpackage
Filename:
MIME Type:
Creator:
Jakub Dorňák
Created:
2013-12-02 23:48:48 UTC
Size:
7.92 KB
patch
obsolete
>From d4b05b89da3110dafa28273c73ed4cedc37161ca Mon Sep 17 00:00:00 2001 >From: =?UTF-8?q?Jakub=20Dor=C5=88=C3=A1k?= <jdornak@redhat.com> >Date: Tue, 3 Dec 2013 00:47:33 +0100 >Subject: [PATCH] added python3 subpackage > >--- > ...jango-tagging-0.3.1-force_unicode-python3.patch | 15 +++++ > python-django-tagging-0.3.1-tests-python3.patch | 75 ++++++++++++++++++++++ > python-django-tagging.spec | 54 +++++++++++++++- > 3 files changed, 143 insertions(+), 1 deletion(-) > create mode 100644 python-django-tagging-0.3.1-force_unicode-python3.patch > create mode 100644 python-django-tagging-0.3.1-tests-python3.patch > >diff --git a/python-django-tagging-0.3.1-force_unicode-python3.patch b/python-django-tagging-0.3.1-force_unicode-python3.patch >new file mode 100644 >index 0000000..651f648 >--- /dev/null >+++ b/python-django-tagging-0.3.1-force_unicode-python3.patch >@@ -0,0 +1,15 @@ >+--- django-tagging-0.3.1/tagging/utils.py.orig 2013-12-02 13:30:03.178161959 +0100 >++++ django-tagging-0.3.1/tagging/utils.py 2013-12-02 13:31:22.120109727 +0100 >+@@ -6,7 +6,11 @@ import math >+ import types >+ >+ from django.db.models.query import QuerySet >+-from django.utils.encoding import force_unicode >++try: >++ from django.utils.encoding import force_unicode >++except: >++ # force_unicode is not provided for Py3 >++ force_unicode = lambda s: s >+ from django.utils.translation import ugettext as _ >+ >+ # Python 2.3 compatibility >diff --git a/python-django-tagging-0.3.1-tests-python3.patch b/python-django-tagging-0.3.1-tests-python3.patch >new file mode 100644 >index 0000000..7c32a12 >--- /dev/null >+++ b/python-django-tagging-0.3.1-tests-python3.patch >@@ -0,0 +1,75 @@ >+--- python3-python-django-tagging-0.3.1-9.fc21/tagging/tests/tests.py.orig 2013-12-01 22:07:49.305428938 +0100 >++++ python3-python-django-tagging-0.3.1-9.fc21/tagging/tests/tests.py 2013-12-01 22:07:12.260484502 +0100 >+@@ -136,10 +136,10 @@ class TestNormalisedTagListInput(TestCas >+ def test_with_invalid_input_mix_of_string_and_instance(self): >+ try: >+ get_tag_list(['cheese', self.toast]) >+- except ValueError, ve: >++ except ValueError as ve: >+ self.assertEquals(str(ve), >+ 'If a list or tuple of tags is provided, they must all be tag names, Tag objects or Tag ids.') >+- except Exception, e: >++ except Exception as e: >+ raise self.failureException('the wrong type of exception was raised: type [%s] value [%]' %\ >+ (str(type(e)), str(e))) >+ else: >+@@ -148,9 +148,9 @@ class TestNormalisedTagListInput(TestCas >+ def test_with_invalid_input(self): >+ try: >+ get_tag_list(29) >+- except ValueError, ve: >++ except ValueError as ve: >+ self.assertEquals(str(ve), 'The tag input given was invalid.') >+- except Exception, e: >++ except Exception as e: >+ raise self.failureException('the wrong type of exception was raised: type [%s] value [%s]' %\ >+ (str(type(e)), str(e))) >+ else: >+@@ -204,9 +204,9 @@ class TestCalculateCloud(TestCase): >+ def test_invalid_distribution(self): >+ try: >+ calculate_cloud(self.tags, steps=5, distribution='cheese') >+- except ValueError, ve: >++ except ValueError as ve: >+ self.assertEquals(str(ve), 'Invalid distribution algorithm specified: cheese.') >+- except Exception, e: >++ except Exception as e: >+ raise self.failureException('the wrong type of exception was raised: type [%s] value [%s]' %\ >+ (str(type(e)), str(e))) >+ else: >+@@ -272,9 +272,9 @@ class TestBasicTagging(TestCase): >+ >+ try: >+ Tag.objects.add_tag(self.dead_parrot, ' ') >+- except AttributeError, ae: >++ except AttributeError as ae: >+ self.assertEquals(str(ae), 'No tags were given: " ".') >+- except Exception, e: >++ except Exception as e: >+ raise self.failureException('the wrong type of exception was raised: type [%s] value [%s]' %\ >+ (str(type(e)), str(e))) >+ else: >+@@ -291,9 +291,9 @@ class TestBasicTagging(TestCase): >+ >+ try: >+ Tag.objects.add_tag(self.dead_parrot, 'one two') >+- except AttributeError, ae: >++ except AttributeError as ae: >+ self.assertEquals(str(ae), 'Multiple tags were given: "one two".') >+- except Exception, e: >++ except Exception as e: >+ raise self.failureException('the wrong type of exception was raised: type [%s] value [%s]' %\ >+ (str(type(e)), str(e))) >+ else: >+@@ -893,9 +893,9 @@ class TestTagFieldInForms(TestCase): >+ u'foo qwertyuiopasdfghjklzxcvbnmqwertyuiopasdfghjklzxcvb bar') >+ try: >+ t.clean('foo qwertyuiopasdfghjklzxcvbnmqwertyuiopasdfghjklzxcvbn bar') >+- except forms.ValidationError, ve: >++ except forms.ValidationError as ve: >+ self.assertEquals(str(ve), "[u'Each tag may be no more than 50 characters long.']") >+- except Exception, e: >++ except Exception as e: >+ raise e >+ else: >+ raise self.failureException('a ValidationError exception was supposed to have been raised.') >diff --git a/python-django-tagging.spec b/python-django-tagging.spec >index a80fb9d..0e6601a 100644 >--- a/python-django-tagging.spec >+++ b/python-django-tagging.spec >@@ -1,7 +1,9 @@ >+%bcond_without python3 >+ > %global pkgname django-tagging > Name: python-django-tagging > Version: 0.3.1 >-Release: 8%{?dist} >+Release: 9%{?dist} > Summary: A generic tagging application for Django projects > > Group: Development/Languages >@@ -9,9 +11,14 @@ License: MIT > URL: http://code.google.com/p/django-tagging/ > Source0: http://pypi.python.org/packages/source/d/%{pkgname}/%{pkgname}-%{version}.tar.gz > #md5=a0855f2b044db15f3f8a025fa1016ddf >+Patch0: python-django-tagging-0.3.1-tests-python3.patch >+Patch1: python-django-tagging-0.3.1-force_unicode-python3.patch > > BuildArch: noarch > BuildRequires: python2-devel >+%if 0%{?with_python3} >+BuildRequires: python3-devel >+%endif > Requires: python-django > > Provides: %{pkgname} = %{version}-%{release} >@@ -23,23 +30,68 @@ A generic tagging application for Django projects, which allows association > of a number of tags with any Model instance and makes retrieval of tags > simple. > >+ >+%if 0%{?with_python3} >+%package -n python3-django-tagging >+Summary: A generic tagging application for Django projects >+Group: Development/Languages >+ >+Requires: python3-django >+ >+%description -n python3-django-tagging >+A generic tagging application for Django projects, which allows association >+of a number of tags with any Model instance and makes retrieval of tags >+simple. >+%endif >+ >+ > %prep > %setup -q -n %{pkgname}-%{version} >+%patch0 -p1 -b .tests-python3 >+%patch1 -p1 -b .force_unicode-python3 >+ >+%if 0%{?with_python3} >+cp -a . %{py3dir} >+%endif >+ > > %build > %{__python} setup.py build > >+%if 0%{?with_python3} >+pushd %{py3dir} >+%{__python3} setup.py build >+popd >+%endif >+ > > %install > %{__python} setup.py install -O1 --skip-build --root $RPM_BUILD_ROOT > >+%if 0%{?with_python3} >+pushd %{py3dir} >+%{__python3} setup.py install -O1 --skip-build --root $RPM_BUILD_ROOT >+popd >+%endif >+ > > %files > %doc CHANGELOG.txt LICENSE.txt README.txt docs/* > %{python_sitelib}/tagging > %{python_sitelib}/django_tagging-%{version}-py?.?.egg-info > >+%if 0%{?with_python3} >+%files -n python3-django-tagging >+%doc CHANGELOG.txt LICENSE.txt README.txt docs/* >+%{python3_sitelib}/tagging >+%{python3_sitelib}/django_tagging-%{version}-py?.?.egg-info >+%endif >+ >+ > %changelog >+* Sun Dec 1 2013 Jakub DorÅák <jdornak@redhat.com> - 0.3.1-9 >+- added python3 subpackage >+ > * Sun Aug 04 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.3.1-8 > - Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild > >-- >1.8.4.2 >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 1036954
: 831840