From nobody Thu Jun 8 14:27:27 2023 X-Original-To: dev-commits-ports-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4QcRPX13jlz4bnm3; Thu, 8 Jun 2023 14:27:28 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4QcRPX0SyMz4Qfx; Thu, 8 Jun 2023 14:27:28 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1686234448; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=m4xA4u02ndBS05XxAN76RSSrwTKQc0v61Q2uY6vCByw=; b=WMSl9unXfs1Lpg7kbV7A3HfQHseaGFrWcnWYlovg6dknYwEgTm11pdkCRv95fEDiJFw6nM oMUHFASJw8S8bDcbU3ULr0XKetnm8W+cUaIG0PgbTESuBlBC7r9GJZ2lcawyKNJsB2HWWH z910K/32Pkgs0KHSQ5CBaUPl+dILYmqjokN2cWsBOt2YDcJS09dNk/vLrKDVqB9SBWuLDf 2za04yfy9NI2iZZpBYn5R2fR6C+dOcnPIhfufyXOu51H+MHsMUE1v3pxKsQxH5aZ8NAbKE QsmQYiuYrmyNlE3+KoQ3iqc8XN4rPhw9KzIs5MFi6iEy58OtYlDOi9AA+Y5KBQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1686234448; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=m4xA4u02ndBS05XxAN76RSSrwTKQc0v61Q2uY6vCByw=; b=TjwKIeQPDZjUWIdLdP8/IxtQuZv6c0PMjKN8BJy3YpMBZFvChMMfIRlvRqc/Mf+vDru+Ns v73BCxSmi4h3IdgNIUpqfU4Ayspy0ho6Gjehn/I9S3kpcamXzMA8nFcINCg+xKuxR8t/04 BqPvQoINBHw+W5dInqCdbVeo3LAGagvbN/L1D1L0pUfMLHq9dJqrlct7o+GCZxLtq9NaWc /80lKUyZqwiHbiS+L3IygBDKz6QUJxFzOlk6Z1RTYbYRB87qTKuu1TIPJnoXrInb5z7fX9 L973iW2fqRSdirj0QEuEVj7yCOj+OjQHEQjMMQisgJq/B1Zlezd86Ey1RmakPw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1686234448; a=rsa-sha256; cv=none; b=Ha7MyXmmZzK+Bz52ADV2b8V0K29zoFioWuxvrjHEwEPHhGOSpHZb4pxu651kzKlCY0d4ZN 2MYeI9xz53AuOCM+ULHIghn301Ad67TOEQ1LpRdKw0v1oR8Xk+iWo/WRF6gRd1JCBGuOgb q+dfc7sy/2o23ixAJNHKi+P/ROgOWhqbTAp+8IUiP8wjWJqaTPt6bshcQhCQdv+2iZ5Vc1 mn2jeQQB8P0pUbFnAfofUwZ0Y/oO7CdNs8zlRR0KK7nbhS14bUSoSSJpvK/laauXOybKvr Q4LP5Qibsr52KyeUWyLy+DXeu+ebJicwr6QZrhjOJcsujbBOISvAZklm5IjU6Q== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4QcRPW6hCHzxJf; Thu, 8 Jun 2023 14:27:27 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 358ERRKC051071; Thu, 8 Jun 2023 14:27:27 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 358ERRTb051070; Thu, 8 Jun 2023 14:27:27 GMT (envelope-from git) Date: Thu, 8 Jun 2023 14:27:27 GMT Message-Id: <202306081427.358ERRTb051070@gitrepo.freebsd.org> To: ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org From: Matthew Seaman Subject: git: 126112cfe799 - main - devel/py-cookiecutter: switch to USE_PYTHON=pytest List-Id: Commits to the main branch of the FreeBSD ports repository List-Archive: https://lists.freebsd.org/archives/dev-commits-ports-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-ports-main@freebsd.org X-BeenThere: dev-commits-ports-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: matthew X-Git-Repository: ports X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 126112cfe799f8a1597b5a2e2cdfbdc5af9895fb Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by matthew: URL: https://cgit.FreeBSD.org/ports/commit/?id=126112cfe799f8a1597b5a2e2cdfbdc5af9895fb commit 126112cfe799f8a1597b5a2e2cdfbdc5af9895fb Author: Matthew Seaman AuthorDate: 2023-06-08 14:21:41 +0000 Commit: Matthew Seaman CommitDate: 2023-06-08 14:27:24 +0000 devel/py-cookiecutter: switch to USE_PYTHON=pytest Use the standard pytest setup. Disable one windows specific test While here, allow py311 flavor. Upstream has not specified 3.11 as supported, but there hasn't been any significant development on this module since before python-3.11 was released, and the code runs just fine. This means that a py311 flavour of molecule should now be available. No portrevision bump, as this just adds a new flavour; existing flavours are unchanged. --- devel/py-cookiecutter/Makefile | 13 ++++++------- devel/py-cookiecutter/files/patch-tests_test__hooks.py | 15 ++++++++++++--- 2 files changed, 18 insertions(+), 10 deletions(-) diff --git a/devel/py-cookiecutter/Makefile b/devel/py-cookiecutter/Makefile index 8b62d3a08a1a..d34217ea6c4a 100644 --- a/devel/py-cookiecutter/Makefile +++ b/devel/py-cookiecutter/Makefile @@ -25,8 +25,8 @@ TEST_DEPENDS= ${PYTHON_PKGNAMEPREFIX}freezegun>0:devel/py-freezegun@${PY_FLAVOR} ${PYTHON_PKGNAMEPREFIX}pytest>0:devel/py-pytest@${PY_FLAVOR} \ git:devel/git -USES= cpe python:3.7-3.10 -USE_PYTHON= autoplist concurrent distutils +USES= cpe python:3.7+ +USE_PYTHON= autoplist concurrent distutils pytest CPE_VENDOR= cookiecutter_project @@ -36,12 +36,11 @@ NO_ARCH= yes # ${WRKDIR} unless told not to. TEST_ENV= HOME=${WRKDIR} \ - LANG=en_US.UTF-8 \ - LC_ALL=en_US.UTF-8 \ + LANG=C.UTF-8 \ + LC_ALL=C.UTF-8 \ TMPDIR=${WRKDIR} -do-test: - @cd ${WRKSRC} && \ - ${SETENV} ${TEST_ENV} ${LOCALBASE}/bin/pytest-${PYTHON_VER} --cov=cookiecutter tests +# Windows specific test +PYTEST_IGNORED_TESTS= test_run_shell_hooks_win .include diff --git a/devel/py-cookiecutter/files/patch-tests_test__hooks.py b/devel/py-cookiecutter/files/patch-tests_test__hooks.py index bf62c10a3f07..ff6757438157 100644 --- a/devel/py-cookiecutter/files/patch-tests_test__hooks.py +++ b/devel/py-cookiecutter/files/patch-tests_test__hooks.py @@ -1,6 +1,6 @@ ---- tests/test_hooks.py.orig 2020-12-28 09:57:55 UTC +--- tests/test_hooks.py.orig 2022-06-01 17:00:44 UTC +++ tests/test_hooks.py -@@ -42,7 +42,7 @@ def make_test_repo(name): +@@ -41,7 +41,7 @@ def make_test_repo(name, multiple_hooks=False): post = 'post_gen_project.sh' filename = os.path.join(hook_dir, post) with open(filename, 'w') as f: @@ -9,7 +9,16 @@ f.write("\n") f.write("echo 'post generation hook';\n") f.write("touch 'shell_post.txt'\n") -@@ -143,7 +143,7 @@ class TestExternalHooks(object): +@@ -61,7 +61,7 @@ def make_test_repo(name, multiple_hooks=False): + pre = 'pre_gen_project.sh' + filename = os.path.join(hook_dir, pre) + with open(filename, 'w') as f: +- f.write("#!/bin/bash\n") ++ f.write("#!/bin/sh\n") + f.write("\n") + f.write("echo 'post generation hook';\n") + f.write("touch 'shell_pre.txt'\n") +@@ -189,7 +189,7 @@ class TestExternalHooks: f.write("echo. >{{cookiecutter.file}}\n") else: with open(hook_path, 'w') as fh: