From owner-svn-ports-head@freebsd.org Wed Feb 24 10:39:06 2021 Return-Path: Delivered-To: svn-ports-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 0F0D6558306; Wed, 24 Feb 2021 10:39:06 +0000 (UTC) (envelope-from 0mp@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 4Dlspx7139z4npF; Wed, 24 Feb 2021 10:39:05 +0000 (UTC) (envelope-from 0mp@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id DF4542AC36; Wed, 24 Feb 2021 10:39:05 +0000 (UTC) (envelope-from 0mp@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 11OAd5eR006877; Wed, 24 Feb 2021 10:39:05 GMT (envelope-from 0mp@FreeBSD.org) Received: (from 0mp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 11OAd42W006871; Wed, 24 Feb 2021 10:39:04 GMT (envelope-from 0mp@FreeBSD.org) Message-Id: <202102241039.11OAd42W006871@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: 0mp set sender to 0mp@FreeBSD.org using -f From: Mateusz Piotrowski <0mp@FreeBSD.org> Date: Wed, 24 Feb 2021 10:39:04 +0000 (UTC) To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r566466 - in head/devel: . py-protobuf-compiler py-protobuf-compiler/files X-SVN-Group: ports-head X-SVN-Commit-Author: 0mp X-SVN-Commit-Paths: in head/devel: . py-protobuf-compiler py-protobuf-compiler/files X-SVN-Commit-Revision: 566466 X-SVN-Commit-Repository: ports MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-ports-head@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: SVN commit messages for the ports tree for head List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 24 Feb 2021 10:39:06 -0000 Author: 0mp Date: Wed Feb 24 10:39:04 2021 New Revision: 566466 URL: https://svnweb.freebsd.org/changeset/ports/566466 Log: Add devel/py-protobuf-compiler Python protobuf compiler can be used to compile collections protobuf files and create a single package distribution suitable for installing with pip. WWW: https://github.com/netsaj/python-protobuf-compiler Added: head/devel/py-protobuf-compiler/ head/devel/py-protobuf-compiler/Makefile (contents, props changed) head/devel/py-protobuf-compiler/distinfo (contents, props changed) head/devel/py-protobuf-compiler/files/ head/devel/py-protobuf-compiler/files/patch-protobuf__compiler_main.py (contents, props changed) head/devel/py-protobuf-compiler/files/patch-setup.py (contents, props changed) head/devel/py-protobuf-compiler/pkg-descr (contents, props changed) Modified: head/devel/Makefile Modified: head/devel/Makefile ============================================================================== --- head/devel/Makefile Wed Feb 24 10:37:11 2021 (r566465) +++ head/devel/Makefile Wed Feb 24 10:39:04 2021 (r566466) @@ -4837,6 +4837,7 @@ SUBDIR += py-proselint SUBDIR += py-proto-plus SUBDIR += py-protobuf + SUBDIR += py-protobuf-compiler SUBDIR += py-proxmoxer SUBDIR += py-ptable SUBDIR += py-ptpython Added: head/devel/py-protobuf-compiler/Makefile ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/devel/py-protobuf-compiler/Makefile Wed Feb 24 10:39:04 2021 (r566466) @@ -0,0 +1,49 @@ +# $FreeBSD$ + +PORTNAME= protobuf-compiler +DISTVERSION= 1.0.20 +CATEGORIES= devel python +MASTER_SITES= CHEESESHOP +PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX} +DISTNAME= ${PORTNAME:S/-/_/}-${DISTVERSION} +DISTFILES= ${DISTNAME}${EXTRACT_SUFX} + +MAINTAINER= 0mp@FreeBSD.org +COMMENT= Compile all protobuf files and create package distributions + +LICENSE= MIT +LICENSE_FILE= ${WRKSRC_tests}/LICENSE + +BUILD_DEPENDS= ${_MY_DEPENDS} +RUN_DEPENDS= ${_MY_DEPENDS} + +USES= python:3.6+ shebangfix +USE_GITHUB= nodefault +GH_TUPLE= netsaj:python-${PORTNAME}:7cb32ab8188cbfecb91034cbf7803394ed1c25b6:tests +USE_PYTHON= autoplist concurrent distutils +SHEBANG_GLOB= *.py + +TEST_ENV= PYTHONPATH="${STAGEDIR}${PYTHONPREFIX_SITELIBDIR}" +NO_ARCH= yes +TEST_WRKSRC= ${WRKSRC_tests} + +_MY_DEPENDS= ${PYTHON_PKGNAMEPREFIX}bleach>=2.1.0:www/py-bleach@${PY_FLAVOR} \ + ${PYTHON_PKGNAMEPREFIX}colorama>=0.3.3:devel/py-colorama@${PY_FLAVOR} \ + ${PYTHON_PKGNAMEPREFIX}grpcio-tools>=1.18.0:devel/py-grpcio-tools@${PY_FLAVOR} \ + ${PYTHON_PKGNAMEPREFIX}grpcio>=1.18.0:devel/py-grpcio@${PY_FLAVOR} \ + ${PYTHON_PKGNAMEPREFIX}termcolor>=1.1.0:devel/py-termcolor@${PY_FLAVOR} \ + ${PYTHON_PKGNAMEPREFIX}tqdm>=4.31.1:misc/py-tqdm@${PY_FLAVOR} + +post-patch: + ${REINPLACE_CMD} 's|%%PYTHON_CMD%%|${PYTHON_CMD}|g' \ + ${WRKSRC}/protobuf_compiler/main.py + +do-test: +# Loosely based on the upstream test_protopy.py. + ${RM} -r ${TEST_WRKSRC}/run_test + cd ${TEST_WRKSRC} && ${SETENV} ${TEST_ENV} \ + ${PYTHON_CMD} ${STAGEDIR}${PREFIX}/bin/protopy \ + -o ./run_test -d ./test -p mytesting -v 1.0.1 + ${TEST} -e ${TEST_WRKSRC}/run_test/mytesting-1.0.1.tar.gz + +.include Added: head/devel/py-protobuf-compiler/distinfo ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/devel/py-protobuf-compiler/distinfo Wed Feb 24 10:39:04 2021 (r566466) @@ -0,0 +1,5 @@ +TIMESTAMP = 1614156744 +SHA256 (protobuf_compiler-1.0.20.tar.gz) = ac8daa7187fb9cac7752008368b79d8d8e44dd1b154423fa7afd227a31d062f6 +SIZE (protobuf_compiler-1.0.20.tar.gz) = 5296 +SHA256 (netsaj-python-protobuf-compiler-7cb32ab8188cbfecb91034cbf7803394ed1c25b6_GH0.tar.gz) = 72b8f59ef6ee9999701b09b2611fc3d79d7c500821fbb2edc4e8a1d4db864771 +SIZE (netsaj-python-protobuf-compiler-7cb32ab8188cbfecb91034cbf7803394ed1c25b6_GH0.tar.gz) = 7499 Added: head/devel/py-protobuf-compiler/files/patch-protobuf__compiler_main.py ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/devel/py-protobuf-compiler/files/patch-protobuf__compiler_main.py Wed Feb 24 10:39:04 2021 (r566466) @@ -0,0 +1,20 @@ +--- protobuf_compiler/main.py.orig 2021-02-24 09:06:33 UTC ++++ protobuf_compiler/main.py +@@ -100,7 +100,7 @@ def main(): + for f in files: + file_name = f.split(os.path.sep)[-1] + folder = f.replace(file_name,"").replace(input_dir + os.path.sep, "") +- command = "python3 -m grpc_tools.protoc -I. \ ++ command = "%%PYTHON_CMD%% -m grpc_tools.protoc -I. \ + --proto_path=" + input_dir + " \ + --python_out=" + os.path.join(output_dir, package_name) + " \ + --grpc_python_out=" + os.path.join(output_dir, package_name) + " \ +@@ -130,7 +130,7 @@ setup( + description='' + ) + """) +- command = "cd " + os.path.join(output_dir, package_name) + " && python3 setup.py sdist" ++ command = "cd " + os.path.join(output_dir, package_name) + " && %%PYTHON_CMD%% setup.py sdist" + out = os.system(command) + # print(out) + if args.repository != '': Added: head/devel/py-protobuf-compiler/files/patch-setup.py ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/devel/py-protobuf-compiler/files/patch-setup.py Wed Feb 24 10:39:04 2021 (r566466) @@ -0,0 +1,21 @@ +--- setup.py.orig 2021-02-24 08:56:12 UTC ++++ setup.py +@@ -24,12 +24,12 @@ setup( + "Programming Language :: Python :: 3.6", + ], + install_requires=[ +- 'grpcio==1.18.0', +- 'grpcio-tools==1.18.0', +- 'colorama==0.3.3', +- 'termcolor==1.1.0', +- 'tqdm==4.31.1', +- 'bleach==2.1.0' ++ 'grpcio>=1.18.0', ++ 'grpcio-tools>=1.18.0', ++ 'colorama>=0.3.3', ++ 'termcolor>=1.1.0', ++ 'tqdm>=4.31.1', ++ 'bleach>=2.1.0' + ], + entry_points={ + 'console_scripts': [ Added: head/devel/py-protobuf-compiler/pkg-descr ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/devel/py-protobuf-compiler/pkg-descr Wed Feb 24 10:39:04 2021 (r566466) @@ -0,0 +1,4 @@ +Python protobuf compiler can be used to compile collections protobuf files and +create a single package distribution suitable for installing with pip. + +WWW: https://github.com/netsaj/python-protobuf-compiler