Skip to contentSkip to conversation

package/python-web2py: new package

PATCH New Angelo Compagnucci 2 participants 5 messages Feb 14, 2015

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 package/python-web2py: new package

This patch adds web2py package. web2py is a free open source full-stack framework for rapid development of fast, scalable, secure and portable database-driven web-based applications.

---
 package/Config.in                      |  1 +
 package/python-web2py/Config.in        | 20 ++++++++++++++++++++
 package/python-web2py/S51web2py        | 24 ++++++++++++++++++++++++
 package/python-web2py/python-web2py.mk | 34 ++++++++++++++++++++++++++++++++++
 package/python-web2py/web2py.service   | 10 ++++++++++
 5 files changed, 89 insertions(+)
 create mode 100644 package/python-web2py/Config.in
 create mode 100644 package/python-web2py/S51web2py
 create mode 100644 package/python-web2py/python-web2py.mk
 create mode 100644 package/python-web2py/web2py.service
package/Config.in +1 -0
index fe3d3d0..a874410 100644
@@ -573,6 +573,7 @@ menu "external python modules"
 	source "package/python-twisted/Config.in"
 	source "package/python-urwid/Config.in"
 	source "package/python-versiontools/Config.in"
+	source "package/python-web2py/Config.in"
 	source "package/python-webpy/Config.in"
 	source "package/python-werkzeug/Config.in"
 	source "package/python-zope-interface/Config.in"
package/python-web2py/Config.in new file +20 -0
new file mode 100644
index 0000000..3f28c0c
@@ -0,0 +1,20 @@
+config BR2_PACKAGE_PYTHON_WEB2PY
+	bool "python-web2py"
+	depends on BR2_PACKAGE_PYTHON_ZLIB
+	depends on BR2_PACKAGE_PYTHON_PYEXPAT
+	help
+	  web2py is a free open source full-stack framework for rapid
+	  development of fast, scalable, secure and portable
+	  database-driven web-based applications.
+
+	  http://web2py.com
+
+if BR2_PACKAGE_PYTHON_WEB2PY
+
+config BR2_PACKAGE_PYTHON_WEB2PY_PASSWORD
+	string "Administrative password"
+	default web2py
+	help
+	  Set the Admin panel password.
+
+endif
package/python-web2py/S51web2py new file +24 -0
new file mode 100644
index 0000000..e6e0cad
@@ -0,0 +1,24 @@
+#!/bin/sh
+
+case "$1" in
+	start)
+		echo -n "Starting web2py: "
+		start-stop-daemon -S -q -m -p /run/web2py.pid \
+			-b -x /usr/share/web2py/web2py.py \
+			-- --nogui -a '<recycle>' -i 0.0.0.0 -p 80
+		[ $? = 0 ] && echo "OK" || echo "FAIL"
+		;;
+	stop)
+		echo -n "Stopping web2py: "
+		start-stop-daemon -K -q -p /run/web2py.pid
+		[ $? = 0 ] && echo "OK" || echo "FAIL"
+		;;
+	restart)
+		"$0" stop
+		sleep 1
+		"$0" start
+		;;
+	*)
+		echo "Usage: $0 {start|stop|restart}"
+		;;
+esac
package/python-web2py/python-web2py.mk new file +34 -0
new file mode 100644
index 0000000..6fcf0c1
@@ -0,0 +1,34 @@
+################################################################################
+#
+# web2py
+#
+################################################################################
+
+PYTHON_WEB2PY_VERSION = 2.9.12
+PYTHON_WEB2PY_SITE = https://github.com/web2py/web2py/archive/
+PYTHON_WEB2PY_SOURCE = R-$(PYTHON_WEB2PY_VERSION).tar.gz
+PYTHON_WEB2PY_LICENSE = LGPLv3
+PYTHON_WEB2PY_LICENSE_FILES = LICENSE
+
+define PYTHON_WEB2PY_INSTALL_TARGET_CMDS
+	python -c 'import os; \
+		os.chdir("$(@D)"); \
+		from gluon.main import save_password; \
+		save_password($(BR2_PACKAGE_PYTHON_WEB2PY_PASSWORD),80)'
+	rsync -a $(@D)/* $(TARGET_DIR)/usr/share/web2py
+endef
+
+define PYTHON_WEB2PY_INSTALL_INIT_SYSV
+	$(INSTALL) -m 0755 -D package/python-web2py/S51web2py \
+		$(TARGET_DIR)/etc/init.d/S51web2py
+endef
+
+define PYTHON_WEB2PY_INSTALL_INIT_SYSTEMD
+	$(INSTALL) -D -m 0644 package/python-web2py/web2py.service \
+		$(TARGET_DIR)/etc/systemd/system/web2py.service
+	mkdir -p $(TARGET_DIR)/etc/systemd/system/multi-user.target.wants
+	ln -fs ../web2py.service \
+		$(TARGET_DIR)/etc/systemd/system/multi-user.target.wants/web2py.service
+endef
+
+$(eval $(generic-package))
package/python-web2py/web2py.service new file +10 -0
new file mode 100644
index 0000000..3791d8d
@@ -0,0 +1,10 @@
+[Unit]
+Description=Web2py daemon
+After=network.target
+
+[Service]
+Type=simple
+ExecStart=/usr/share/web2py/web2py.py --nogui -a '<recycle>' -i 0.0.0.0 -p 80
+
+[Install]
+WantedBy=multi-user.target
Signature · 1 line
1.9.1
#1 lore raw

PATCH 1/1 package/python-web2py: new package

Quoted 35 lines · Angelo Compagnucci

This patch adds web2py package. web2py is a free open source full-stack framework for rapid development of fast, scalable, secure and portable database-driven web-based applications.

---
 package/Config.in                      |  1 +
 package/python-web2py/Config.in        | 20 ++++++++++++++++++++
 package/python-web2py/S51web2py        | 24 ++++++++++++++++++++++++
 package/python-web2py/python-web2py.mk | 34 ++++++++++++++++++++++++++++++++++
 package/python-web2py/web2py.service   | 10 ++++++++++
 5 files changed, 89 insertions(+)
 create mode 100644 package/python-web2py/Config.in
 create mode 100644 package/python-web2py/S51web2py
 create mode 100644 package/python-web2py/python-web2py.mk
 create mode 100644 package/python-web2py/web2py.service
package/Config.in +1 -0
index fe3d3d0..a874410 100644
@@ -573,6 +573,7 @@ menu "external python modules"
        source "package/python-twisted/Config.in"
        source "package/python-urwid/Config.in"
        source "package/python-versiontools/Config.in"
+       source "package/python-web2py/Config.in"
        source "package/python-webpy/Config.in"
        source "package/python-werkzeug/Config.in"
        source "package/python-zope-interface/Config.in"
package/python-web2py/Config.in new file +0 -0
new file mode 100644
index 0000000..3f28c0c

package/python-web2py/Config.in line 4

Quoted 4 lines
package/python-web2py/Config.in new file +4 -0
@@ -0,0 +1,20 @@
+config BR2_PACKAGE_PYTHON_WEB2PY
+       bool "python-web2py"
+       depends on BR2_PACKAGE_PYTHON_ZLIB
+       depends on BR2_PACKAGE_PYTHON_PYEXPAT

Shouldn't this be like this, if web2py supports both Python 2 and 3

select BR2_PACKAGE_PYTHON_ZLIB if BR2_PACKAGE_PYTHON # runtime select BR2_PACKAGE_PYTHON3_ZLIB if BR2_PACKAGE_PYTHON3 # runtime select BR2_PACKAGE_PYTHON_PYEXPAT if BR2_PACKAGE_PYTHON # runtime select BR2_PACKAGE_PYTHON3_PYEXPAT if BR2_PACKAGE_PYTHON3 # runtime

Quoted 109 lines
package/python-web2py/Config.in new file +16 -0
+       help
+         web2py is a free open source full-stack framework for rapid
+         development of fast, scalable, secure and portable
+         database-driven web-based applications.
+
+         http://web2py.com
+
+if BR2_PACKAGE_PYTHON_WEB2PY
+
+config BR2_PACKAGE_PYTHON_WEB2PY_PASSWORD
+       string "Administrative password"
+       default web2py
+       help
+         Set the Admin panel password.
+
+endif
package/python-web2py/S51web2py new file +24 -0
new file mode 100644
index 0000000..e6e0cad
@@ -0,0 +1,24 @@
+#!/bin/sh
+
+case "$1" in
+       start)
+               echo -n "Starting web2py: "
+               start-stop-daemon -S -q -m -p /run/web2py.pid \
+                       -b -x /usr/share/web2py/web2py.py \
+                       -- --nogui -a '<recycle>' -i 0.0.0.0 -p 80
+               [ $? = 0 ] && echo "OK" || echo "FAIL"
+               ;;
+       stop)
+               echo -n "Stopping web2py: "
+               start-stop-daemon -K -q -p /run/web2py.pid
+               [ $? = 0 ] && echo "OK" || echo "FAIL"
+               ;;
+       restart)
+               "$0" stop
+               sleep 1
+               "$0" start
+               ;;
+       *)
+               echo "Usage: $0 {start|stop|restart}"
+               ;;
+esac
package/python-web2py/python-web2py.mk new file +34 -0
new file mode 100644
index 0000000..6fcf0c1
@@ -0,0 +1,34 @@
+################################################################################
+#
+# web2py
+#
+################################################################################
+
+PYTHON_WEB2PY_VERSION = 2.9.12
+PYTHON_WEB2PY_SITE = https://github.com/web2py/web2py/archive/
+PYTHON_WEB2PY_SOURCE = R-$(PYTHON_WEB2PY_VERSION).tar.gz
+PYTHON_WEB2PY_LICENSE = LGPLv3
+PYTHON_WEB2PY_LICENSE_FILES = LICENSE
+
+define PYTHON_WEB2PY_INSTALL_TARGET_CMDS
+       python -c 'import os; \
+               os.chdir("$(@D)"); \
+               from gluon.main import save_password; \
+               save_password($(BR2_PACKAGE_PYTHON_WEB2PY_PASSWORD),80)'
+       rsync -a $(@D)/* $(TARGET_DIR)/usr/share/web2py
+endef
+
+define PYTHON_WEB2PY_INSTALL_INIT_SYSV
+       $(INSTALL) -m 0755 -D package/python-web2py/S51web2py \
+               $(TARGET_DIR)/etc/init.d/S51web2py
+endef
+
+define PYTHON_WEB2PY_INSTALL_INIT_SYSTEMD
+       $(INSTALL) -D -m 0644 package/python-web2py/web2py.service \
+               $(TARGET_DIR)/etc/systemd/system/web2py.service
+       mkdir -p $(TARGET_DIR)/etc/systemd/system/multi-user.target.wants
+       ln -fs ../web2py.service \
+               $(TARGET_DIR)/etc/systemd/system/multi-user.target.wants/web2py.service
+endef
+
+$(eval $(generic-package))
package/python-web2py/web2py.service new file +10 -1
new file mode 100644
index 0000000..3791d8d
@@ -0,0 +1,10 @@
+[Unit]
+Description=Web2py daemon
+After=network.target
+
+[Service]
+Type=simple
+ExecStart=/usr/share/web2py/web2py.py --nogui -a '<recycle>' -i 0.0.0.0 -p 80
+
+[Install]
+WantedBy=multi-user.target
--

1.9.1

_______________________________________________
buildroot mailing list
buildroot at busybox.net
http://lists.busybox.net/mailman/listinfo/buildroot

#2 lore raw

PATCH 1/1 package/python-web2py: new package

Yegor Yefremov

2015-02-14 12:52 GMT+01:00 Yegor Yefremov <[email protected]>:

Quoted 44 lines
Quoted 35 lines · Angelo Compagnucci

This patch adds web2py package. web2py is a free open source full-stack framework for rapid development of fast, scalable, secure and portable database-driven web-based applications.

---
 package/Config.in                      |  1 +
 package/python-web2py/Config.in        | 20 ++++++++++++++++++++
 package/python-web2py/S51web2py        | 24 ++++++++++++++++++++++++
 package/python-web2py/python-web2py.mk | 34 ++++++++++++++++++++++++++++++++++
 package/python-web2py/web2py.service   | 10 ++++++++++
 5 files changed, 89 insertions(+)
 create mode 100644 package/python-web2py/Config.in
 create mode 100644 package/python-web2py/S51web2py
 create mode 100644 package/python-web2py/python-web2py.mk
 create mode 100644 package/python-web2py/web2py.service
package/Config.in +1 -0
index fe3d3d0..a874410 100644
@@ -573,6 +573,7 @@ menu "external python modules"
        source "package/python-twisted/Config.in"
        source "package/python-urwid/Config.in"
        source "package/python-versiontools/Config.in"
+       source "package/python-web2py/Config.in"
        source "package/python-webpy/Config.in"
        source "package/python-werkzeug/Config.in"
        source "package/python-zope-interface/Config.in"
package/python-web2py/Config.in new file +0 -0
new file mode 100644
index 0000000..3f28c0c

package/python-web2py/Config.in line 4

Quoted 4 lines
package/python-web2py/Config.in new file +4 -0
@@ -0,0 +1,20 @@
+config BR2_PACKAGE_PYTHON_WEB2PY
+       bool "python-web2py"
+       depends on BR2_PACKAGE_PYTHON_ZLIB
+       depends on BR2_PACKAGE_PYTHON_PYEXPAT

Shouldn't this be like this, if web2py supports both Python 2 and 3

Quoted 4 lines

select BR2_PACKAGE_PYTHON_ZLIB if BR2_PACKAGE_PYTHON # runtime select BR2_PACKAGE_PYTHON3_ZLIB if BR2_PACKAGE_PYTHON3 # runtime select BR2_PACKAGE_PYTHON_PYEXPAT if BR2_PACKAGE_PYTHON # runtime select BR2_PACKAGE_PYTHON3_PYEXPAT if BR2_PACKAGE_PYTHON3 # runtime

Nope, web2py doesn't support python3.

Sincerely, Angelo

Quoted 112 lines
Quoted 109 lines
package/python-web2py/Config.in new file +16 -0
+       help
+         web2py is a free open source full-stack framework for rapid
+         development of fast, scalable, secure and portable
+         database-driven web-based applications.
+
+         http://web2py.com
+
+if BR2_PACKAGE_PYTHON_WEB2PY
+
+config BR2_PACKAGE_PYTHON_WEB2PY_PASSWORD
+       string "Administrative password"
+       default web2py
+       help
+         Set the Admin panel password.
+
+endif
package/python-web2py/S51web2py new file +24 -0
new file mode 100644
index 0000000..e6e0cad
@@ -0,0 +1,24 @@
+#!/bin/sh
+
+case "$1" in
+       start)
+               echo -n "Starting web2py: "
+               start-stop-daemon -S -q -m -p /run/web2py.pid \
+                       -b -x /usr/share/web2py/web2py.py \
+                       -- --nogui -a '<recycle>' -i 0.0.0.0 -p 80
+               [ $? = 0 ] && echo "OK" || echo "FAIL"
+               ;;
+       stop)
+               echo -n "Stopping web2py: "
+               start-stop-daemon -K -q -p /run/web2py.pid
+               [ $? = 0 ] && echo "OK" || echo "FAIL"
+               ;;
+       restart)
+               "$0" stop
+               sleep 1
+               "$0" start
+               ;;
+       *)
+               echo "Usage: $0 {start|stop|restart}"
+               ;;
+esac
package/python-web2py/python-web2py.mk new file +34 -0
new file mode 100644
index 0000000..6fcf0c1
@@ -0,0 +1,34 @@
+################################################################################
+#
+# web2py
+#
+################################################################################
+
+PYTHON_WEB2PY_VERSION = 2.9.12
+PYTHON_WEB2PY_SITE = https://github.com/web2py/web2py/archive/
+PYTHON_WEB2PY_SOURCE = R-$(PYTHON_WEB2PY_VERSION).tar.gz
+PYTHON_WEB2PY_LICENSE = LGPLv3
+PYTHON_WEB2PY_LICENSE_FILES = LICENSE
+
+define PYTHON_WEB2PY_INSTALL_TARGET_CMDS
+       python -c 'import os; \
+               os.chdir("$(@D)"); \
+               from gluon.main import save_password; \
+               save_password($(BR2_PACKAGE_PYTHON_WEB2PY_PASSWORD),80)'
+       rsync -a $(@D)/* $(TARGET_DIR)/usr/share/web2py
+endef
+
+define PYTHON_WEB2PY_INSTALL_INIT_SYSV
+       $(INSTALL) -m 0755 -D package/python-web2py/S51web2py \
+               $(TARGET_DIR)/etc/init.d/S51web2py
+endef
+
+define PYTHON_WEB2PY_INSTALL_INIT_SYSTEMD
+       $(INSTALL) -D -m 0644 package/python-web2py/web2py.service \
+               $(TARGET_DIR)/etc/systemd/system/web2py.service
+       mkdir -p $(TARGET_DIR)/etc/systemd/system/multi-user.target.wants
+       ln -fs ../web2py.service \
+               $(TARGET_DIR)/etc/systemd/system/multi-user.target.wants/web2py.service
+endef
+
+$(eval $(generic-package))
package/python-web2py/web2py.service new file +10 -1
new file mode 100644
index 0000000..3791d8d
@@ -0,0 +1,10 @@
+[Unit]
+Description=Web2py daemon
+After=network.target
+
+[Service]
+Type=simple
+ExecStart=/usr/share/web2py/web2py.py --nogui -a '<recycle>' -i 0.0.0.0 -p 80
+
+[Install]
+WantedBy=multi-user.target
--

1.9.1

_______________________________________________
buildroot mailing list
buildroot at busybox.net
http://lists.busybox.net/mailman/listinfo/buildroot

Signature · 1 line
Profile: http://it.linkedin.com/in/compagnucciangelo
#3 lore raw

PATCH 1/1 package/python-web2py: new package

Quoted 47 lines · Angelo Compagnucci

Yegor Yefremov

2015-02-14 12:52 GMT+01:00 Yegor Yefremov <[email protected]>:

Quoted 44 lines
Quoted 35 lines · Angelo Compagnucci

This patch adds web2py package. web2py is a free open source full-stack framework for rapid development of fast, scalable, secure and portable database-driven web-based applications.

---
 package/Config.in                      |  1 +
 package/python-web2py/Config.in        | 20 ++++++++++++++++++++
 package/python-web2py/S51web2py        | 24 ++++++++++++++++++++++++
 package/python-web2py/python-web2py.mk | 34 ++++++++++++++++++++++++++++++++++
 package/python-web2py/web2py.service   | 10 ++++++++++
 5 files changed, 89 insertions(+)
 create mode 100644 package/python-web2py/Config.in
 create mode 100644 package/python-web2py/S51web2py
 create mode 100644 package/python-web2py/python-web2py.mk
 create mode 100644 package/python-web2py/web2py.service
package/Config.in +1 -0
index fe3d3d0..a874410 100644
@@ -573,6 +573,7 @@ menu "external python modules"
        source "package/python-twisted/Config.in"
        source "package/python-urwid/Config.in"
        source "package/python-versiontools/Config.in"
+       source "package/python-web2py/Config.in"
        source "package/python-webpy/Config.in"
        source "package/python-werkzeug/Config.in"
        source "package/python-zope-interface/Config.in"
package/python-web2py/Config.in new file +0 -0
new file mode 100644
index 0000000..3f28c0c

package/python-web2py/Config.in line 4

Quoted 4 lines
package/python-web2py/Config.in new file +4 -0
@@ -0,0 +1,20 @@
+config BR2_PACKAGE_PYTHON_WEB2PY
+       bool "python-web2py"
+       depends on BR2_PACKAGE_PYTHON_ZLIB
+       depends on BR2_PACKAGE_PYTHON_PYEXPAT

Shouldn't this be like this, if web2py supports both Python 2 and 3

Quoted 6 lines
Quoted 4 lines

select BR2_PACKAGE_PYTHON_ZLIB if BR2_PACKAGE_PYTHON # runtime select BR2_PACKAGE_PYTHON3_ZLIB if BR2_PACKAGE_PYTHON3 # runtime select BR2_PACKAGE_PYTHON_PYEXPAT if BR2_PACKAGE_PYTHON # runtime select BR2_PACKAGE_PYTHON3_PYEXPAT if BR2_PACKAGE_PYTHON3 # runtime

Nope, web2py doesn't support python3.

Then you need "depends on BR2_PACKAGE_PYTHON" otherwise automatic build system could produce errors, when building this package under Python3.

Quoted 119 lines

Sincerely, Angelo

Quoted 108 lines
Quoted 105 lines
package/python-web2py/Config.in new file +16 -0
+       help
+         web2py is a free open source full-stack framework for rapid
+         development of fast, scalable, secure and portable
+         database-driven web-based applications.
+
+         http://web2py.com
+
+if BR2_PACKAGE_PYTHON_WEB2PY
+
+config BR2_PACKAGE_PYTHON_WEB2PY_PASSWORD
+       string "Administrative password"
+       default web2py
+       help
+         Set the Admin panel password.
+
+endif
package/python-web2py/S51web2py new file +24 -0
new file mode 100644
index 0000000..e6e0cad
@@ -0,0 +1,24 @@
+#!/bin/sh
+
+case "$1" in
+       start)
+               echo -n "Starting web2py: "
+               start-stop-daemon -S -q -m -p /run/web2py.pid \
+                       -b -x /usr/share/web2py/web2py.py \
+                       -- --nogui -a '<recycle>' -i 0.0.0.0 -p 80
+               [ $? = 0 ] && echo "OK" || echo "FAIL"
+               ;;
+       stop)
+               echo -n "Stopping web2py: "
+               start-stop-daemon -K -q -p /run/web2py.pid
+               [ $? = 0 ] && echo "OK" || echo "FAIL"
+               ;;
+       restart)
+               "$0" stop
+               sleep 1
+               "$0" start
+               ;;
+       *)
+               echo "Usage: $0 {start|stop|restart}"
+               ;;
+esac
package/python-web2py/python-web2py.mk new file +34 -0
new file mode 100644
index 0000000..6fcf0c1
@@ -0,0 +1,34 @@
+################################################################################
+#
+# web2py
+#
+################################################################################
+
+PYTHON_WEB2PY_VERSION = 2.9.12
+PYTHON_WEB2PY_SITE = https://github.com/web2py/web2py/archive/
+PYTHON_WEB2PY_SOURCE = R-$(PYTHON_WEB2PY_VERSION).tar.gz
+PYTHON_WEB2PY_LICENSE = LGPLv3
+PYTHON_WEB2PY_LICENSE_FILES = LICENSE
+
+define PYTHON_WEB2PY_INSTALL_TARGET_CMDS
+       python -c 'import os; \
+               os.chdir("$(@D)"); \
+               from gluon.main import save_password; \
+               save_password($(BR2_PACKAGE_PYTHON_WEB2PY_PASSWORD),80)'
+       rsync -a $(@D)/* $(TARGET_DIR)/usr/share/web2py
+endef
+
+define PYTHON_WEB2PY_INSTALL_INIT_SYSV
+       $(INSTALL) -m 0755 -D package/python-web2py/S51web2py \
+               $(TARGET_DIR)/etc/init.d/S51web2py
+endef
+
+define PYTHON_WEB2PY_INSTALL_INIT_SYSTEMD
+       $(INSTALL) -D -m 0644 package/python-web2py/web2py.service \
+               $(TARGET_DIR)/etc/systemd/system/web2py.service
+       mkdir -p $(TARGET_DIR)/etc/systemd/system/multi-user.target.wants
+       ln -fs ../web2py.service \
+               $(TARGET_DIR)/etc/systemd/system/multi-user.target.wants/web2py.service
+endef
+
+$(eval $(generic-package))
package/python-web2py/web2py.service new file +10 -1
new file mode 100644
index 0000000..3791d8d
@@ -0,0 +1,10 @@
+[Unit]
+Description=Web2py daemon
+After=network.target
+
+[Service]
+Type=simple
+ExecStart=/usr/share/web2py/web2py.py --nogui -a '<recycle>' -i 0.0.0.0 -p 80
+
+[Install]
+WantedBy=multi-user.target
--

1.9.1

Quoted 4 lines
Quoted 4 lines

_______________________________________________
buildroot mailing list
buildroot at busybox.net
http://lists.busybox.net/mailman/listinfo/buildroot

--
Profile: http://it.linkedin.com/in/compagnucciangelo

#4 lore raw

PATCH 1/1 package/python-web2py: new package

Dear Yegor Yefremov,

2015-02-14 13:07 GMT+01:00 Yegor Yefremov <[email protected]>:

Quoted 54 lines
Quoted 52 lines · Angelo Compagnucci

Yegor Yefremov

2015-02-14 12:52 GMT+01:00 Yegor Yefremov <[email protected]>:

Quoted 48 lines
Quoted 35 lines · Angelo Compagnucci

This patch adds web2py package. web2py is a free open source full-stack framework for rapid development of fast, scalable, secure and portable database-driven web-based applications.

---
 package/Config.in                      |  1 +
 package/python-web2py/Config.in        | 20 ++++++++++++++++++++
 package/python-web2py/S51web2py        | 24 ++++++++++++++++++++++++
 package/python-web2py/python-web2py.mk | 34 ++++++++++++++++++++++++++++++++++
 package/python-web2py/web2py.service   | 10 ++++++++++
 5 files changed, 89 insertions(+)
 create mode 100644 package/python-web2py/Config.in
 create mode 100644 package/python-web2py/S51web2py
 create mode 100644 package/python-web2py/python-web2py.mk
 create mode 100644 package/python-web2py/web2py.service
package/Config.in +1 -0
index fe3d3d0..a874410 100644
@@ -573,6 +573,7 @@ menu "external python modules"
        source "package/python-twisted/Config.in"
        source "package/python-urwid/Config.in"
        source "package/python-versiontools/Config.in"
+       source "package/python-web2py/Config.in"
        source "package/python-webpy/Config.in"
        source "package/python-werkzeug/Config.in"
        source "package/python-zope-interface/Config.in"
package/python-web2py/Config.in new file +0 -0
new file mode 100644
index 0000000..3f28c0c

package/python-web2py/Config.in line 4

Quoted 4 lines
package/python-web2py/Config.in new file +4 -0
@@ -0,0 +1,20 @@
+config BR2_PACKAGE_PYTHON_WEB2PY
+       bool "python-web2py"
+       depends on BR2_PACKAGE_PYTHON_ZLIB
+       depends on BR2_PACKAGE_PYTHON_PYEXPAT

Shouldn't this be like this, if web2py supports both Python 2 and 3

select BR2_PACKAGE_PYTHON_ZLIB if BR2_PACKAGE_PYTHON # runtime select BR2_PACKAGE_PYTHON3_ZLIB if BR2_PACKAGE_PYTHON3 # runtime select BR2_PACKAGE_PYTHON_PYEXPAT if BR2_PACKAGE_PYTHON # runtime select BR2_PACKAGE_PYTHON3_PYEXPAT if BR2_PACKAGE_PYTHON3 # runtime

Quoted 6 lines
Quoted 1 line

Nope, web2py doesn't support python3.

Then you need "depends on BR2_PACKAGE_PYTHON" otherwise automatic build system could produce errors, when building this package under Python3.

Ops! You are right, resubmitting!

Thanks!

Quoted 118 lines
Quoted 118 lines
Quoted 109 lines
Quoted 105 lines
package/python-web2py/Config.in new file +16 -0
+       help
+         web2py is a free open source full-stack framework for rapid
+         development of fast, scalable, secure and portable
+         database-driven web-based applications.
+
+         http://web2py.com
+
+if BR2_PACKAGE_PYTHON_WEB2PY
+
+config BR2_PACKAGE_PYTHON_WEB2PY_PASSWORD
+       string "Administrative password"
+       default web2py
+       help
+         Set the Admin panel password.
+
+endif
package/python-web2py/S51web2py new file +24 -0
new file mode 100644
index 0000000..e6e0cad
@@ -0,0 +1,24 @@
+#!/bin/sh
+
+case "$1" in
+       start)
+               echo -n "Starting web2py: "
+               start-stop-daemon -S -q -m -p /run/web2py.pid \
+                       -b -x /usr/share/web2py/web2py.py \
+                       -- --nogui -a '<recycle>' -i 0.0.0.0 -p 80
+               [ $? = 0 ] && echo "OK" || echo "FAIL"
+               ;;
+       stop)
+               echo -n "Stopping web2py: "
+               start-stop-daemon -K -q -p /run/web2py.pid
+               [ $? = 0 ] && echo "OK" || echo "FAIL"
+               ;;
+       restart)
+               "$0" stop
+               sleep 1
+               "$0" start
+               ;;
+       *)
+               echo "Usage: $0 {start|stop|restart}"
+               ;;
+esac
package/python-web2py/python-web2py.mk new file +34 -0
new file mode 100644
index 0000000..6fcf0c1
@@ -0,0 +1,34 @@
+################################################################################
+#
+# web2py
+#
+################################################################################
+
+PYTHON_WEB2PY_VERSION = 2.9.12
+PYTHON_WEB2PY_SITE = https://github.com/web2py/web2py/archive/
+PYTHON_WEB2PY_SOURCE = R-$(PYTHON_WEB2PY_VERSION).tar.gz
+PYTHON_WEB2PY_LICENSE = LGPLv3
+PYTHON_WEB2PY_LICENSE_FILES = LICENSE
+
+define PYTHON_WEB2PY_INSTALL_TARGET_CMDS
+       python -c 'import os; \
+               os.chdir("$(@D)"); \
+               from gluon.main import save_password; \
+               save_password($(BR2_PACKAGE_PYTHON_WEB2PY_PASSWORD),80)'
+       rsync -a $(@D)/* $(TARGET_DIR)/usr/share/web2py
+endef
+
+define PYTHON_WEB2PY_INSTALL_INIT_SYSV
+       $(INSTALL) -m 0755 -D package/python-web2py/S51web2py \
+               $(TARGET_DIR)/etc/init.d/S51web2py
+endef
+
+define PYTHON_WEB2PY_INSTALL_INIT_SYSTEMD
+       $(INSTALL) -D -m 0644 package/python-web2py/web2py.service \
+               $(TARGET_DIR)/etc/systemd/system/web2py.service
+       mkdir -p $(TARGET_DIR)/etc/systemd/system/multi-user.target.wants
+       ln -fs ../web2py.service \
+               $(TARGET_DIR)/etc/systemd/system/multi-user.target.wants/web2py.service
+endef
+
+$(eval $(generic-package))
package/python-web2py/web2py.service new file +10 -1
new file mode 100644
index 0000000..3791d8d
@@ -0,0 +1,10 @@
+[Unit]
+Description=Web2py daemon
+After=network.target
+
+[Service]
+Type=simple
+ExecStart=/usr/share/web2py/web2py.py --nogui -a '<recycle>' -i 0.0.0.0 -p 80
+
+[Install]
+WantedBy=multi-user.target
--

1.9.1

Quoted 4 lines
Quoted 4 lines

_______________________________________________
buildroot mailing list
buildroot at busybox.net
http://lists.busybox.net/mailman/listinfo/buildroot

--
Profile: http://it.linkedin.com/in/compagnucciangelo

Signature · 1 line
Profile: http://it.linkedin.com/in/compagnucciangelo