Skip to content

Commit

Permalink
sysutils/py-ansible-core: update to 2.15.0
Browse files Browse the repository at this point in the history
Switch to USES_PYTHON=pep517 build system.

Delete USES=gmake and define our own `do-test` target as upstream has
removed the Makefile from the sources.

Support python 3.9+ following upstream.

PR:		271680
Approved by:	0mp (maintainer)
  • Loading branch information
infracaninophile committed May 28, 2023
1 parent 0bde6cc commit 3de1443
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 18 deletions.
29 changes: 14 additions & 15 deletions sysutils/py-ansible-core/Makefile
@@ -1,5 +1,5 @@
PORTNAME= ansible-core
DISTVERSION= 2.14.3
DISTVERSION= 2.15.0
CATEGORIES= sysutils python
MASTER_SITES= PYPI
PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX}
Expand All @@ -11,38 +11,34 @@ WWW= https://www.ansible.com/
LICENSE= GPLv3+
LICENSE_FILE= ${WRKSRC}/COPYING

RUN_DEPENDS= ${PYTHON_PKGNAMEPREFIX}cryptography>0:security/py-cryptography@${PY_FLAVOR} \
${PYTHON_PKGNAMEPREFIX}Jinja2>3.0.0:devel/py-Jinja2@${PY_FLAVOR} \
BUILD_DEPENDS= ${PYTHON_PKGNAMEPREFIX}setuptools>=45.2.0:devel/py-setuptools@${PY_FLAVOR} \
${PYTHON_PKGNAMEPREFIX}wheel>=0:devel/py-wheel@${PY_FLAVOR}
RUN_DEPENDS= ${PYTHON_PKGNAMEPREFIX}cryptography>=0:security/py-cryptography@${PY_FLAVOR} \
${PYTHON_PKGNAMEPREFIX}Jinja2>=3.0.0:devel/py-Jinja2@${PY_FLAVOR} \
${PYTHON_PKGNAMEPREFIX}packaging>=0:devel/py-packaging@${PY_FLAVOR} \
${PYTHON_PKGNAMEPREFIX}resolvelib>=0.5.3<0.9:devel/py-resolvelib@${PY_FLAVOR} \
${PYTHON_PKGNAMEPREFIX}yaml>5.1:devel/py-yaml@${PY_FLAVOR}
${PYTHON_PKGNAMEPREFIX}resolvelib>=0.5.3<1.1.0:devel/py-resolvelib@${PY_FLAVOR} \
${PYTHON_PKGNAMEPREFIX}yaml>=5.1:devel/py-yaml@${PY_FLAVOR}
TEST_DEPENDS= ${PYTHON_PKGNAMEPREFIX}bcrypt>=0:security/py-bcrypt@${PY_FLAVOR} \
${PYTHON_PKGNAMEPREFIX}boto3>0:www/py-boto3@${PY_FLAVOR} \
${PYTHON_PKGNAMEPREFIX}mock>0:devel/py-mock@${PY_FLAVOR} \
${PYTHON_PKGNAMEPREFIX}nose>0:devel/py-nose@${PY_FLAVOR} \
${PYTHON_PKGNAMEPREFIX}passlib>0:security/py-passlib@${PY_FLAVOR} \
${PYTHON_PKGNAMEPREFIX}pycrypto>=0:security/py-pycrypto@${PY_FLAVOR} \
${PYTHON_PKGNAMEPREFIX}pycryptodome>=0:security/py-pycryptodome@${PY_FLAVOR} \
${PYTHON_PKGNAMEPREFIX}pytest-mock>0:devel/py-pytest-mock@${PY_FLAVOR} \
${PYTHON_PKGNAMEPREFIX}pytest-xdist>0:devel/py-pytest-xdist@${PY_FLAVOR} \
${PYTHON_PKGNAMEPREFIX}pytest>0:devel/py-pytest@${PY_FLAVOR} \
${PYTHON_PKGNAMEPREFIX}requests>0:www/py-requests@${PY_FLAVOR} \
git:devel/git

USES= ansible:env cpe gmake python:3.8+ shebangfix
USES= ansible:env cpe python:3.9+ shebangfix
CPE_VENDOR= redhat
CPE_PRODUCT= ansible
USE_PYTHON= autoplist concurrent distutils
USE_PYTHON= autoplist concurrent pep517

SHEBANG_REGEX= [.]/test/.*[.]py

TEST_ARGS= VERSION=${DISTVERSION} \
PYTHON=${PYTHON_CMD} \
DATE=
# Pass MAKE_ENV to TEST_ENV so that binary aliases via an updated PATH.
TEST_ENV= ${MAKE_ENV} PYTHON_VERSION=${PYTHON_VER}
TEST_TARGET= tests

CONFLICTS= py*-ansible-base py*-ansible2 py-ansible-core211
TEST_ENV= ${MAKE_ENV}

# The "python" binary alias is needed for the tests.
BINARY_ALIAS= python=${PYTHON_CMD}
Expand Down Expand Up @@ -99,6 +95,9 @@ pre-test:
# Disable some failing tests. They fail to detect that emoji are of width 2 istead of 1.
${RM} ${WRKSRC}/test/units/utils/test_display.py

do-test:
@cd ${TEST_WRKSRC} && ${SETENV} ${TEST_ENV} ./bin/ansible-test units -v --python ${PYTHON_VER}

.include <bsd.port.mk>

# Make sure that we override the unique DATADIR and ETCDIR set
Expand Down
6 changes: 3 additions & 3 deletions sysutils/py-ansible-core/distinfo
@@ -1,3 +1,3 @@
TIMESTAMP = 1678486345
SHA256 (ansible-core-2.14.3.tar.gz) = 093a4bc4a1259eaeb56ea37ec1d33cf1836c88f39281d89197f8d3480e068a58
SIZE (ansible-core-2.14.3.tar.gz) = 11516886
TIMESTAMP = 1685093572
SHA256 (ansible-core-2.15.0.tar.gz) = cf690fd4ebb40590e00c5acdc0624758ca4c58d1e4b2b02ec026a034070ebf4d
SIZE (ansible-core-2.15.0.tar.gz) = 10801327

0 comments on commit 3de1443

Please sign in to comment.