django: convert to python pkg format + add python3 variant
authorAlexandru Ardelean <ardeleanalex@gmail.com>
Mon, 3 Jun 2019 12:25:39 +0000 (15:25 +0300)
committerAlexandru Ardelean <ardeleanalex@gmail.com>
Tue, 18 Jun 2019 12:12:19 +0000 (15:12 +0300)
This also updates all dependencies to use the new `python-django` package.

Signed-off-by: Alexandru Ardelean <ardeleanalex@gmail.com>
14 files changed:
lang/python/django-appconf/Makefile
lang/python/django-compressor/Makefile
lang/python/django-constance/Makefile
lang/python/django-formtools/Makefile
lang/python/django-jsonfield/Makefile
lang/python/django-picklefield/Makefile
lang/python/django-postoffice/Makefile
lang/python/django-ranged-response/Makefile
lang/python/django-restframework/Makefile
lang/python/django-simple-captcha/Makefile
lang/python/django-statici18n/Makefile
lang/python/django-webpack-loader/Makefile
lang/python/django/Makefile
net/seafile-seahub/Makefile

index 0f61551f9ce3c59faab86edf6f530bbbd6645bfc..a5de29bbe5df89fbe6ff4b45665add810bff97fc 100644 (file)
@@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=django-appconf
 PKG_VERSION:=1.0.2
-PKG_RELEASE:=2
+PKG_RELEASE:=3
 PKG_LICENSE:=BSD-3-Clause
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
@@ -26,7 +26,7 @@ define Package/django-appconf
   CATEGORY:=Languages
   TITLE:=A helper class for handling configuration defaults of packaged apps gracefully.
   URL:=http://django-appconf.readthedocs.org/
-  DEPENDS:=+python +django
+  DEPENDS:=+python +python-django
 endef
 
 define Package/django-appconf/description
index 52018abd75a368ca749ed404770956e4324da6ac..f015d5dd28117c3665057cc6a7ef182c0228fb99 100644 (file)
@@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=django-compressor
 PKG_VERSION:=2.2
-PKG_RELEASE:=3
+PKG_RELEASE:=4
 
 PKG_MAINTAINER:=Alexandru Ardelean <ardeleanalex@gmail.com>
 PKG_LICENSE:=MIT
@@ -30,7 +30,7 @@ define Package/django-compressor
   CATEGORY:=Languages
   TITLE:=Compress CSS/JS into single cached files
   URL:=http://django-compressor.readthedocs.org/
-  DEPENDS:=+python +django +django-appconf +python-rcssmin
+  DEPENDS:=+python +python-django +django-appconf +python-rcssmin
   VARIANT:=python
 endef
 
index cefb9167e40ff90beac472bd33a6265da4edc4eb..0a1e78acd0fc03fbb6d2e04e3be3a607721707f6 100644 (file)
@@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=django-constance
 PKG_VERSION:=2.3.1
-PKG_RELEASE:=2
+PKG_RELEASE:=3
 PKG_LICENSE:=BSD-3-Clause
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
@@ -26,7 +26,7 @@ define Package/django-constance
   CATEGORY:=Languages
   TITLE:=Django live settings with pluggable backends, including Redis.
   URL:=https://github.com/jazzband/django-constance
-  DEPENDS:=+python +django
+  DEPENDS:=+python +python-django
 endef
 
 define Package/django-constance/description
index e6c4db533ef2a01d9ece68ada9306fe9d2d883bd..dbc4d2305c10bc153a01810603b3c9a5f3736b30 100644 (file)
@@ -7,7 +7,7 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=django-formtools
 PKG_VERSION:=2.1
-PKG_RELEASE:=3
+PKG_RELEASE:=4
 
 PKG_MAINTAINER:=Eneas U de Queiroz <cote2004-github@yahoo.com>
 PKG_LICENSE:=BSD-3-Clause
@@ -26,7 +26,7 @@ define Package/django-formtools
   CATEGORY:=Languages
   TITLE:=High-level abstractions for Django forms
   URL:=https://django-formtools.readthedocs.io/en/latest/
-  DEPENDS:=+python +django
+  DEPENDS:=+python +python-django
   VARIANT:=python
 endef
 
index cd0117adfcf566a6859840372f2c6f1e3ad1806d..8ec80f32f1cb2ba5c59a95af02b5789a2217f7ed 100644 (file)
@@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=django-jsonfield
 PKG_VERSION:=1.0.1
-PKG_RELEASE:=2
+PKG_RELEASE:=3
 PKG_LICENSE:=BSD-3-Clause
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
@@ -26,7 +26,7 @@ define Package/django-jsonfield
   CATEGORY:=Languages
   TITLE:=JSONField for django models
   URL:=https://github.com/bradjasper/django-jsonfield
-  DEPENDS:=+python +django
+  DEPENDS:=+python +python-django
 endef
 
 define Package/django-jsonfield/description
index c9517201fabf9503256ecf49d029a2dcbac34301..fe6e2c5c7fbfc960ffdf896b7d4df3d7598a263a 100644 (file)
@@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=django-picklefield
 PKG_VERSION:=1.1.0
-PKG_RELEASE:=2
+PKG_RELEASE:=3
 PKG_LICENSE:=MIT
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
@@ -26,7 +26,7 @@ define Package/django-picklefield
   CATEGORY:=Languages
   TITLE:=Pickled object field for Django
   URL:=https://github.com/gintas/django-picklefield
-  DEPENDS:=+python +django
+  DEPENDS:=+python +python-django
 endef
 
 define Package/django-picklefield/description
index 8d94e9e977826f4a4ba1f662ed1473b75debdc09..1f1876db211ec82c1cf4e0b6e414675149e3b6d2 100644 (file)
@@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=django-postoffice
 PKG_VERSION:=3.1.0
-PKG_RELEASE:=2
+PKG_RELEASE:=3
 PKG_LICENSE:=MIT
 
 PKG_SOURCE:=django-post_office-$(PKG_VERSION).tar.gz
@@ -27,7 +27,7 @@ define Package/django-postoffice
   CATEGORY:=Languages
   TITLE:=A Django app to monitor and send mail asynchronously, complete with template support.
   URL:=https://github.com/ui/django-postoffice
-  DEPENDS:=+python +django +django-jsonfield
+  DEPENDS:=+python +python-django +django-jsonfield
 endef
 
 define Package/django-postoffice/description
index 5733d311b95d804d566b299b23dfbf4250b9178b..09d1579264d48edb4fda3be2ae47458cfcc999c2 100644 (file)
@@ -7,7 +7,7 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=django-ranged-response
 PKG_VERSION:=0.2.0
-PKG_RELEASE:=3
+PKG_RELEASE:=4
 
 PKG_MAINTAINER:=Eneas U de Queiroz <cote2004-github@yahoo.com>
 PKG_LICENSE:=MIT
@@ -25,7 +25,7 @@ define Package/django-ranged-response
   CATEGORY:=Languages
   TITLE:=Add Content-Range: to FileResponse
   URL:=https://github.com/wearespindle/django-ranged-fileresponse
-  DEPENDS:=+python +django
+  DEPENDS:=+python +python-django
   VARIANT:=python
 endef
 
index 1fd3281a01b19c97ce2a3ea12a30cb8c51f9c401..27b604a1f1a164147a1d558c4d55b4ecb40d51e4 100644 (file)
@@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=django-restframework
 PKG_VERSION:=3.9.0
-PKG_RELEASE:=2
+PKG_RELEASE:=3
 PKG_LICENSE:=BSD-3-Clause
 
 PKG_SOURCE:=djangorestframework-$(PKG_VERSION).tar.gz
@@ -27,7 +27,7 @@ define Package/django-restframework
   CATEGORY:=Languages
   TITLE:=Web APIs for Django, made easy.
   URL:=https://www.django-rest-framework.org
-  DEPENDS:=+python +django
+  DEPENDS:=+python +python-django
 endef
 
 define Package/django-restframework/description
index 449ad8749fc9580a839db1b872bd6e634cab230e..96da70712ab7b5a1edb4ba00b793e040a63c6408 100644 (file)
@@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=django-simple-captcha
 PKG_VERSION:=0.5.11
-PKG_RELEASE:=2
+PKG_RELEASE:=3
 
 PKG_MAINTAINER:=Eneas U de Queiroz <cote2004-github@yahoo.com>
 PKG_LICENSE:=MIT
@@ -28,7 +28,7 @@ define Package/django-simple-captcha
   CATEGORY:=Languages
   TITLE:=Simple Django captcha application
   URL:=https://github.com/mbi/django-simple-captcha
-  DEPENDS:=+python +python-six +django +pillow +django-ranged-response
+  DEPENDS:=+python +python-six +python-django +pillow +django-ranged-response
   VARIANT:=python
 endef
 
index 1c4c918916f6cc8bd8be85748014e2d3d7242c4d..b4a3898dcbfd9cac570c7e22cbd5a68317771543 100644 (file)
@@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=django-statici18n
 PKG_VERSION:=1.8.2
-PKG_RELEASE:=2
+PKG_RELEASE:=3
 PKG_LICENSE:=BSD-3-Clause
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
@@ -26,7 +26,7 @@ define Package/django-statici18n
   CATEGORY:=Languages
   TITLE:=A Django app that provides helper for generating JavaScript catalog to static files.
   URL:=https://django-statici18n.readthedocs.org/
-  DEPENDS:=+python +django
+  DEPENDS:=+python +python-django
 endef
 
 define Package/django-statici18n/description
index 6b7df37a4e0438719a3e745577dc0ee4caa44622..fe1d88e8b42605a87603e23bff32b217141c25b8 100644 (file)
@@ -7,7 +7,7 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=django-webpack-loader
 PKG_VERSION:=0.6.0
-PKG_RELEASE:=3
+PKG_RELEASE:=4
 
 PKG_MAINTAINER:=Eneas U de Queiroz <cote2004-github@yahoo.com>
 PKG_LICENSE:=MIT
@@ -26,7 +26,7 @@ define Package/django-webpack-loader
   CATEGORY:=Languages
   TITLE:=Transparently use webpack in django
   URL:=https://github.com/owais/django-webpack-loader
-  DEPENDS:=+python +django
+  DEPENDS:=+python +python-django
   VARIANT:=python
 endef
 
index 23a07585ab568cfe1b5766020c70495576a1eeef..f280d3fca718df6d4696b16517ec635482d02b8d 100644 (file)
@@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=django
 PKG_VERSION:=1.11.17
-PKG_RELEASE=3
+PKG_RELEASE=4
 
 PKG_SOURCE:=Django-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=https://files.pythonhosted.org/packages/source/D/Django
@@ -21,46 +21,50 @@ PKG_LICENSE:=BSD-3-Clause
 PKG_LICENSE_FILES:=LICENSE LICENSE.python
 PKG_CPE_ID:=cpe:/a:djangoproject:django
 
+PKG_BUILD_DIR:=$(BUILD_DIR)/$(BUILD_VARIANT)-django-$(PKG_VERSION)
+
 include $(INCLUDE_DIR)/package.mk
 include ../python-package.mk
+include ../python3-package.mk
+
+PKG_UNPACK:=$(HOST_TAR) -C $(PKG_BUILD_DIR) --strip-components=1 -xzf $(DL_DIR)/$(PKG_SOURCE)
 
-define Package/django
-    SUBMENU:=Python
-    SECTION:=lang
-    CATEGORY:=Languages
-    TITLE:=The web framework for perfectionists with deadlines.
-    URL:=https://www.djangoproject.com/
-    DEPENDS:=+python +python-pytz
+define Package/django/Default
+  SUBMENU:=Python
+  SECTION:=lang
+  CATEGORY:=Languages
+  TITLE:=The web framework for perfectionists with deadlines.
+  URL:=https://www.djangoproject.com/
 endef
 
-define Package/django/description
-    The web framework for perfectionists with deadlines.
+define Package/python-django
+$(call Package/django/Default)
+  DEPENDS:= \
+       +PACKAGE_python-django:python \
+       +PACKAGE_python-django:python-pytz
+  VARIANT:=python
 endef
 
-define Build/Compile
-       $(call Build/Compile/PyMod,,install --prefix=/usr --root=$(PKG_INSTALL_DIR))
+define Package/python-django/description
+    The web framework for perfectionists with deadlines.
 endef
 
-define Build/InstallDev
-       $(INSTALL_DIR) $(1)$(PYTHON_PKG_DIR)
-       $(INSTALL_DIR) $(1)/usr/bin
-       $(CP) \
-           $(PKG_INSTALL_DIR)$(PYTHON_PKG_DIR)/* \
-           $(1)$(PYTHON_PKG_DIR)
-       $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/django-admin.py \
-           $(1)/usr/bin
+define Package/python3-django
+$(call Package/django/Default)
+  DEPENDS:= \
+       +PACKAGE_python3-django:python3 \
+       +PACKAGE_python3-django:python3-pytz
+  VARIANT:=python3
 endef
 
-define Package/django/install
-       $(INSTALL_DIR) $(1)$(PYTHON_PKG_DIR)
-       $(INSTALL_DIR) $(1)/usr/bin
-       $(CP) \
-           $(PKG_INSTALL_DIR)$(PYTHON_PKG_DIR)/* \
-           $(1)$(PYTHON_PKG_DIR)
-       $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/django-admin.py \
-           $(1)/usr/bin
-       # fix python exec path
-       sed -i 's/#!.*/#!\/usr\/bin\/python/g' $(1)/usr/bin/django-admin.py
+define Package/python3-django/description
+$(call Package/python-django/description)
+.
+(Variant for Python3)
 endef
 
-$(eval $(call BuildPackage,django))
+$(eval $(call PyPackage,python-django))
+$(eval $(call BuildPackage,python-django))
+
+$(eval $(call Py3Package,python3-django))
+$(eval $(call BuildPackage,python3-django))
index c3fc3519677dfd5f04c368c2a6a186672bc36a11..ad47db2d1704cdf4af2acdb36c1dc2893ee81696 100644 (file)
@@ -23,14 +23,15 @@ include $(INCLUDE_DIR)/package.mk
 include ../../lang/python/python-package.mk
 
 SEAFILE_PYTHON_DEPENDS:= \
-       simplejson chardet dateutil mysql pytz qrcode requests requests-oauthlib
+       simplejson chardet dateutil mysql pytz qrcode requests requests-oauthlib \
+       django
 
 define Package/seafile-seahub
     SECTION:=net
     CATEGORY:=Network
     TITLE:=Seafile server - seahub component
     URL:=https://seafile.com/
-    DEPENDS:=+python +pillow +django +django-appconf \
+    DEPENDS:=+python +pillow +django-appconf \
                +django-compressor +django-constance +django-formtools +django-jsonfield \
                +django-picklefield +django-postoffice +django-restframework \
                +django-simple-captcha +django-statici18n +django-webpack-loader \