From 78ef6a9d31e07fbf58bf8eea77600033318328b3 Mon Sep 17 00:00:00 2001 From: Jeffery To Date: Thu, 23 Apr 2020 04:24:23 +0800 Subject: [PATCH] django1: Remove common package python-django1-common was added to allow both Python 2 and 3 versions of Django 1.11 to be installed at the same time. With the removal of Python 2, this package is no longer necessary. This removes this common package and updates the CONFLICTS value for the django package. Signed-off-by: Jeffery To --- lang/python/django/Makefile | 4 ++-- lang/python/django1/Makefile | 30 ++++++-------------------- lang/python/django1/files/django-admin | 23 -------------------- 3 files changed, 8 insertions(+), 49 deletions(-) delete mode 100644 lang/python/django1/files/django-admin diff --git a/lang/python/django/Makefile b/lang/python/django/Makefile index b4f9c9b24..cf33354b1 100644 --- a/lang/python/django/Makefile +++ b/lang/python/django/Makefile @@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=django PKG_VERSION:=3.0.5 -PKG_RELEASE:=2 +PKG_RELEASE:=3 PYPI_NAME:=Django PKG_HASH:=d4666c2edefa38c5ede0ec1655424c56dc47ceb04b6d8d62a7eac09db89545c1 @@ -30,7 +30,7 @@ define Package/python3-django TITLE:=The web framework for perfectionists with deadlines. URL:=https://www.djangoproject.com/ DEPENDS:= +python3 +python3-pytz +python3-sqlparse +python3-asgiref - CONFLICTS:=python3-django1 python-django1-common + CONFLICTS:=python3-django1 PROVIDES:=django endef diff --git a/lang/python/django1/Makefile b/lang/python/django1/Makefile index 8281d5881..a17d4c293 100644 --- a/lang/python/django1/Makefile +++ b/lang/python/django1/Makefile @@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=django1 PKG_VERSION:=1.11.29 -PKG_RELEASE:=3 +PKG_RELEASE:=4 PYPI_NAME:=Django PKG_HASH:=4200aefb6678019a0acf0005cd14cfce3a5e6b9b90d06145fcdd2e474ad4329c @@ -23,20 +23,15 @@ include ../pypi.mk include $(INCLUDE_DIR)/package.mk include ../python3-package.mk -define Package/django1/Default +define Package/python3-django1 SUBMENU:=Python SECTION:=lang CATEGORY:=Languages TITLE:=The web framework for perfectionists with deadlines. URL:=https://www.djangoproject.com/ -endef - -define Package/python3-django1 -$(call Package/django1/Default) DEPENDS:= \ +python3 \ - +python3-pytz \ - +python-django1-common + +python3-pytz PROVIDES:=django endef @@ -44,25 +39,12 @@ define Package/python3-django1/description The web framework for perfectionists with deadlines (LTS 1.11 series). endef -define Package/python-django1-common -$(call Package/django1/Default) -endef - -define Package/python-django1-common/description - The web framework for perfectionists with deadlines (LTS 1.11 series). -. -This package contains files common to both Python 2.7 and Python 3. -endef - -Py3Package/python3-django1/install:=: - -define Package/python-django1-common/install +define Py3Package/python3-django1/install $(INSTALL_DIR) $(1)/usr/bin - $(INSTALL_BIN) ./files/django-admin $(1)/usr/bin + $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/django-admin.py \ + $(1)/usr/bin/django-admin endef $(eval $(call Py3Package,python3-django1)) $(eval $(call BuildPackage,python3-django1)) $(eval $(call BuildPackage,python3-django1-src)) - -$(eval $(call BuildPackage,python-django1-common)) diff --git a/lang/python/django1/files/django-admin b/lang/python/django1/files/django-admin deleted file mode 100644 index acf99b945..000000000 --- a/lang/python/django1/files/django-admin +++ /dev/null @@ -1,23 +0,0 @@ -#!/bin/sh -shell_code=''' ' -# shell code -if command -v python3.8 > /dev/null && test -e /usr/lib/python3.8/site-packages/django/bin/django-admin.pyc -then - exec python3.8 "$0" "$@" -elif command -v python2.7 > /dev/null && test -e /usr/lib/python2.7/site-packages/django/bin/django-admin.pyc -then - exec python2.7 "$0" "$@" -else - echo "Cannot find installed version of python-django1 or python3-django1." >&2 - exit 1 -fi - -python_code=''' -# python code -# ONLY use DOUBLE quotes <"> after this line -from django.core import management - -if __name__ == "__main__": - management.execute_from_command_line() - -# End of Python code. Do not modify this line. #'