django1: Remove common package
authorJeffery To <redacted>
Wed, 22 Apr 2020 20:24:23 +0000 (04:24 +0800)
committerJeffery To <redacted>
Wed, 22 Apr 2020 20:24:23 +0000 (04:24 +0800)
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 <redacted>
lang/python/django/Makefile
lang/python/django1/Makefile
lang/python/django1/files/django-admin [deleted file]

index b4f9c9b24e18b2ea74bf05181942685912e6280c..cf33354b1477bb319545770f1f58d11bb1705d36 100644 (file)
@@ -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
 
index 8281d5881771c72cf04c0bf6ab190d073cfc5675..a17d4c293106ba51d8fbd4e326d61bf93530ba34 100644 (file)
@@ -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 (file)
index acf99b9..0000000
+++ /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. #'
git clone https://git.99rst.org/PROJECT