summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobin H. Johnson <robbat2@gentoo.org>2015-08-08 13:49:04 -0700
committerRobin H. Johnson <robbat2@gentoo.org>2015-08-08 17:38:18 -0700
commit56bd759df1d0c750a065b8c845e93d5dfa6b549d (patch)
tree3f91093cdb475e565ae857f1c5a7fd339e2d781e /dev-python/django-baker/files
downloadgentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.tar.gz
gentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.tar.bz2
gentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.zip
proj/gentoo: Initial commit
This commit represents a new era for Gentoo: Storing the gentoo-x86 tree in Git, as converted from CVS. This commit is the start of the NEW history. Any historical data is intended to be grafted onto this point. Creation process: 1. Take final CVS checkout snapshot 2. Remove ALL ChangeLog* files 3. Transform all Manifests to thin 4. Remove empty Manifests 5. Convert all stale $Header$/$Id$ CVS keywords to non-expanded Git $Id$ 5.1. Do not touch files with -kb/-ko keyword flags. Signed-off-by: Robin H. Johnson <robbat2@gentoo.org> X-Thanks: Alec Warner <antarus@gentoo.org> - did the GSoC 2006 migration tests X-Thanks: Robin H. Johnson <robbat2@gentoo.org> - infra guy, herding this project X-Thanks: Nguyen Thai Ngoc Duy <pclouds@gentoo.org> - Former Gentoo developer, wrote Git features for the migration X-Thanks: Brian Harring <ferringb@gentoo.org> - wrote much python to improve cvs2svn X-Thanks: Rich Freeman <rich0@gentoo.org> - validation scripts X-Thanks: Patrick Lauer <patrick@gentoo.org> - Gentoo dev, running new 2014 work in migration X-Thanks: Michał Górny <mgorny@gentoo.org> - scripts, QA, nagging X-Thanks: All of other Gentoo developers - many ideas and lots of paint on the bikeshed
Diffstat (limited to 'dev-python/django-baker/files')
-rw-r--r--dev-python/django-baker/files/django-baker-0.11-py3-backport.patch50
-rw-r--r--dev-python/django-baker/files/django-baker-0.11-py3-iter.patch42
2 files changed, 92 insertions, 0 deletions
diff --git a/dev-python/django-baker/files/django-baker-0.11-py3-backport.patch b/dev-python/django-baker/files/django-baker-0.11-py3-backport.patch
new file mode 100644
index 000000000000..b2bc42859c2f
--- /dev/null
+++ b/dev-python/django-baker/files/django-baker-0.11-py3-backport.patch
@@ -0,0 +1,50 @@
+From baf971a58d310d6d3bfe7ddea81b33c810e3d3cf Mon Sep 17 00:00:00 2001
+From: Tim Kamanin <tim@timonweb.com>
+Date: Sat, 21 Feb 2015 18:42:45 +0100
+Subject: [PATCH] Added Python 3 support
+
+---
+ django_baker/bakery.py | 4 ++--
+ django_baker/management/commands/bake.py | 3 ++-
+ 2 files changed, 4 insertions(+), 3 deletions(-)
+
+diff --git a/django_baker/bakery.py b/django_baker/bakery.py
+index ff04ef3..7c0cbc2 100644
+--- a/django_baker/bakery.py
++++ b/django_baker/bakery.py
+@@ -4,7 +4,7 @@
+ import re
+ from django.template.loader import get_template
+ from django.template import Context
+-
++from django.utils.six import iteritems
+
+ class Baker(object):
+ """
+@@ -16,7 +16,7 @@ def bake(self, apps_and_models):
+ """
+ Iterates a dictionary of apps and models and creates all the necessary files to get up and running quickly.
+ """
+- for app_label, models in apps_and_models.iteritems():
++ for app_label, models in iteritems(apps_and_models):
+ model_names = {model.__name__: self.get_field_names_for_model(model) for model in models}
+ self.create_directories(app_label)
+ self.create_init_files(app_label, model_names.keys(), models)
+diff --git a/django_baker/management/commands/bake.py b/django_baker/management/commands/bake.py
+index e602345..f7dc16a 100644
+--- a/django_baker/management/commands/bake.py
++++ b/django_baker/management/commands/bake.py
+@@ -1,3 +1,4 @@
++from __future__ import print_function
+ from django.core.management.base import BaseCommand, CommandError
+ from django.core.exceptions import ImproperlyConfigured
+ from django.db.models import get_app, get_models
+@@ -51,7 +52,7 @@ def get_selected_models(self, app, app_label, model_names):
+ """
+ if model_names:
+ try:
+- print app_label, model_names
++ print(app_label, model_names)
+ return [get_model(app_label, model_name) for model_name in model_names]
+ except:
+ raise CommandError("One or more of the models you entered for %s are incorrect." % app_label)
diff --git a/dev-python/django-baker/files/django-baker-0.11-py3-iter.patch b/dev-python/django-baker/files/django-baker-0.11-py3-iter.patch
new file mode 100644
index 000000000000..a2902b8f487d
--- /dev/null
+++ b/dev-python/django-baker/files/django-baker-0.11-py3-iter.patch
@@ -0,0 +1,42 @@
+From c6c856c999cb9a9ce4ec8ecee714da7f6719019d Mon Sep 17 00:00:00 2001
+From: Matt Clement <mclement@savantgroup.com>
+Date: Tue, 3 Mar 2015 14:57:41 -0500
+Subject: [PATCH] Switch iteritems to items for Py3 compatibility
+
+---
+ django_baker/templates/django_baker/__init__urls | 2 +-
+ django_baker/templates/django_baker/forms | 4 ++--
+ 2 files changed, 3 insertions(+), 3 deletions(-)
+
+diff --git a/django_baker/templates/django_baker/__init__urls b/django_baker/templates/django_baker/__init__urls
+index 1baf063..d6c9bec 100644
+--- a/django_baker/templates/django_baker/__init__urls
++++ b/django_baker/templates/django_baker/__init__urls
+@@ -1,6 +1,6 @@
+ from django.conf.urls import patterns, include
+
+ urlpatterns = patterns('',
+-{% for model_name_slug, plural_model_name_slug in model_names_dict.iteritems %}
++{% for model_name_slug, plural_model_name_slug in model_names_dict.items %}
+ (r'^{{ plural_model_name_slug }}/', include('{{ app_label }}.urls.{{ model_name_slug }}_urls')),{% if forloop.first %} # NOQA{% endif %}{% endfor %}
+ )
+diff --git a/django_baker/templates/django_baker/forms b/django_baker/templates/django_baker/forms
+index 1f55c86..a21234d 100644
+--- a/django_baker/templates/django_baker/forms
++++ b/django_baker/templates/django_baker/forms
+@@ -1,7 +1,7 @@
+ from django import forms
+ from .models import {{ model_names|join:", " }}
+
+-{% for model_name, model_fields in model_names.iteritems %}
++{% for model_name, model_fields in model_names.items %}
+ class {{ model_name }}Form(forms.ModelForm):
+
+ class Meta:
+@@ -36,4 +36,4 @@ class {{ model_name }}Form(forms.ModelForm):
+ def save(self, commit=True):
+ return super({{ model_name }}Form, self).save(commit)
+ {% if not forloop.last %}
+-{% endif %}{% endfor %}
+\ No newline at end of file
++{% endif %}{% endfor %}