From nobody Sat Jan 29 07:28:27 2022 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 0525A197B54D; Sat, 29 Jan 2022 07:28: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 4Jm5XW6HLRz3mBf; Sat, 29 Jan 2022 07:28:27 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1643441307; 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=RNMVsy3wdufewJeyOrTbTMYF2WqU4jNPDcZFZrzl6nI=; b=G178P0rxEncmC6Gyi2BdIoq2Zfa0C3Gv+FS5lZpuZ4pSomNcf8e0EKM7ZHzcxi/3OiUHn+ Tv8HouTyrgqTuN1H9kVnB5hj46xK730NpFlglptTiqDiojtf/aFinfHMJ015imSwSzju7o p4L4oh8RuE6sHwL72bXyfkdl3cf/O7JRkQ+CuKuse6n5dZcaJQfpU/kX77wZGI0WVEgaIn efl/oTTJje+EWrEi83EMmWdhlDN4kVdeRTXdQgt5zmGs5YmCA+IdxIrSAYu1hYl1+cup/l QW/FrG4HFW1rFdjLTS5XCzwXhQhBQhgCSvPrCmKuogj6nDi5Ru2xxjsMYhUibA== 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 B800F11E87; Sat, 29 Jan 2022 07:28: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 20T7SRvx037747; Sat, 29 Jan 2022 07:28:27 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 20T7SRVd037746; Sat, 29 Jan 2022 07:28:27 GMT (envelope-from git) Date: Sat, 29 Jan 2022 07:28:27 GMT Message-Id: <202201290728.20T7SRVd037746@gitrepo.freebsd.org> To: ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org From: Hiroki Tagato Subject: git: c70252fa679f - main - www/py-freenit: update to 0.2.17 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: tagattie X-Git-Repository: ports X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: c70252fa679f02d9bf04179f1edd0407f25c6d71 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1643441307; 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=RNMVsy3wdufewJeyOrTbTMYF2WqU4jNPDcZFZrzl6nI=; b=wKu+L0phiDH1ULtWFYA+4ttiTLmfnP239F/dV+vyaigTVBY8HFpBZwnws9p37nJ/8V+qpi ACB/vLAVGfsp6hfGnBtwh10HmTc7aZKr7q2EaZ9U6LGBinPLAH3R+IZIwEzX8dbAPkIqoI Tna/ac3mRqV9drfShjVAVhTLjdrKvbUdYhw2QYpJK4mWrfeoT1YOnfRD0ug9NDnxnbmzcx JjcGwBGB9Zk29XHC7DUz+iart4NukuL5BQCfqX3fQDszFcJhjH2qs3uo5xJ+Dc8YcCU/FQ 6hF9Dpy+ygf/K7Pbnso3blBieLe1eM94UdsyI9Cq/8ZsOvDWOuSxhrKKkgBLYg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1643441307; a=rsa-sha256; cv=none; b=FMxIS56yfF90z6cRf4IFEohVjhjYxZ+ib8Z/dv0YHDqgexeYIpJHZhm2T8c0rnlEosDOdU 8mp5QHOcU2oJUHneP5+B+1jsJbMQ+A02on/q98Ij1c7+5AcKwS53sNUUpJNkyoKqXkPr1M BIG7qcje9r+t7wwtzNXNHt5Fm7YSAzoC9EUY80lUa30tqkVUud9x2OPvdKeGR7Dzy1P757 QXNw1ObrNK0XriXHjIK/r9a8H4KsBtCy0ySJsoo8/pvNkxE7RmwTnjGKR/KTQMBIRys+tU /rs4ycWlDIiiwTGiHMojVhjvKqLy1wuLCoNjA8+Bx/3GJu0u4ZWkNUi4KtVdiA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by tagattie: URL: https://cgit.FreeBSD.org/ports/commit/?id=c70252fa679f02d9bf04179f1edd0407f25c6d71 commit c70252fa679f02d9bf04179f1edd0407f25c6d71 Author: Goran Mekić AuthorDate: 2022-01-29 07:26:30 +0000 Commit: Hiroki Tagato CommitDate: 2022-01-29 07:26:30 +0000 www/py-freenit: update to 0.2.17 Changelog: https://github.com/freenit-framework/backend/releases/tag/0.2.17 PR: 257868 Reported by: Goran Mekić (maintainer) Reviewed by: eduardo --- www/py-freenit/Makefile | 46 +++++++++++------------------------------ www/py-freenit/distinfo | 6 +++--- www/py-freenit/files/freenit.in | 36 ++++++++++++++++++++++++++++++++ 3 files changed, 51 insertions(+), 37 deletions(-) diff --git a/www/py-freenit/Makefile b/www/py-freenit/Makefile index d22b37fbc330..a7e3bbe34158 100644 --- a/www/py-freenit/Makefile +++ b/www/py-freenit/Makefile @@ -1,5 +1,5 @@ PORTNAME= freenit -PORTVERSION= 0.1.25 +PORTVERSION= 0.2.17 CATEGORIES= www devel python MASTER_SITES= CHEESESHOP PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX} @@ -10,46 +10,24 @@ COMMENT= REST API framework based on Flask-Smorest LICENSE= BSD2CLAUSE LICENSE_FILE= ${WRKSRC}/LICENSE -RUN_DEPENDS= ${PYTHON_PKGNAMEPREFIX}bcrypt>=0:security/py-bcrypt@${PY_FLAVOR} \ - ${PYTHON_PKGNAMEPREFIX}Flask-Collect>=1.3.2:www/py-flask-collect@${PY_FLAVOR} \ - ${PYTHON_PKGNAMEPREFIX}Flask-Cors>=2.1.2:www/py-flask-cors@${PY_FLAVOR} \ - ${PYTHON_PKGNAMEPREFIX}flask-jwt-extended>=3.24.1:www/py-flask-jwt-extended@${PY_FLAVOR} \ - ${PYTHON_PKGNAMEPREFIX}flask-security>=3.0.0:www/py-flask-security@${PY_FLAVOR} \ - ${PYTHON_PKGNAMEPREFIX}flask-smorest>=0.18.2:www/py-flask-smorest@${PY_FLAVOR} \ - ${PYTHON_PKGNAMEPREFIX}email-validator>=0:mail/py-email-validator@${PY_FLAVOR} -TEST_DEPENDS= ${PYTHON_PKGNAMEPREFIX}pytest>=0:devel/py-pytest@${PY_FLAVOR} \ - ${PYTHON_PKGNAMEPREFIX}factory-boy>=0:devel/py-factory-boy@${PY_FLAVOR} \ +RUN_DEPENDS= ${PYTHON_PKGNAMEPREFIX}alembic>=0:databases/py-alembic@${PY_FLAVOR} \ + ${PYTHON_PKGNAMEPREFIX}fastapi-users-db-ormar>=0:databases/py-fastapi-users-db-ormar@${PY_FLAVOR} \ + ${PYTHON_PKGNAMEPREFIX}uvicorn>=0:www/py-uvicorn@${PY_FLAVOR} +TEST_DEPENDS= ${PYTHON_PKGNAMEPREFIX}pytest-asyncio>=0:devel/py-pytest-asyncio@${PY_FLAVOR} \ ${PYTHON_PKGNAMEPREFIX}pytest-factoryboy>=0:devel/py-pytest-factoryboy@${PY_FLAVOR} \ - ${PYTHON_PKGNAMEPREFIX}pytest-flask>=0:devel/py-pytest-flask@${PY_FLAVOR} + ${PYTHON_PKGNAMEPREFIX}pytest>=0:devel/py-pytest@${PY_FLAVOR} -USES= python:3.6+ +USES= python:3.8+ USE_PYTHON= autoplist concurrent distutils +USE_RC_SUBR= freenit +SUB_LIST= PYTHON_VER=${PYTHON_VER} TEST_ENV= PYTHONPATH=${WRKSRC}/src NO_ARCH= yes -OPTIONS_DEFINE= SQLITE MYSQL PGSQL MONGO -OPTIONS_DEFAULT=SQLITE - -SQLITE_DESC= Support for SQLite database using PeeWee -MYSQL_DESC= Support for MySQL database using PeeWee -PGSQL_DESC= Support for PostgreSQL database using PeeWee -MONGO_DESC= Support for MongoDB using Flask-MongoEngine - -MIGRATE_DEP= ${PYTHON_PKGNAMEPREFIX}peewee_migrate>=1.1.6:databases/py-peewee_migrate@${PY_FLAVOR} -SQLITE_USES= sqlite -SQLITE_RUN_DEPENDS= ${PYTHON_PKGNAMEPREFIX}peewee>0:databases/py-peewee@${PY_FLAVOR} \ - ${MIGRATE_DEP} -MYSQL_USES= mysql -MYSQL_RUN_DEPENDS= ${PYTHON_PKGNAMEPREFIX}peewee>0:databases/py-peewee@${PY_FLAVOR} \ - ${MIGRATE_DEP} -PGSQL_USES= pgsql -PGSQL_RUN_DEPENDS= ${PYTHON_PKGNAMEPREFIX}peewee>0:databases/py-peewee@${PY_FLAVOR} \ - ${MIGRATE_DEP} -MONGO_RUN_DEPENDS= ${PYTHON_PKGNAMEPREFIX}flask-mongoengine>0:www/py-flask-mongoengine@${PY_FLAVOR} - -do-test: - cd ${WRKSRC} && ${SETENV} ${TEST_ENV} ${PYTHON_CMD} -m pytest --ignore=freenit/project/ -v -rs -o addopts= +# Requires newer pytest +# do-test: +# cd ${WRKSRC} && ${SETENV} ${TEST_ENV} FREENIT_ENV=test ${PYTHON_CMD} -m pytest --ignore=freenit/project/ -v -rs -o addopts= .include diff --git a/www/py-freenit/distinfo b/www/py-freenit/distinfo index 03b328ea541c..4fd1f48a6706 100644 --- a/www/py-freenit/distinfo +++ b/www/py-freenit/distinfo @@ -1,3 +1,3 @@ -TIMESTAMP = 1610644687 -SHA256 (freenit-0.1.25.tar.gz) = 962417c33811b2c7bced9cdbb3ff0df6d7c379646aeaf52782dfbb1d4a3a8f05 -SIZE (freenit-0.1.25.tar.gz) = 2640348 +TIMESTAMP = 1643045706 +SHA256 (freenit-0.2.17.tar.gz) = a9f1e269dc348ab48cb46fc55c1353c67281e7c4a1aab8281cab2bd0d426dd21 +SIZE (freenit-0.2.17.tar.gz) = 18229 diff --git a/www/py-freenit/files/freenit.in b/www/py-freenit/files/freenit.in new file mode 100644 index 000000000000..c3e59410873c --- /dev/null +++ b/www/py-freenit/files/freenit.in @@ -0,0 +1,36 @@ +#!/bin/sh + +# PROVIDE: freenit +# KEYWORD: shutdown + +. /etc/rc.subr + +name=freenit +desc="Freenit backend" +rcvar=${name}_enable +load_rc_config $name + +: ${freenit_enable:="NO"} +: ${freenit_project_root:="/usr/local"} +: ${freenit_workers:="1"} +: ${freenit_host:="0.0.0.0"} +: ${freenit_port:="8000"} +: ${freenit_module:="main:app"} + +pidfile="/var/run/${name}.pid" +start_cmd="${name}_start" +procname="%%PREFIX%%/bin/python%%PYTHON_VER%%" + +freenit_start() { + echo -n "Starting ${name} ... " + cd "${freenit_project_root}" + /usr/sbin/daemon -p "${pidfile}" -S "%%PREFIX%%/bin/uvicorn" --host "${freenit_host}" --port "${freenit_port}" --workers "${freenit_workers}" "${freenit_module}" + status=$? + if [ "${status}" = "0" ]; then + echo "done" + else + echo "failed!" + fi +} + +run_rc_command $*