Skip to content

Commit 942ad52

Browse files
author
Paolo Patruno
committed
Add support for django with patch
1 parent 3c2825b commit 942ad52

File tree

2 files changed

+34
-0
lines changed

2 files changed

+34
-0
lines changed
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
from pythonforandroid.toolchain import PythonRecipe
2+
3+
class DjangoRecipe(PythonRecipe):
4+
name = 'django'
5+
version = '1.10.5'
6+
url = 'https://pypi.python.org/packages/c3/c2/6096bf5d0caa4e3d5b985ac72e3a0c795e37fa7407d6c85460b2a105b467/Django-{version}.tar.gz'
7+
MD5_django='3fce02f1e6461fec21f1f15ea7489924'
8+
depends = ['hostpython2','setuptools']
9+
site_packages_name = 'django'
10+
11+
patches = ['migration.patch',]
12+
call_hostpython_via_targetpython = False
13+
14+
def should_build(self, arch):
15+
name = self.site_packages_name
16+
if name is None:
17+
name = self.name
18+
return True
19+
20+
recipe = DjangoRecipe()
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
--- django/db/migrations/loader.py 2016-07-18 20:08:55.000000000 +0200
2+
+++ new/django/db/migrations/loader.py 2016-11-22 00:59:25.652385356 +0100
3+
@@ -100,6 +100,11 @@
4+
import_name = name.rsplit(".", 1)[0]
5+
if import_name[0] not in "_.~":
6+
migration_names.add(import_name)
7+
+
8+
+ if name.endswith(".pyo"):
9+
+ import_name = name.rsplit(".", 1)[0]
10+
+ if import_name[0] not in "_.~":
11+
+ migration_names.add(import_name)
12+
# Load them
13+
for migration_name in migration_names:
14+
migration_module = import_module("%s.%s" % (module_name, migration_name))

0 commit comments

Comments
 (0)