Lines 1-29
Link Here
|
1 |
# Created by: Alfred Perlstein <alfred@freebsd.org> |
1 |
# Created by: Alfred Perlstein <alfred@freebsd.org> |
2 |
|
2 |
|
3 |
PORTNAME= websocket-client |
3 |
PORTNAME= websocket-client |
4 |
PORTVERSION= 0.58.0 |
4 |
DISTVERSION= 1.3.1 |
5 |
CATEGORIES= www python |
5 |
CATEGORIES= www python |
6 |
MASTER_SITES= CHEESESHOP |
6 |
MASTER_SITES= CHEESESHOP |
7 |
PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX} |
7 |
PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX} |
8 |
# Newer version is called "websocket_client" |
|
|
9 |
# but to keep compat with old portname we fixup |
10 |
# "-" to "_" here. |
11 |
DISTNAME= ${PORTNAME:S/-/_/g}-${DISTVERSION} |
12 |
|
8 |
|
13 |
MAINTAINER= alfred@FreeBSD.org |
9 |
MAINTAINER= alfred@FreeBSD.org |
14 |
COMMENT= Websocket client for python |
10 |
COMMENT= Websocket client for python |
15 |
|
11 |
|
16 |
LICENSE= BSD3CLAUSE |
12 |
LICENSE= APACHE20 |
17 |
LICENSE_FILE= ${WRKSRC}/LICENSE |
13 |
LICENSE_FILE= ${WRKSRC}/LICENSE |
18 |
|
14 |
|
19 |
RUN_DEPENDS= ${PYTHON_PKGNAMEPREFIX}six>=0:devel/py-six@${PY_FLAVOR} |
15 |
TEST_DEPENDS= ${PYTHON_PKGNAMEPREFIX}pytest>0:devel/py-pytest@${PY_FLAVOR} |
20 |
|
16 |
|
21 |
USES= python:3.6+ |
17 |
USES= python:3.7+ |
22 |
USE_PYTHON= distutils concurrent autoplist |
18 |
USE_PYTHON= distutils concurrent autoplist |
23 |
|
19 |
|
24 |
NO_ARCH= yes |
20 |
NO_ARCH= yes |
25 |
|
21 |
|
|
|
22 |
OPTIONS_DEFINE= OPTIONAL TEST |
23 |
OPTIONS_DEFAULT= OPTIONAL TEST |
24 |
|
25 |
OPTIONAL_DESC= SOCKS proxy support and performance boost |
26 |
TEST_DESC= Run unit tests using a local echo server |
27 |
|
28 |
OPTIONAL_RUN_DEPENDS= ${PYTHON_PKGNAMEPREFIX}python-socks>0:net/py-python-socks@${PY_FLAVOR} \ |
29 |
${PYTHON_PKGNAMEPREFIX}wsaccel>0:www/py-wsaccel@${PY_FLAVOR} |
30 |
|
31 |
TEST_TEST_DEPENDS= ${PYTHON_PKGNAMEPREFIX}websockets>0:devel/py-websockets@${PY_FLAVOR} |
32 |
|
33 |
.include <bsd.port.options.mk> |
34 |
|
35 |
.if ${PORT_OPTIONS:MTEST} |
36 |
TEST_ENV= LOCAL_WS_SERVER_PORT=8765 |
37 |
.endif |
38 |
|
26 |
do-test: |
39 |
do-test: |
27 |
@cd ${WRKSRC} && ${PYTHON_CMD} ${PYDISTUTILS_SETUP} test |
40 |
.if ${PORT_OPTIONS:MTEST} |
|
|
41 |
@(cd ${TEST_WRKSRC} && ${SETENV} ${TEST_ENV} ${PYTHON_CMD} websocket/tests/echo-server.py &) |
42 |
.endif |
43 |
@(cd ${TEST_WRKSRC} && ${SETENV} ${TEST_ENV} pytest -v -ra) |
28 |
|
44 |
|
29 |
.include <bsd.port.mk> |
45 |
.include <bsd.port.mk> |