git: 75bf72ea4b21 - main - textproc/py-pyscss: switch to USES=pytest and fix tests
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Tue, 26 Apr 2022 13:49:10 UTC
The branch main has been updated by amdmi3: URL: https://cgit.FreeBSD.org/ports/commit/?id=75bf72ea4b2103b7009e65305bb4979023442e11 commit 75bf72ea4b2103b7009e65305bb4979023442e11 Author: Dmitry Marakasov <amdmi3@FreeBSD.org> AuthorDate: 2022-04-26 12:30:03 +0000 Commit: Dmitry Marakasov <amdmi3@FreeBSD.org> CommitDate: 2022-04-26 13:44:32 +0000 textproc/py-pyscss: switch to USES=pytest and fix tests Reported by: reprise Approved by: portmgr blanket --- textproc/py-pyscss/Makefile | 6 +----- .../py-pyscss/files/patch-scss_tests_test__cli.py | 19 +++++++++++++++++++ 2 files changed, 20 insertions(+), 5 deletions(-) diff --git a/textproc/py-pyscss/Makefile b/textproc/py-pyscss/Makefile index 1264d297fc9b..42b55036fc90 100644 --- a/textproc/py-pyscss/Makefile +++ b/textproc/py-pyscss/Makefile @@ -13,16 +13,12 @@ LICENSE_FILE= ${WRKSRC}/LICENSE RUN_DEPENDS= ${PYTHON_PKGNAMEPREFIX}six>0:devel/py-six@${PY_FLAVOR} LIB_DEPENDS= libpcre.so:devel/pcre -TEST_DEPENDS= ${PYTHON_PKGNAMEPREFIX}pytest>0:devel/py-pytest@${PY_FLAVOR} USE_GITHUB= yes GH_ACCOUNT= Kronuz GH_PROJECT= pyScss -USES= python:3.6+ localbase:ldflags +USES= python:3.6+ localbase:ldflags pytest:4 USE_PYTHON= distutils autoplist -do-test: - @(cd ${TEST_WRKSRC} && ${SETENV} ${TEST_ENV} ${PYTHON_CMD} -m pytest) - .include <bsd.port.mk> diff --git a/textproc/py-pyscss/files/patch-scss_tests_test__cli.py b/textproc/py-pyscss/files/patch-scss_tests_test__cli.py new file mode 100644 index 000000000000..562d448de1da --- /dev/null +++ b/textproc/py-pyscss/files/patch-scss_tests_test__cli.py @@ -0,0 +1,19 @@ +https://github.com/Kronuz/pyScss/pull/425 + +--- scss/tests/test_cli.py.orig 2020-03-26 15:04:27 UTC ++++ scss/tests/test_cli.py +@@ -1,4 +1,5 @@ + """Test the command-line tool from the outside.""" ++import sys + from subprocess import PIPE, Popen + + # TODO: this needs way, way, way, way more tests +@@ -6,7 +7,7 @@ from subprocess import PIPE, Popen + + def test_stdio(): + proc = Popen( +- ['python', '-m', 'scss.tool', '-C'], ++ [sys.executable, '-m', 'scss.tool', '-C'], + stdin=PIPE, + stdout=PIPE, + # this automatically handles encoding/decoding on py3