- Update to 1.4
This commit is contained in:
parent
a554718044
commit
f1bf7df3a8
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=295032
@ -6,9 +6,9 @@
|
||||
#
|
||||
|
||||
PORTNAME= django
|
||||
PORTVERSION= 1.3.1
|
||||
PORTVERSION= 1.4
|
||||
CATEGORIES= www python
|
||||
MASTER_SITES= http://media.djangoproject.com/releases/${PORTVERSION:R}/ \
|
||||
MASTER_SITES= https://www.djangoproject.com/m/releases/${PORTVERSION}/ \
|
||||
CHEESESHOP
|
||||
PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX}
|
||||
DISTNAME= Django-${PORTVERSION}
|
||||
@ -17,12 +17,14 @@ DIST_SUBDIR= python
|
||||
MAINTAINER= lwhsu@FreeBSD.org
|
||||
COMMENT= High-level Python Web framework
|
||||
|
||||
LICENSE= BSD
|
||||
|
||||
USE_GETTEXT= yes
|
||||
USE_PYTHON= yes
|
||||
USE_PYDISTUTILS= yes
|
||||
PYDISTUTILS_PKGNAME= Django
|
||||
|
||||
CONFLICTS= py2[0-9]-django-devel-[0-9]* py2[0-9]-django-1.[12]*
|
||||
CONFLICTS= py2[0-9]-django-devel-[0-9]* py2[0-9]-django-1.[23]*
|
||||
|
||||
DOCSDIR= ${PREFIX}/share/doc/py-django
|
||||
|
||||
@ -41,7 +43,6 @@ OPTIONSFILE= ${PORT_DBDIR}/py-${PORTNAME}/options
|
||||
|
||||
.if defined(WITH_POSTGRESQL)
|
||||
RUN_DEPENDS+= ${PYTHON_SITELIBDIR}/psycopg2/_psycopg.so:${PORTSDIR}/databases/py-psycopg2
|
||||
EXTRA_PATCHES+= ${FILESDIR}/extra-patch-changeset_16520.diff
|
||||
.endif
|
||||
|
||||
.if defined(WITH_MYSQL)
|
||||
@ -58,7 +59,6 @@ RUN_DEPENDS+= ${PYTHON_PKGNAMEPREFIX}flup>0:${PORTSDIR}/www/py-flup
|
||||
|
||||
.if defined(WITH_DOCS)
|
||||
BUILD_DEPENDS+= ${PYTHON_PKGNAMEPREFIX}sphinx>0:${PORTSDIR}/textproc/py-sphinx
|
||||
EXTRA_PATCHES+= ${FILESDIR}/extra-patch-changeset_16223_16231.diff
|
||||
PORTDOCS= *
|
||||
.endif
|
||||
|
||||
|
@ -1,2 +1,2 @@
|
||||
SHA256 (python/Django-1.3.1.tar.gz) = af9118c4e8a063deb0b8cda901fcff2b805e7cf496c93fd43507163f3cde156b
|
||||
SIZE (python/Django-1.3.1.tar.gz) = 6514564
|
||||
SHA256 (python/Django-1.4.tar.gz) = c096bafbea10e7d359bc15eb00a9bf11dbf5201a16d62acfa2de61d5a35488e9
|
||||
SIZE (python/Django-1.4.tar.gz) = 7632772
|
||||
|
@ -1,17 +0,0 @@
|
||||
--- docs/_ext/djangodocs.py.orig 2010-11-21 05:00:41.000000000 +0800
|
||||
+++ docs/_ext/djangodocs.py 2011-12-24 22:37:54.866639407 +0800
|
||||
@@ -127,12 +127,14 @@
|
||||
|
||||
# Don't use border=1, which docutils does by default.
|
||||
def visit_table(self, node):
|
||||
+ self._table_row_index = 0 # Needed by Sphinx
|
||||
self.body.append(self.starttag(node, 'table', CLASS='docutils'))
|
||||
|
||||
# <big>? Really?
|
||||
def visit_desc_parameterlist(self, node):
|
||||
self.body.append('(')
|
||||
self.first_param = 1
|
||||
+ self.param_separator = node.child_text_separator
|
||||
|
||||
def depart_desc_parameterlist(self, node):
|
||||
self.body.append(')')
|
@ -1,84 +0,0 @@
|
||||
diff -uprN Django-1.3-vanilla/django/db/backends/creation.py Django-1.3/django/db/backends/creation.py
|
||||
--- django/db/backends/creation.py 2011-02-02 12:02:14.000000000 -0200
|
||||
+++ django/db/backends/creation.py 2011-07-16 20:21:28.000000000 -0300
|
||||
@@ -413,7 +413,7 @@ class BaseDatabaseCreation(object):
|
||||
# if the database supports it because PostgreSQL doesn't allow
|
||||
# CREATE/DROP DATABASE statements within transactions.
|
||||
cursor = self.connection.cursor()
|
||||
- self.set_autocommit()
|
||||
+ self._prepare_for_test_db_ddl()
|
||||
try:
|
||||
cursor.execute("CREATE DATABASE %s %s" % (qn(test_database_name), suffix))
|
||||
except Exception, e:
|
||||
@@ -458,20 +458,27 @@ class BaseDatabaseCreation(object):
|
||||
# to do so, because it's not allowed to delete a database while being
|
||||
# connected to it.
|
||||
cursor = self.connection.cursor()
|
||||
- self.set_autocommit()
|
||||
+ self._prepare_for_test_db_ddl()
|
||||
time.sleep(1) # To avoid "database is being accessed by other users" errors.
|
||||
cursor.execute("DROP DATABASE %s" % self.connection.ops.quote_name(test_database_name))
|
||||
self.connection.close()
|
||||
|
||||
def set_autocommit(self):
|
||||
- "Make sure a connection is in autocommit mode."
|
||||
- if hasattr(self.connection.connection, "autocommit"):
|
||||
- if callable(self.connection.connection.autocommit):
|
||||
- self.connection.connection.autocommit(True)
|
||||
- else:
|
||||
- self.connection.connection.autocommit = True
|
||||
- elif hasattr(self.connection.connection, "set_isolation_level"):
|
||||
- self.connection.connection.set_isolation_level(0)
|
||||
+ """
|
||||
+ Make sure a connection is in autocommit mode. - Deprecated, not used
|
||||
+ anymore by Django code. Kept for compatibility with user code that
|
||||
+ might use it.
|
||||
+ """
|
||||
+ pass
|
||||
+
|
||||
+ def _prepare_for_test_db_ddl(self):
|
||||
+ """
|
||||
+ Internal implementation - Hook for tasks that should be performed before
|
||||
+ the ``CREATE DATABASE``/``DROP DATABASE`` clauses used by testing code
|
||||
+ to create/ destroy test databases. Needed e.g. in PostgreSQL to rollback
|
||||
+ and close any active transaction.
|
||||
+ """
|
||||
+ pass
|
||||
|
||||
def sql_table_creation_suffix(self):
|
||||
"SQL to append to the end of the test table creation statements"
|
||||
diff -uprN Django-1.3-vanilla/django/db/backends/oracle/creation.py Django-1.3/django/db/backends/oracle/creation.py
|
||||
--- django/db/backends/oracle/creation.py 2011-02-19 05:41:17.000000000 -0200
|
||||
+++ django/db/backends/oracle/creation.py 2011-07-16 20:32:14.000000000 -0300
|
||||
@@ -269,3 +269,6 @@ class DatabaseCreation(BaseDatabaseCreat
|
||||
settings_dict['NAME'],
|
||||
self._test_database_user(),
|
||||
)
|
||||
+
|
||||
+ def set_autocommit(self):
|
||||
+ self.connection.connection.autocommit = True
|
||||
diff -uprN Django-1.3-vanilla/django/db/backends/postgresql/creation.py Django-1.3/django/db/backends/postgresql/creation.py
|
||||
--- django/db/backends/postgresql/creation.py 2010-07-29 23:54:47.000000000 -0300
|
||||
+++ django/db/backends/postgresql/creation.py 2011-07-16 20:28:39.000000000 -0300
|
||||
@@ -74,3 +74,11 @@ class DatabaseCreation(BaseDatabaseCreat
|
||||
else:
|
||||
output = []
|
||||
return output
|
||||
+
|
||||
+ def set_autocommit(self):
|
||||
+ self._prepare_for_test_db_ddl()
|
||||
+
|
||||
+ def _prepare_for_test_db_ddl(self):
|
||||
+ """Rollback and close the active transaction."""
|
||||
+ self.connection.connection.rollback()
|
||||
+ self.connection.connection.set_isolation_level(0)
|
||||
diff -uprN Django-1.3-vanilla/django/db/backends/sqlite3/creation.py Django-1.3/django/db/backends/sqlite3/creation.py
|
||||
--- django/db/backends/sqlite3/creation.py 2010-12-08 21:48:28.000000000 -0200
|
||||
+++ django/db/backends/sqlite3/creation.py 2011-07-16 20:28:57.000000000 -0300
|
||||
@@ -68,3 +68,6 @@ class DatabaseCreation(BaseDatabaseCreat
|
||||
if test_database_name and test_database_name != ":memory:":
|
||||
# Remove the SQLite database file
|
||||
os.remove(test_database_name)
|
||||
+
|
||||
+ def set_autocommit(self):
|
||||
+ self.connection.connection.isolation_level = None
|
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue
Block a user