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 <jeffery.to@gmail.com>
This commit is contained in:
Jeffery To 2020-04-23 04:24:23 +08:00
parent 9cbfa032f9
commit 78ef6a9d31
3 changed files with 8 additions and 49 deletions

View 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

View 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))

View File

@ -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. #'