Verified Commit 2ba1702c authored by Štěpán Henek's avatar Štěpán Henek 🌩

foris+foris-plugins+dependencies: python3 conversion

parent b814dcd1
......@@ -9,11 +9,11 @@ include $(TOPDIR)/rules.mk
PKG_NAME:=foris-controller-storage-module
PKG_VERSION:=0.2
PKG_RELEASE:=3
PKG_RELEASE:=4
PKG_SOURCE_SUBDIR:=$(PKG_NAME)
PKG_SOURCE_PROTO:=git
PKG_SOURCE_URL:=https://gitlab.labs.nic.cz/turris/foris-controller-storage-module.git
PKG_SOURCE_VERSION:=59dd80ace40fab688fd571b002d37ccb87bae9b9
PKG_SOURCE_VERSION:=v$(PKG_VERSION)
PKG_SOURCE:=$(PKG_NAME)-$(PKG_SOURCE_VERSION).tar.gz
PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)
......@@ -21,6 +21,7 @@ PKG_LICENSE:=GPL-3.0
PKG_LICENSE_FILE:=LICENSE
include $(INCLUDE_DIR)/package.mk
include ../foris-controller/files/foris-controller-module.mk
$(call include_mk, python3-package.mk)
......@@ -28,7 +29,7 @@ define Package/$(PKG_NAME)
TITLE:=$(PKG_NAME)
DEPENDS:=\
+foris-controller +btrfs-progs +coreutils-stat +rsync +partx-utils +blkid
MAINTAINER:=Michal Hrusecky <michal.hrusecky@nic.cz>
MAINTAINER:=CZ.NIC <packaging@turris.cz>
endef
define Package/$(PKG_NAME)/description
......@@ -72,4 +73,5 @@ fi
mkdir -p "$${IPKG_INSTROOT}"/srv
endef
$(eval $(call ForisControllerModule,$(PKG_NAME)))
$(eval $(call BuildPackage,$(PKG_NAME)))
......@@ -8,7 +8,7 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=foris-diagnostics-plugin
PKG_VERSION:=9
PKG_VERSION:=10
PKG_RELEASE:=1
PKG_SOURCE_SUBDIR:=$(PKG_NAME)
PKG_SOURCE_PROTO:=git
......@@ -20,13 +20,13 @@ PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)
PKG_LICENSE:=GPL-3.0
PKG_LICENSE_FILE:=LICENSE
PKG_BUILD_DEPENDS:=python/host python-libsass/host python-setuptools/host foris-plugins-distutils/host
PKG_BUILD_DEPENDS:=python3/host python3-libsass/host python3-setuptools/host foris-plugins-distutils/host
include $(INCLUDE_DIR)/package.mk
include ../foris/files/foris-translations.mk
include ../foris/files/foris-plugin.mk
$(call include_mk, python-package.mk)
$(call include_mk, python3-package.mk)
define Package/$(PKG_NAME)
TITLE:=$(PKG_NAME)
......
......@@ -8,7 +8,7 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=foris-netmetr-plugin
PKG_VERSION:=3
PKG_VERSION:=4
PKG_RELEASE:=1
PKG_SOURCE_SUBDIR:=$(PKG_NAME)
PKG_SOURCE_PROTO:=git
......@@ -20,13 +20,13 @@ PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)
PKG_LICENSE:=GPL-3.0
PKG_LICENSE_FILE:=LICENSE
PKG_BUILD_DEPENDS:=python/host python-libsass/host python-setuptools/host foris-plugins-distutils/host
PKG_BUILD_DEPENDS:=python3/host python3-libsass/host python3-setuptools/host foris-plugins-distutils/host
include $(INCLUDE_DIR)/package.mk
include ../foris/files/foris-translations.mk
include ../foris/files/foris-plugin.mk
$(call include_mk, python-package.mk)
$(call include_mk, python3-package.mk)
define Package/$(PKG_NAME)
TITLE:=$(PKG_NAME)
......
......@@ -8,7 +8,7 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=foris-openvpn-plugin
PKG_VERSION:=15
PKG_VERSION:=16
PKG_RELEASE:=1
PKG_SOURCE_SUBDIR:=$(PKG_NAME)
PKG_SOURCE_PROTO:=git
......@@ -20,13 +20,13 @@ PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)
PKG_LICENSE:=GPL-3.0
PKG_LICENSE_FILE:=LICENSE
PKG_BUILD_DEPENDS:=python/host python-libsass/host python-setuptools/host foris-plugins-distutils/host
PKG_BUILD_DEPENDS:=python3/host python3-libsass/host python3-setuptools/host foris-plugins-distutils/host
include $(INCLUDE_DIR)/package.mk
include ../foris/files/foris-translations.mk
include ../foris/files/foris-plugin.mk
$(call include_mk, python-package.mk)
$(call include_mk, python3-package.mk)
define Package/$(PKG_NAME)
TITLE:=$(PKG_NAME)
......
......@@ -8,25 +8,25 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=foris-pakon-plugin
PKG_VERSION:=1.1
PKG_RELEASE:=5
PKG_VERSION:=2
PKG_RELEASE:=1
PKG_SOURCE_SUBDIR:=$(PKG_NAME)
PKG_SOURCE_PROTO:=git
PKG_SOURCE_URL:=https://gitlab.labs.nic.cz/turris/foris-pakon-plugin.git
PKG_SOURCE_VERSION:=bc1277151da9d1aac9fe3ea7f8ebee4a5615886d
PKG_SOURCE_VERSION:=package-v$(PKG_VERSION)
PKG_SOURCE:=$(PKG_NAME)-$(PKG_SOURCE_VERSION).tar.gz
PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)
PKG_LICENSE:=GPL-3.0
PKG_LICENSE_FILE:=LICENSE
PKG_BUILD_DEPENDS:=python/host python-libsass/host python-setuptools/host foris-plugins-distutils/host
PKG_BUILD_DEPENDS:=python3/host python3-libsass/host python3-setuptools/host foris-plugins-distutils/host
include $(INCLUDE_DIR)/package.mk
include ../foris/files/foris-translations.mk
include ../foris/files/foris-plugin.mk
$(call include_mk, python-package.mk)
$(call include_mk, python3-package.mk)
define Package/$(PKG_NAME)
TITLE:=$(PKG_NAME)
......
Index: foris-pakon-plugin/src/static/sass/pakon.sass
===================================================================
--- foris-pakon-plugin.orig/src/static/sass/pakon.sass
+++ foris-pakon-plugin/src/static/sass/pakon.sass
@@ -153,7 +153,7 @@ dialog.loading
visibility: hidden
display: block
position: fixed
- background: url(/foris/config/static/img/loader.gif)
+ background: url(../../../img/loader.gif)
width: 120px
height: 120px
padding: 0
......@@ -24,18 +24,18 @@ HOST_BUILD_DIR:=$(BUILD_DIR_HOST)/$(PKG_NAME)
PKG_LICENSE:=GPL-3.0
PKG_BUILD_DEPENDS:=python python-libsass
HOST_BUILD_DEPENDS:=python/host python-setuptools/host python-libsass/host
PKG_BUILD_DEPENDS:=python3 python3-libsass
HOST_BUILD_DEPENDS:=python3/host python3-setuptools/host python3-libsass/host
include $(INCLUDE_DIR)/package.mk
include $(INCLUDE_DIR)/host-build.mk
$(call include_mk, python-package.mk)
$(call include_mk, python-host.mk)
$(call include_mk, python3-package.mk)
$(call include_mk, python3-host.mk)
define Package/$(PKG_NAME)
TITLE:=$(PKG_NAME)
URL:=https://gitlab.labs.nic.cz/turris/foris-plugins-distutils
DEPENDS:=+python-light
DEPENDS:=+python3-light
MAINTAINER:=CZ.NIC <packaging@turris.cz>
endef
......@@ -44,17 +44,17 @@ define Package/$(PKG_NAME)/description
endef
define Build/Compile
$(call Build/Compile/PyMod,., \
$(call Build/Compile/Py3Mod,., \
install --prefix="/usr" --root="$(PKG_INSTALL_DIR)" \
)
endef
define Host/Compile
$(call Build/Compile/HostPyMod,,build)
$(call Build/Compile/HostPy3Mod,,build)
endef
define Host/Install
$(call Build/Compile/HostPyMod,,install --prefix="" --root="$(STAGING_DIR)/host")
$(call Build/Compile/HostPy3Mod,,install --prefix="" --root="$(STAGING_DIR_HOSTPKG)")
endef
define Package/$(PKG_NAME)/install
......@@ -66,5 +66,5 @@ endef
$(eval $(call HostBuild))
$(eval $(call PyPackage,$(PKG_NAME)))
$(eval $(call Py3Package,$(PKG_NAME)))
$(eval $(call BuildPackage,$(PKG_NAME)))
......@@ -8,7 +8,7 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=foris-schema
PKG_VERSION:=0.7
PKG_VERSION:=0.7.1
PKG_RELEASE:=1
PKG_SOURCE_SUBDIR:=$(PKG_NAME)
PKG_SOURCE_PROTO:=git
......
......@@ -8,7 +8,7 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=foris-ssbackups-plugin
PKG_VERSION:=7
PKG_VERSION:=8
PKG_RELEASE:=1
PKG_SOURCE_SUBDIR:=$(PKG_NAME)
PKG_SOURCE_PROTO:=git
......@@ -20,13 +20,13 @@ PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)
PKG_LICENSE:=GPL-3.0
PKG_LICENSE_FILE:=LICENSE
PKG_BUILD_DEPENDS:=python/host python-libsass/host python-setuptools/host foris-plugins-distutils/host
PKG_BUILD_DEPENDS:=python3/host python3-libsass/host python3-setuptools/host foris-plugins-distutils/host
include $(INCLUDE_DIR)/package.mk
include ../foris/files/foris-translations.mk
include ../foris/files/foris-plugin.mk
$(call include_mk, python-package.mk)
$(call include_mk, python3-package.mk)
define Package/$(PKG_NAME)
TITLE:=$(PKG_NAME)
......
......@@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
PKG_NAME:=foris-storage-plugin
PKG_VERSION:=1
PKG_RELEASE:=15
PKG_RELEASE:=16
PKG_SOURCE_SUBDIR:=$(PKG_NAME)
PKG_SOURCE_PROTO:=git
PKG_SOURCE_URL:=https://gitlab.labs.nic.cz/turris/foris-storage-plugin.git
......@@ -20,13 +20,13 @@ PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)
PKG_LICENSE:=GPL-3.0
PKG_LICENSE_FILE:=LICENSE
PKG_BUILD_DEPENDS:=python/host python-libsass/host python-setuptools/host foris-plugins-distutils/host
PKG_BUILD_DEPENDS:=python3/host python3-libsass/host python3-setuptools/host foris-plugins-distutils/host
include $(INCLUDE_DIR)/package.mk
include ../foris/files/foris-translations.mk
include ../foris/files/foris-plugin.mk
$(call include_mk, python-package.mk)
$(call include_mk, python3-package.mk)
define Package/$(PKG_NAME)
TITLE:=$(PKG_NAME)
......
......@@ -8,7 +8,7 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=foris
PKG_VERSION:=98.5
PKG_VERSION:=98.6
PKG_RELEASE:=1
PKG_SOURCE_SUBDIR:=$(PKG_NAME)
PKG_SOURCE_PROTO:=git
......@@ -17,21 +17,27 @@ PKG_SOURCE_VERSION:=package-v$(PKG_VERSION)
PKG_SOURCE:=$(PKG_NAME)-$(PKG_SOURCE_VERSION).tar.gz
PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)
PKG_BUILD_DEPENDS:=ruby/host python-libsass/host
PKG_BUILD_DEPENDS:=\
ruby/host \
python3-libsass/host \
python3-pytz/host \
python3-babel/host \
python3-markupsafe/host \
python3-jinja2/host
include $(INCLUDE_DIR)/package.mk
include $(INCLUDE_DIR)/host-build.mk
include ./files/foris-translations.mk
$(call include_mk, python-package.mk)
$(call include_mk, python3-package.mk)
define Package/foris-common
TITLE:=foris-common
DEPENDS:=\
+python-light +python-bottle +python-bottle-i18n \
+python-flup +python-ubus +lighttpd +lighttpd-mod-fastcgi \
+python3-light +python3-bottle +python3-bottle-i18n \
+python3-flup +python3-ubus +python3-jinja2 +lighttpd +lighttpd-mod-fastcgi \
+lighttpd-mod-redirect +lighttpd-mod-setenv +lighttpd-mod-alias +foris-ws \
+foris-client-python2
+foris-client-python3
MAINTAINER:=CZ.NIC <packaging@turris.cz>
endef
......@@ -56,7 +62,7 @@ MAKE_FLAGS+=\
define Build/Compile
$(call Build/Compile/Default)
$(call Build/Compile/PyMod,,install --prefix=/usr --root="$(PKG_INSTALL_DIR)")
$(call Build/Compile/Py3Mod,,install --prefix=/usr --root="$(PKG_INSTALL_DIR)")
endef
define Package/foris-common/conffiles
......@@ -79,18 +85,18 @@ define Package/foris-common/install
$(INSTALL_DIR) $(1)/usr/bin
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/foris $(1)/usr/bin/foris
$(INSTALL_DIR) $(1)$(PYTHON_PKG_DIR)
$(INSTALL_DIR) $(1)$(PYTHON3_PKG_DIR)
$(CP) \
$(PKG_INSTALL_DIR)$(PYTHON_PKG_DIR)/* \
$(1)$(PYTHON_PKG_DIR)/
$(RM) -r $(1)$(PYTHON_PKG_DIR)/foris/locale/
$(RM) -r $(1)$(PYTHON_PKG_DIR)/foris/langs/??.py
$(RM) -r $(1)$(PYTHON_PKG_DIR)/foris/config
$(RM) $(1)$(PYTHON_PKG_DIR)/foris/config_app.py
$(PKG_INSTALL_DIR)$(PYTHON3_PKG_DIR)/* \
$(1)$(PYTHON3_PKG_DIR)/
$(RM) -r $(1)$(PYTHON3_PKG_DIR)/foris/locale/
$(RM) -r $(1)$(PYTHON3_PKG_DIR)/foris/langs/??.py
$(RM) -r $(1)$(PYTHON3_PKG_DIR)/foris/config
$(RM) $(1)$(PYTHON3_PKG_DIR)/foris/config_app.py
$(INSTALL_DIR) $(1)$(PYTHON_PKG_DIR)/foris/locale
touch $(1)$(PYTHON_PKG_DIR)/foris/locale/.keep
$(INSTALL_DIR) $(1)$(PYTHON3_PKG_DIR)/foris/locale
touch $(1)$(PYTHON3_PKG_DIR)/foris/locale/.keep
endef
define Package/foris-config
......@@ -112,8 +118,8 @@ define Package/foris/description
endef
define Package/foris/install
$(INSTALL_DIR) $(1)$(PYTHON_PKG_DIR)/foris/
touch $(1)$(PYTHON_PKG_DIR)/foris/.keep
$(INSTALL_DIR) $(1)$(PYTHON3_PKG_DIR)/foris/
touch $(1)$(PYTHON3_PKG_DIR)/foris/.keep
endef
define Package/foris-config/install
......@@ -122,24 +128,19 @@ define Package/foris-config/install
$(INSTALL_DIR) $(1)/usr/share/foris
$(INSTALL_BIN) ./files/foris-config-cgi $(1)/usr/share/foris/foris-config-cgi
$(INSTALL_DIR) $(1)$(PYTHON_PKG_DIR)/foris/config
$(INSTALL_DIR) $(1)$(PYTHON3_PKG_DIR)/foris/config
$(CP) \
$(PKG_INSTALL_DIR)$(PYTHON_PKG_DIR)/foris/config_app.py \
$(1)$(PYTHON_PKG_DIR)/foris/
$(PKG_INSTALL_DIR)$(PYTHON3_PKG_DIR)/foris/config_app.py \
$(1)$(PYTHON3_PKG_DIR)/foris/
$(CP) \
$(PKG_INSTALL_DIR)$(PYTHON_PKG_DIR)/foris/config/* \
$(1)$(PYTHON_PKG_DIR)/foris/config/
$(PKG_INSTALL_DIR)$(PYTHON3_PKG_DIR)/foris/config/* \
$(1)$(PYTHON3_PKG_DIR)/foris/config/
endef
define Package/foris-common/postinst
#!/bin/sh
set -x
[ -n "$$IPKG_INSTROOT" ] || {
# Cleanup of 1.0
if [ -f /www2/forris.pyc ]; then
find /www2 -name '*.pyc' -exec rm -f \{\} \;
rmdir /www2/nuci/modules /www2/nuci /www2/config_handlers /www2/utils /www2 || true
fi
/etc/init.d/lighttpd enable
/etc/init.d/lighttpd restart
}
......@@ -184,14 +185,14 @@ define ForisTranslation
endef
define Package/foris-l10n-$(1)/install
$(INSTALL_DIR) $$(1)$(PYTHON_PKG_DIR)/foris/locale/$(1)/LC_MESSAGES
$(INSTALL_DIR) $$(1)$(PYTHON3_PKG_DIR)/foris/locale/$(1)/LC_MESSAGES
$(CP) \
$(PKG_INSTALL_DIR)$(PYTHON_PKG_DIR)/foris/locale/$(1)/LC_MESSAGES/*.mo \
$$(1)$(PYTHON_PKG_DIR)/foris/locale/$(1)/LC_MESSAGES/
$(INSTALL_DIR) $$(1)$(PYTHON_PKG_DIR)/foris/langs/
$(PKG_INSTALL_DIR)$(PYTHON3_PKG_DIR)/foris/locale/$(1)/LC_MESSAGES/*.mo \
$$(1)$(PYTHON3_PKG_DIR)/foris/locale/$(1)/LC_MESSAGES/
$(INSTALL_DIR) $$(1)$(PYTHON3_PKG_DIR)/foris/langs/
$(CP) \
$(PKG_INSTALL_DIR)$(PYTHON_PKG_DIR)/foris/langs/$(1).py \
$$(1)$(PYTHON_PKG_DIR)/foris/langs/
$(PKG_INSTALL_DIR)$(PYTHON3_PKG_DIR)/foris/langs/$(1).py \
$$(1)$(PYTHON3_PKG_DIR)/foris/langs/
endef
define Package/foris-l10n-$(1)/postrm
......@@ -214,7 +215,6 @@ $(foreach trans,$(FORIS_TRANSLATIONS),$(eval $(call ForisTranslation,$(trans))))
$(eval $(call BuildPackage,foris))
$(foreach trans,$(FORIS_TRANSLATIONS),$(eval $(call BuildPackage,foris-l10n-$(trans))))
$(eval $(call PyPackage,foris))
$(eval $(call Py3Package,foris))
$(eval $(call BuildPackage,foris-common))
$(eval $(call BuildPackage,foris-config))
$(eval $(call HostBuild))
......@@ -11,11 +11,11 @@ define ForisPluginTranslation
endef
define Package/$(1)-l10n-$(3)/install
$(INSTALL_DIR) $$(1)$(PYTHON_PKG_DIR)/foris_plugins/$(2)/locale/$(3)/LC_MESSAGES
$(INSTALL_DIR) $$(1)$(PYTHON3_PKG_DIR)/foris_plugins/$(2)/locale/$(3)/LC_MESSAGES
$(CP) \
$$(PKG_BUILD_DIR)/foris_plugins/$(2)/locale/$(3)/LC_MESSAGES/*.mo \
$$(1)$(PYTHON_PKG_DIR)/foris_plugins/$(2)/locale/$(3)/LC_MESSAGES/
$$(1)$(PYTHON3_PKG_DIR)/foris_plugins/$(2)/locale/$(3)/LC_MESSAGES/
endef
define Package/$(1)-l10n-$(3)/postrm
......@@ -36,19 +36,19 @@ endef
define ForisPlugin
define Build/Compile
$(call Build/Compile/PyMod,,install --prefix=/usr --root="$(PKG_INSTALL_DIR)")
$(call Build/Compile/Py3Mod,,install --prefix=/usr --root="$(PKG_INSTALL_DIR)")
endef
define Package/$(1)/install
$(INSTALL_DIR) $$(1)$(PYTHON_PKG_DIR)
$(INSTALL_DIR) $$(1)$(PYTHON3_PKG_DIR)
$(CP) \
$(PKG_INSTALL_DIR)$(PYTHON_PKG_DIR)/* \
$$(1)$(PYTHON_PKG_DIR)/
$(PKG_INSTALL_DIR)$(PYTHON3_PKG_DIR)/* \
$$(1)$(PYTHON3_PKG_DIR)/
$(RM) -r $$(1)$(PYTHON_PKG_DIR)/foris_plugins/*/locale/
$(RM) -r $$(1)$(PYTHON_PKG_DIR)/foris_plugins/__init__.py
$(RM) -r $$(1)$(PYTHON3_PKG_DIR)/foris_plugins/*/locale/
$(RM) -r $$(1)$(PYTHON3_PKG_DIR)/foris_plugins/__init__.py
endef
......
#
# Copyright (C) 2013 CZ.NIC z.s.p.o. (http://www.nic.cz/)
#
# This is free software, licensed under the GNU General Public License v2.
# See /LICENSE for more information.
#
include $(TOPDIR)/rules.mk
PKG_NAME:=Beaker
PKG_VERSION:=1.6.4
PKG_RELEASE:=2
PKG_SOURCE:=Beaker-1.6.4.tar.gz
PKG_SOURCE_URL:=https://pypi.python.org/packages/source/B/Beaker/
PKG_MD5SUM:=c2e102870ed4c53104dec48ceadf8e9d
PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
PKG_BUILD_DEPENDS:=python
include $(INCLUDE_DIR)/package.mk
$(call include_mk, python-package.mk)
define Package/python-beaker
SUBMENU:=Python
SECTION:=lang
CATEGORY:=Languages
TITLE:=python-beaker
URL:=http://beaker.readthedocs.org
DEPENDS:=+python-light +python-logging +python-openssl
MAINTAINER:=CZ.NIC <packaging@turris.cz>
endef
define Package/python-beaker/description
A Session and Caching library with WSGI Middleware
endef
define Build/Compile
$(call Build/Compile/PyMod,., \
install --prefix="/usr" --root="$(PKG_INSTALL_DIR)" \
)
endef
define Package/python-beaker/install
$(INSTALL_DIR) $(1)$(PYTHON_PKG_DIR)/
$(CP) \
$(PKG_INSTALL_DIR)$(PYTHON_PKG_DIR)/* \
$(1)$(PYTHON_PKG_DIR)/
endef
$(eval $(call BuildPackage,python-beaker))
--- a/setup.py
+++ b/setup.py
@@ -2,7 +2,7 @@
import sys
import re
-from setuptools import setup, find_packages
+from distutils.core import setup
v = open(os.path.join(os.path.dirname(__file__), 'beaker', '__init__.py'))
VERSION = re.compile(r".*__version__ = '(.*?)'", re.S).match(v.read()).group(1)
@@ -103,7 +103,7 @@
author_email='ben@groovie.org, pjenvey@groovie.org',
url='http://beaker.rtfd.org/',
license='BSD',
- packages=find_packages(exclude=['ez_setup', 'examples', 'tests']),
+ packages=['beaker', 'beaker.crypto', 'beaker.ext'],
zip_safe=False,
install_requires=[],
extras_require={
......@@ -9,41 +9,54 @@ include $(TOPDIR)/rules.mk
PKG_NAME:=bottle-i18n
PKG_VERSION:=0.1.5
PKG_RELEASE:=1
PKG_RELEASE:=3
PKG_SOURCE:=bottle-i18n-0.1.5.tar.gz
PKG_SOURCE_URL:=https://pypi.python.org/packages/source/b/bottle-i18n/
PKG_MD5SUM:=f0942f05fec0f4a3c45765623863cb68
PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
PKG_BUILD_DEPENDS:=python
PKG_BUILD_DEPENDS:=python python-setuptools python3 python3-setuptools
include $(INCLUDE_DIR)/package.mk
$(call include_mk, python-package.mk)
$(call include_mk, python3-package.mk)
define Package/python-bottle-i18n
define Package/Common
SUBMENU:=Python
SECTION:=lang
CATEGORY:=Languages
TITLE:=python-bottle-i18n
URL:=https://github.com/iocast/bottle-i18n
DEPENDS:=+python-light +python-bottle
MAINTAINER:=CZ.NIC <packaging@turris.cz>
endef
define Package/python-bottle-i18n
$(call Package/Common)
TITLE:=python-bottle-i18n
DEPENDS:=+python-light +python-bottle
endef
define Package/python3-bottle-i18n
$(call Package/Common)
TITLE:=python3-bottle-i18n
DEPENDS:=+python3-light +python3-bottle
endef
define Package/python-bottle-i18n/description
i18n support for bottle.py
endef
define Build/Compile
$(call Build/Compile/PyMod,,install --prefix=/usr --root=$(PKG_INSTALL_DIR))
$(call Build/Compile/PyMod,,install --prefix="/usr" --root=$(PKG_INSTALL_DIR)/py2)
$(call Build/Compile/Py3Mod,,install --prefix="/usr" --root=$(PKG_INSTALL_DIR)/py3)
endef
define Package/python-bottle-i18n/install
$(INSTALL_DIR) $(1)$(PYTHON_PKG_DIR)/
$(CP) \
$(PKG_INSTALL_DIR)$(PYTHON_PKG_DIR)/* \
$(1)$(PYTHON_PKG_DIR)/
endef
PKG_INSTALL_DIR_ORIG:="$(PKG_INSTALL_DIR)"
PKG_INSTALL_DIR:="$(PKG_INSTALL_DIR_ORIG)/py2"
$(eval $(call PyPackage,python-bottle-i18n))
PKG_INSTALL_DIR:="$(PKG_INSTALL_DIR_ORIG)/py3"
$(eval $(call Py3Package,python3-bottle-i18n))
PKG_INSTALL_DIR:="$(PKG_INSTALL_DIR_ORIG)"
$(eval $(call BuildPackage,python-bottle-i18n))
$(eval $(call BuildPackage,python3-bottle-i18n))
diff --git a/bottle_i18n.py b/bottle_i18n.py
index 7b23ff4..68eb6ee 100644
--- a/bottle_i18n.py
+++ b/bottle_i18n.py
@@ -179,7 +179,7 @@ class I18NPlugin(object):
for app in self._apps:
app._ = trans.gettext
self._cache[self._lang_code] = trans
- except Exception, e:
+ except Exception as e:
for app in self._apps:
app._ = lambda s: s
self._cache[self._lang_code] = None
......@@ -8,42 +8,55 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=bottle
PKG_VERSION:=0.12.11
PKG_VERSION:=0.12.13
PKG_RELEASE:=1
PKG_SOURCE:=bottle-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=https://pypi.io/packages/source/b/bottle/
PKG_MD5SUM:=6c38912f4755ba71d852fbe320bdd61c
PKG_MD5SUM:=d2fe1b48c1d49217e78bf326b1cad437
PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
PKG_BUILD_DEPENDS:=python python-setuptools
PKG_BUILD_DEPENDS:=python python-setuptools python3 python3-setuptools
include $(INCLUDE_DIR)/package.mk
$(call include_mk, python-package.mk)
$(call include_mk, python3-package.mk)
define Package/python-bottle
define Package/Common
SUBMENU:=Python
SECTION:=lang
CATEGORY:=Languages
TITLE:=python-bottle
URL:=http://bottlepy.org
DEPENDS:=+python-light +python-codecs +python-email
MAINTAINER:=CZ.NIC <packaging@turris.cz>
endef
define Package/python-bottle
$(call Package/Common)
TITLE:=python-bottle
DEPENDS:=+python-light +python-codecs +python-email
endef
define Package/python3-bottle
$(call Package/Common)
TITLE:=python3-bottle
DEPENDS:=+python3-light +python3-codecs +python3-email
endef
define Package/python-bottle/description
Fast and simple WSGI-framework for small web-applications.
endef
define Build/Compile
$(call Build/Compile/PyMod,,install --prefix=/usr --root=$(PKG_INSTALL_DIR))
$(call Build/Compile/PyMod,,install --prefix="/usr" --root=$(PKG_INSTALL_DIR)/py2)
$(call Build/Compile/Py3Mod,,install --prefix="/usr" --root=$(PKG_INSTALL_DIR)/py3)
endef
define Package/python-bottle/install
$(INSTALL_DIR) $(1)$(PYTHON_PKG_DIR)
$(CP) \
$(PKG_INSTALL_DIR)$(PYTHON_PKG_DIR)/* \
$(1)$(PYTHON_PKG_DIR)
endef
PKG_INSTALL_DIR_ORIG:="$(PKG_INSTALL_DIR)"
PKG_INSTALL_DIR:="$(PKG_INSTALL_DIR_ORIG)/py2"
$(eval $(call PyPackage,python-bottle))
PKG_INSTALL_DIR:="$(PKG_INSTALL_DIR_ORIG)/py3"
$(eval $(call Py3Package,python3-bottle))
PKG_INSTALL_DIR:="$(PKG_INSTALL_DIR_ORIG)"
$(eval $(call BuildPackage,python-bottle))
$(eval $(call BuildPackage,python3-bottle))
......@@ -8,30 +8,41 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=flup
PKG_VERSION:=1.0.2
PKG_RELEASE:=2
PKG_VERSION:=1.0.3
PKG_RELEASE:=1
PKG_SOURCE:=flup-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=http://pypi.python.org/packages/source/f/flup/
PKG_MD5SUM:=24dad7edc5ada31dddd49456ee8d5254
PKG_SOURCE_URL:=https://pypi.python.org/packages/source/f/flup/
PKG_MD5SUM:=a64e7a6374e043480ee92534c735964e
PKG_LICENSE:=BSD
PKG_LICENSE_FILES:PKG-INFO
PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
PKG_BUILD_DEPENDS:=python
PKG_BUILD_DEPENDS:=python python3
include $(INCLUDE_DIR)/package.mk
$(call include_mk, python-package.mk)
$(call include_mk, python3-package.mk)
define Package/Common
SUBMENU:=Python
SECTION:=lang
CATEGORY:=Languages
URL:=http://pypi.python.org/pypi/flup/
MAINTAINER:=CZ.NIC <packaging@turris.cz>
endef
define Package/python-flup
SUBMENU:=Python
SECTION:=lang
CATEGORY:=Languages
TITLE:=python-flup
URL:=http://pypi.python.org/pypi/flup/
DEPENDS:=+python-light +python-logging
MAINTAINER:=Hamish Guthrie <hcg@openwrt.org>
$(call Package/Common)
TITLE:=python-flup
DEPENDS:=+python-light +python-logging
endef
define Package/python3-flup
$(call Package/Common)
TITLE:=python3-flup
DEPENDS:=+python3-light +python3-logging
endef
define Package/python-flup/description
......@@ -39,17 +50,16 @@ define Package/python-flup/description
endef
define Build/Compile
$(INSTALL_DIR) $(PKG_INSTALL_DIR)$(PYTHON_PKG_DIR)
$(CP) \
$(PKG_BUILD_DIR)/flup \
$(PKG_INSTALL_DIR)$(PYTHON_PKG_DIR)
$(call Build/Compile/PyMod,,install --prefix="/usr" --root=$(PKG_INSTALL_DIR)/py2)
$(call Build/Compile/Py3Mod,,install --prefix="/usr" --root=$(PKG_INSTALL_DIR)/py3)
endef
define Package/python-flup/install
$(INSTALL_DIR) $(1)$(PYTHON_PKG_DIR)
$(CP) \
$(PKG_INSTALL_DIR)$(PYTHON_PKG_DIR)/flup \
$(1)$(PYTHON_PKG_DIR)
endef
PKG_INSTALL_DIR_ORIG:="$(PKG_INSTALL_DIR)"
PKG_INSTALL_DIR:="$(PKG_INSTALL_DIR_ORIG)/py2"
<