freebsd-ports/www/py-django-hijack/Makefile
Kai Knoblich 0cf5531fcd www/py-django32: Switch consumers over to Django 3.2
Django 2.2 became End-of-Life on 11th April 2022 and Django 3.2 is the
new LTS (= Long Term Support) release which will be supported until
April 2024.

* Switch the most ports that use www/py-django22 to www/py-django32

* Switch www/seahub over to www/py-djangorestframework

* Ports that are not yet ready for Django 3.2 (only three so far) or
  those that have already been set with an expiration date were not
  taken into account.

* Bump PORTREVISION due dependency change where necessary.

PR:		261313
Reviewed by:	bofh, dvl, koobs, ultima
Approved by:	bofh, dvl, koobs, ultima, sunpoet, Kevin Golding, Ivan Rozhuk,
		Alexander Sieg (maintainers)
		maintainer timeout (remaining maintainers)
Differential Revision:	https://reviews.freebsd.org/D34859
2022-04-28 12:02:15 +02:00

57 lines
1.9 KiB
Makefile

# Created by: Kevin Golding <ports@caomhin.org>
PORTNAME= django-hijack
PORTVERSION= 3.2.0
PORTREVISION= 1
CATEGORIES= www python
MASTER_SITES= CHEESESHOP \
https://ports.caomhin.org/:npmcache
PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX}
DISTFILES= ${PORTNAME}-${PORTVERSION}${EXTRACT_SUFX} \
${PORTNAME}-npm-cache-${DISTVERSION}${EXTRACT_SUFX}:npmcache
MAINTAINER= ports@caomhin.org
COMMENT= Allows Django superusers to login as other users
LICENSE= MIT
LICENSE_FILE= ${WRKSRC}/LICENSE
BUILD_DEPENDS= ${PYTHON_PKGNAMEPREFIX}setuptools_scm>0:devel/py-setuptools_scm@${PY_FLAVOR} \
${PYTHON_PKGNAMEPREFIX}pytest-runner>0:devel/py-pytest-runner@${PY_FLAVOR} \
npm:www/npm
RUN_DEPENDS= ${PYTHON_PKGNAMEPREFIX}django32>=2.2:www/py-django32@${PY_FLAVOR}
TEST_DEPENDS= ${PYTHON_PKGNAMEPREFIX}pytest>0:devel/py-pytest@${PY_FLAVOR} \
${PYTHON_PKGNAMEPREFIX}pytest-django>0:devel/py-pytest-django@${PY_FLAVOR}
USES= gettext-tools:build python:3.6+
USE_PYTHON= distutils autoplist
MAKE_ENV= npm_config_offline=true
TEST_ENV= DJANGO_SETTINGS_MODULES=hijack.tests.test_app.settings PYTHONPATH=${STAGEDIR}${PYTHONPREFIX_SITELIBDIR}
NO_ARCH= yes
_MY_NPMCACHE= ${WRKDIR}/.npm
# Add remaining files (e.g. *.po) that aren't recorded by setuptools
# during install.
post-install:
@${FIND} ${STAGEDIR} -type f -o -type l | \
${SORT} | ${SED} -e 's|${STAGEDIR}||' \
> ${WRKDIR}/.PLIST.pymodtmp
do-test:
@cd ${WRKSRC} && ${SETENV} ${TEST_ENV} ${PYTHON_CMD} -m pytest -v -rs -o addopts=
# Helper target to make the generation of the npm cache easier
make-npm-cache: extract
@${RM} -r ${_MY_NPMCACHE}
@cd ${WRKSRC}/ \
&& ${SETENV} HOME=${WRKDIR} ${LOCALBASE}/bin/npm ci
@cd ${_MY_NPMCACHE} \
&& ${RM} _locks anonymous-cli-metrics.json
@cd ${WRKDIR} \
&& ${TAR} -czf ${PORTNAME}-npm-cache-${DISTVERSION}${EXTRACT_SUFX} .npm \
&& ${ECHO_CMD} "Please upload the file ${WRKDIR}/${PORTNAME}-npm-cache-${DISTVERSION}${EXTRACT_SUFX}"
.include <bsd.port.mk>