diff options
author | 2015-08-08 13:49:04 -0700 | |
---|---|---|
committer | 2015-08-08 17:38:18 -0700 | |
commit | 56bd759df1d0c750a065b8c845e93d5dfa6b549d (patch) | |
tree | 3f91093cdb475e565ae857f1c5a7fd339e2d781e /dev-python/south | |
download | gentoo-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/south')
-rw-r--r-- | dev-python/south/Manifest | 1 | ||||
-rw-r--r-- | dev-python/south/files/south-0.7.5-tests.patch | 23 | ||||
-rw-r--r-- | dev-python/south/files/south-1.0-3753b49c-Replace-dict.iteritems-with-six.patch | 60 | ||||
-rw-r--r-- | dev-python/south/metadata.xml | 8 | ||||
-rw-r--r-- | dev-python/south/south-1.0.ebuild | 48 |
5 files changed, 140 insertions, 0 deletions
diff --git a/dev-python/south/Manifest b/dev-python/south/Manifest new file mode 100644 index 000000000000..5ff5118eb43a --- /dev/null +++ b/dev-python/south/Manifest @@ -0,0 +1 @@ +DIST south-1.0.tar.gz 97890 SHA256 017ecc2d66818580e1131af61b8d96901c4a2d05b051186196d9d4f35bdbb901 SHA512 8f181e8879734ddc3bba4e6f9e0efc3d4db4783fbd629c56c4f72401d161080bed51e3955bc37b7796160145c733321f356c63aece22da752695fc3e24c9b90b WHIRLPOOL 8f7949c96394906a53ecfcedcbe3c9b9fdae32db4c28fb7f507c8529fc586947021eebee259b5caab5a03550a4003b0d8aed9a1f6bcc658fb1b48dbdd64ddf6f diff --git a/dev-python/south/files/south-0.7.5-tests.patch b/dev-python/south/files/south-0.7.5-tests.patch new file mode 100644 index 000000000000..2e4da84d975d --- /dev/null +++ b/dev-python/south/files/south-0.7.5-tests.patch @@ -0,0 +1,23 @@ +http://south.aeracode.org/ticket/1256 +diff -ur south-0.7.5.orig/south/tests/db.py south-0.7.5/south/tests/db.py +--- south/tests/db.py 2012-05-08 18:37:14.000000000 +0800 ++++ south/tests/db.py 2013-05-18 15:46:23.920225709 +0800 +@@ -1,5 +1,8 @@ +-import datetime +-import unittest ++import datetime, sys ++if sys.version_info == (2, 7): ++ import unittest ++else: ++ import unittest2 as unittest + + from south.db import db, generic + from django.db import connection, models +@@ -71,6 +74,7 @@ + else: + self.fail("Just-deleted table could be selected!") + ++ @unittest.expectedFailure + def test_nonexistent_delete(self): + """ + Test deletion of nonexistent tables. diff --git a/dev-python/south/files/south-1.0-3753b49c-Replace-dict.iteritems-with-six.patch b/dev-python/south/files/south-1.0-3753b49c-Replace-dict.iteritems-with-six.patch new file mode 100644 index 000000000000..07c50edabce3 --- /dev/null +++ b/dev-python/south/files/south-1.0-3753b49c-Replace-dict.iteritems-with-six.patch @@ -0,0 +1,60 @@ +# HG changeset patch +# User Gary Wilson Jr. <gary@thegarywilson.com> +# Date 1397849538 18000 +# Branch python3-iteritems +# Node ID 3753b49ca9f3d34c94156622b380def245d88e80 +# Parent 0e17add9b5e0f30f7cf5acf47961eea6a7f4032c +Fixed a Python 3 incompatibility by replacing dict.iteritems() usage with an iteritems py3 util function from six. + +diff --git a/south/migration/migrators.py b/south/migration/migrators.py +--- a/south/migration/migrators.py ++++ b/south/migration/migrators.py +@@ -16,7 +16,7 @@ + from south.db import DEFAULT_DB_ALIAS + from south.models import MigrationHistory + from south.signals import ran_migration +-from south.utils.py3 import StringIO ++from south.utils.py3 import StringIO, iteritems + + + class Migrator(object): +@@ -161,7 +161,7 @@ + if self.verbosity: + print(" - Migration '%s' is marked for no-dry-run." % migration) + return +- for name, db in south.db.dbs.iteritems(): ++ for name, db in iteritems(south.db.dbs): + south.db.dbs[name].dry_run = True + # preserve the constraint cache as it can be mutated by the dry run + constraint_cache = deepcopy(south.db.db._constraint_cache) +@@ -181,7 +181,7 @@ + if self._ignore_fail: + south.db.db.debug = old_debug + south.db.db.clear_run_data(pending_creates) +- for name, db in south.db.dbs.iteritems(): ++ for name, db in iteritems(south.db.dbs): + south.db.dbs[name].dry_run = False + # restore the preserved constraint cache from before dry run was + # executed +diff --git a/south/utils/py3.py b/south/utils/py3.py +--- a/south/utils/py3.py ++++ b/south/utils/py3.py +@@ -26,3 +26,18 @@ + def with_metaclass(meta, base=object): + """Create a base class with a metaclass.""" + return meta("NewBase", (base,), {}) ++ ++ ++def _add_doc(func, doc): ++ """Add documentation to a function.""" ++ func.__doc__ = doc ++ ++if PY3: ++ def iteritems(d, **kw): ++ return iter(d.items(**kw)) ++else: ++ def iteritems(d, **kw): ++ return iter(d.iteritems(**kw)) ++ ++_add_doc(iteritems, ++ "Return an iterator over the (key, value) pairs of a dictionary.") diff --git a/dev-python/south/metadata.xml b/dev-python/south/metadata.xml new file mode 100644 index 000000000000..e049460bf258 --- /dev/null +++ b/dev-python/south/metadata.xml @@ -0,0 +1,8 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <herd>python</herd> + <upstream> + <remote-id type="pypi">south</remote-id> + </upstream> +</pkgmetadata> diff --git a/dev-python/south/south-1.0.ebuild b/dev-python/south/south-1.0.ebuild new file mode 100644 index 000000000000..c4e66755de1a --- /dev/null +++ b/dev-python/south/south-1.0.ebuild @@ -0,0 +1,48 @@ +# Copyright 1999-2015 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI=5 + +PYTHON_COMPAT=( python2_7 python3_{3,4} pypy ) + +inherit distutils-r1 + +MY_PN="South" +MY_P="${MY_PN}-${PV}" + +DESCRIPTION="Intelligent schema migrations for Django apps" +HOMEPAGE="http://south.aeracode.org/" +SRC_URI="mirror://pypi/${MY_P:0:1}/${MY_PN}/${MY_P}.tar.gz -> ${P}.tar.gz" + +LICENSE="Apache-2.0" +SLOT="0" +KEYWORDS="amd64 x86" +IUSE="test" + +RDEPEND="<dev-python/django-1.7[${PYTHON_USEDEP}]" +DEPEND="${RDEPEND} + dev-python/setuptools[${PYTHON_USEDEP}] + test? ( dev-python/django[sqlite] )" + +PATCHES=( "${FILESDIR}"/${P}-3753b49c-Replace-dict.iteritems-with-six.patch ) + +S="${WORKDIR}/${MY_P}" + +python_test() { + cd "${BUILD_DIR}" || die + django-admin.py startproject southtest || die "setting up test env failed" + pushd southtest > /dev/null + sed -i \ + -e "/^INSTALLED_APPS/a\ 'south'," \ + southtest/settings.py || die "sed failed" + echo "SKIP_SOUTH_TESTS=False" >> southtest/settings.py + "${EPYTHON}" manage.py test south || die "tests failed for ${EPYTHON}" + popd > /dev/null +} + +pkg_postinst() { + elog "In order to use the south schema migrations for your Django project," + elog "just add 'south' to your INSTALLED_APPS in the settings.py file." + elog "manage.py will now automagically offer the new functions." +} |