Skip to contentSkip to conversation

python-django: new package

PATCH New oli vogt 2 participants 4 messages Jan 3, 2015 – Jan 5, 2015

lore
Share & tools
lore

oli vogt

author
#0 lore raw

PATCH 1/1 python-django: new package

---
 package/Config.in                        |  1 +
 package/python-django/Config.in          | 15 +++++++++++++++
 package/python-django/python-django.hash |  2 ++
 package/python-django/python-django.mk   | 14 ++++++++++++++
 4 files changed, 32 insertions(+)
 create mode 100644 package/python-django/Config.in
 create mode 100644 package/python-django/python-django.hash
 create mode 100644 package/python-django/python-django.mk
package/Config.in +1 -0
index 424ef12..8d91b04 100644
@@ -496,6 +496,7 @@ menu "external python modules"
 	source "package/python-crc16/Config.in"
 	source "package/python-daemon/Config.in"
 	source "package/python-dialog/Config.in"
+	source "package/python-django/Config.in"
 	source "package/python-docopt/Config.in"
 	source "package/python-dpkt/Config.in"
 	source "package/python-enum/Config.in"
package/python-django/Config.in new file +15 -0
new file mode 100644
index 0000000..c48a381
@@ -0,0 +1,15 @@
+config BR2_PACKAGE_PYTHON_DJANGO
+	bool "python-django"
+	depends on BR2_PACKAGE_PYTHON
+	select BR2_PACKAGE_PYTHON_UNICODEDATA
+	select BR2_PACKAGE_PYTHON_PYEXPAT
+	help
+	  Django is a high-level Python Web framework that encourages
+	  rapid development and clean, pragmatic design. It takes your
+	  Web applications from concept to launch in a matter of hours.
+	  Django takes care of user authentication, content administration,
+	  site maps, RSS feeds, user comments and many more tasks.
+	  Django takes security seriously and helps developers avoid
+	  many common security mistakes
+
+	  https://www.djangoproject.com/
package/python-django/python-django.hash new file +2 -0
new file mode 100644
index 0000000..313abb4
@@ -0,0 +1,2 @@
+# sha256 from https://www.djangoproject.com/m/pgp/Django-1.7.1.checksum.txt
+sha256	3de62e71ce2cfbcdecb6e344cad04948506c8410ea5c6eab15c8f3b31b8ac1c0 Django-1.7.1.tar.gz
package/python-django/python-django.mk new file +14 -0
new file mode 100644
index 0000000..f874ca3
@@ -0,0 +1,14 @@
+################################################################################
+#
+# python-django
+#
+################################################################################
+
+PYTHON_DJANGO_VERSION = 1.7.1
+PYTHON_DJANGO_SOURCE = Django-$(PYTHON_DJANGO_VERSION).tar.gz
+PYTHON_DJANGO_SITE = https://www.djangoproject.com/download/$(PYTHON_DJANGO_VERSION)/tarball/
+PYTHON_DJANGO_LICENSE = BSD
+PYTHON_DJANGO_LICENSE_FILES = LICENSE
+PYTHON_DJANGO_SETUP_TYPE = setuptools
+
+$(eval $(python-package))
Signature · 1 line
1.9.1
#1 lore raw

PATCH 1/1 python-django: new package

Dear oli vogt,

package/python-django/Config.in line 3

Quoted 9 lines · oli vogt
package/python-django/Config.in new file +3 -0
new file mode 100644
index 0000000..c48a381
@@ -0,0 +1,15 @@
+config BR2_PACKAGE_PYTHON_DJANGO
+	bool "python-django"
+	depends on BR2_PACKAGE_PYTHON

What about Python 3 ? Django supports both Python 2 and Python 3. I've changed this to allow Django to be built with Python 3.

package/python-django/Config.in line 4

Quoted 1 line
package/python-django/Config.in new file +1 -0
+PYTHON_DJANGO_VERSION = 1.7.1

1.7.2 is out, so I've bumped to this version.

package/python-django/Config.in line 6

Quoted 2 lines
package/python-django/Config.in new file +2 -0
+PYTHON_DJANGO_SOURCE = Django-$(PYTHON_DJANGO_VERSION).tar.gz
+PYTHON_DJANGO_SITE = https://www.djangoproject.com/download/$(PYTHON_DJANGO_VERSION)/tarball/

This didn't work, because the URL to download Django is just
https://www.djangoproject.com/download/$(PYTHON_DJANGO_VERSION)/tarball/,
while Buildroot expects $(PYTHON_DJANGO_SITE)/$(PYTHON_DJANGO_SOURCE). So I've switched to pypi as the source for Django.

Patch applied with those changes, see
http://git.buildroot.net/buildroot/commit/?id=71d6705ef6a3516325891bc117b3253b49ca0f5f.

Thanks!

Thomas

Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
author
#2 lore raw

PATCH 1/1 python-django: new package

Dear Thomas.

I should have put this in covering letter:

Yes it should work with Python3 however I was not able to test it as I use
2.7. This meant I was not sure about core module dependencies. Thanks.
Also: I only tested it as ARM cross compile.
Sorry about the download link I 'hand-downloaded' the tarball to get
things started and did not delete it to test. Thanks again.

oli

Quoted 36 lines · Thomas Petazzoni

Dear oli vogt,

Review

Quoted 1 line · oli vogt
(quoted diff) +0 -0

b/package/python-django/Config.in

package/python-django/Config.in line 3

Quoted 8 lines

new file mode 100644
index 0000000..c48a381

package/python-django/Config.in new file +3 -0
@@ -0,0 +1,15 @@
+config BR2_PACKAGE_PYTHON_DJANGO
+     bool "python-django"
+     depends on BR2_PACKAGE_PYTHON

What about Python 3 ? Django supports both Python 2 and Python 3. I've changed this to allow Django to be built with Python 3.

package/python-django/Config.in line 4

Quoted 1 line
package/python-django/Config.in new file +1 -0
+PYTHON_DJANGO_VERSION = 1.7.1

1.7.2 is out, so I've bumped to this version.

package/python-django/Config.in line 6

Quoted 2 lines
package/python-django/Config.in new file +2 -0
+PYTHON_DJANGO_SOURCE = Django-$(PYTHON_DJANGO_VERSION).tar.gz
+PYTHON_DJANGO_SITE =

https://www.djangoproject.com/download/$(PYTHON_DJANGO_VERSION)/tarball/

This didn't work, because the URL to download Django is just
https://www.djangoproject.com/download/$(PYTHON_DJANGO_VERSION)/tarball/,
while Buildroot expects $(PYTHON_DJANGO_SITE)/$(PYTHON_DJANGO_SOURCE). So I've switched to pypi as the source for Django.

Patch applied with those changes, see

http://git.buildroot.net/buildroot/commit/?id=71d6705ef6a3516325891bc117b3253b49ca0f5f
.

Quoted 8 lines

Thanks!

Thomas
--
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.busybox.net/pipermail/buildroot/attachments/20150105/438084e6/attachment.html>

#3 lore raw

PATCH 1/1 python-django: new package

Dear Oli Vogt,

Quoted 2 lines · Oli Vogt

Yes it should work with Python3 however I was not able to test it as I use
2.7. This meant I was not sure about core module dependencies. Thanks.

Ok. I assumed the same core Python 3 dependencies as with Python 2. I was able to "import django" in Python 3.

However, I noticed that the django-admin tool does not work on the target, but maybe this is expected.

Quoted 2 lines

Sorry about the download link I 'hand-downloaded' the tarball to get
things started and did not delete it to test. Thanks again.

No problem, this was quickly fixed. Thanks for your contribution!

Thomas

Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com