From 4f2d7949f03e1c198bc888f2d05f421d35c57e21 Mon Sep 17 00:00:00 2001 From: V3n3RiX Date: Mon, 9 Oct 2017 18:53:29 +0100 Subject: reinit the tree, so we can have metadata --- dev-python/django-baker/Manifest | 7 +++ .../django-baker/django-baker-0.11-r2.ebuild | 22 ++++++++++ .../files/django-baker-0.11-py3-backport.patch | 50 ++++++++++++++++++++++ .../files/django-baker-0.11-py3-iter.patch | 42 ++++++++++++++++++ dev-python/django-baker/metadata.xml | 12 ++++++ 5 files changed, 133 insertions(+) create mode 100644 dev-python/django-baker/Manifest create mode 100644 dev-python/django-baker/django-baker-0.11-r2.ebuild create mode 100644 dev-python/django-baker/files/django-baker-0.11-py3-backport.patch create mode 100644 dev-python/django-baker/files/django-baker-0.11-py3-iter.patch create mode 100644 dev-python/django-baker/metadata.xml (limited to 'dev-python/django-baker') diff --git a/dev-python/django-baker/Manifest b/dev-python/django-baker/Manifest new file mode 100644 index 000000000000..1e8b393d9b46 --- /dev/null +++ b/dev-python/django-baker/Manifest @@ -0,0 +1,7 @@ +AUX django-baker-0.11-py3-backport.patch 2127 SHA256 6ad6ff8459547917723d82a9ef469fd5e993dca88543954788eb5d516efb6f8b SHA512 bc5785df9258579b3f583f4573e8907f5794f2a09576e91f770fe2e19b74043db1068c493cf0c0d7f448a4d1cbc7774187b474dd3d3c1cf80a1a68e2d4d77c54 WHIRLPOOL 75fcf909cd457e3cd3ca9d77e91926f637e8099547aa980c2e56569511372ab4e13fdd3ad563c55521da89f0057d8dd0440635c8e50bb587413f79afbdbd6984 +AUX django-baker-0.11-py3-iter.patch 1820 SHA256 3f38e4539ab2e87cefec42649a92778fa5b441e0c8cfe579ac7c10763584ca72 SHA512 d20fbb4ae9de91c3af36a902a5600f3f4dbaae82e7c33285f157fc3a40cc416e3fd2ce0a453e6138d7381fdbe1834694eacb2214a49b9528dc0c8b26e5ac5f47 WHIRLPOOL 61c75a1a52ad9d6ef8545f30ce88c69db884b9f9748d590ce30ba7b291be8296a94e4a067a09fc2a7a97610951b39c5a2b650993a646c3a2fcf6da51b3c74805 +DIST django-baker-0.11.tar.gz 14920 SHA256 b656577f8234529374251ccf760a0e3e4cda613ea4a19ee17ae87647aeefc364 SHA512 98a64efec8a0cabe9c4091852f3dcbff95007c0ff2020b782f73ab6cc5e3d73cd52356546f1f64b55a69fefdf8f053d95d604584831cf07cb1b8037446892439 WHIRLPOOL 8feddec1f8dd57bdbfe7632c0da998ddaabdc0fb4711a84d9a31b1f0c4db15282311d41db323549a15fefebc41bde605b6f9052c215d756f56968c432529f33a +EBUILD django-baker-0.11-r2.ebuild 602 SHA256 da7d74c014f0b85c39e69f750d192f3e1d062b88f0048457e740ba63acbf1fd4 SHA512 98b90447b36d917a39a9dc3a6a1adf6c1144e498378a00d9f7e6cff88a4041392125c3f2ec97af55f7f049bf5ee30375bd472411d1cfb87d149a50276c19bbdf WHIRLPOOL 89e18a60761ad49a658bff220a965ff578d44abea1aff067f37fe1e25fc2f156a42f92000a87d4ad59e9eafe63e6d47482aba68abcf885096ed8761ecbc1f469 +MISC ChangeLog 2811 SHA256 aa41645114e66d4f1adda22a73173b6e40deda891ac9286e9c8199ff36898fe6 SHA512 c37a33f703319418dea93a0afbd15ea4c5600047a1e8ad3d50f2caa2ec79d4244ac6d355592083b602092e16e2f625c49f183762aa5b9f54522d36290a943fc5 WHIRLPOOL 68ab173bebdb2102323b3255d5531097088ab225314fdd704eac357bb89719771cedd412216a706e5424418e34b8773dfa38ad99e9c5de7e41d4f44bd25f7ebf +MISC ChangeLog-2015 1095 SHA256 3e9f039b826350935e31e9e59435fb4b878a52b3b4d09dfa00e1fcabaf087c07 SHA512 bb916b7103da9701f466baadf089b686172eb86081d821009290418ebf90c9451bc1b5b739a811a02e19fd56f99d9b98020ab09095145be8f686f4257f4c1497 WHIRLPOOL c6391ee7f99c0c8367655668bda5ac0e87546ba329fc7d384bdc0526ccab694aa0af5977c676f9c308741a0698511ab7907823d12a178da751e7e0a6cf56a2ad +MISC metadata.xml 390 SHA256 6a1f0aae52cb3f058a6549d976b4503587f6b26ebd29d673d0966b1337bab690 SHA512 e36e22cfded440f5e241ac9ea3a4c1cc5a47155355001f5979dee66fc84618edc8c139ad7126d44a427f45e82c2fea5cc6d458ec01e6f1fad2d2c83eb94ed68c WHIRLPOOL 197b4b2bedcb541a7fe6b970ef515fad40cd28b025dc990e1dc3da3f278f3a333fe4e0d679fa9bd97f190ab1de2032ca1ae7d49afbdf77ae60cd214a7b69aefe diff --git a/dev-python/django-baker/django-baker-0.11-r2.ebuild b/dev-python/django-baker/django-baker-0.11-r2.ebuild new file mode 100644 index 000000000000..cd08ed5ad5f8 --- /dev/null +++ b/dev-python/django-baker/django-baker-0.11-r2.ebuild @@ -0,0 +1,22 @@ +# Copyright 1999-2017 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=5 + +PYTHON_COMPAT=( python2_7 python3_{4,5,6} pypy ) + +inherit distutils-r1 + +DESCRIPTION="Management command that generates views, forms, urls, admin, and templates for models" +HOMEPAGE="https://pypi.python.org/pypi/django-baker https://github.com/krisfields/django-baker" +SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz" + +SLOT="0" +LICENSE="BSD" +KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux" +IUSE="" + +PATCHES=( + "${FILESDIR}"/${P}-py3-backport.patch + "${FILESDIR}"/${P}-py3-iter.patch +) 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 +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 +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 %} diff --git a/dev-python/django-baker/metadata.xml b/dev-python/django-baker/metadata.xml new file mode 100644 index 000000000000..42030f97281b --- /dev/null +++ b/dev-python/django-baker/metadata.xml @@ -0,0 +1,12 @@ + + + + + python@gentoo.org + Python + + + django-baker + krisfields/django-baker + + -- cgit v1.2.3