From nobody Mon Jan 30 13:10:56 2023 X-Original-To: dev-commits-ports-all@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 4P57pn4Tyjz3cb2F; Mon, 30 Jan 2023 13:10:57 +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 4P57pn1WjZz3nSV; Mon, 30 Jan 2023 13:10:57 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1675084257; 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=alEjT/7ZtxjwdQxvXYZvqPmoqhM9xZwOSqWM9h+VLj4=; b=qpoABWqreL+THJ2C+pBVSeA53VRfJIf2yb5lYIIVoV8ruPScxrcsevYK1yDXOPyZ5QHlS0 AYs7ca++X8eiKJkWXU6mKRT3zMkXWsXSi2a1xQNmDAd5S728xak/700Z0Hr1WLDRbU/LKT 7gpQOXuxfADXxCnt2vdqzwykcohxb6N8VKzhDjEoQ8Tqx2i14Q46Nvis6u8UuiQsHm0SRe FSpdD+fKZ3E4O1QRK2nPtGKHf0+ajXCgiaL0PaSbIKP+kMf0nzmCNgdUaTyl6w+MchSHGp cHJj4EddDHAWG/5RmXQ7fG5hdivZSKL5v+CEnzp15ah08yhxR0dYa44kLVopDg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1675084257; 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=alEjT/7ZtxjwdQxvXYZvqPmoqhM9xZwOSqWM9h+VLj4=; b=o0sZjJgnKcKE02bqT4lFAumKdb8963y1b1j71M9zz64CQtcvw7ZuMoWriT7LutKCpthREP bx1vu+z4Xbnqy+FNtASMpyt74XPPPx4VE0Aj599p288Jbr/a4nRE5RNQCh4eI/IBu3waXf DpPv7Y3Pe3lEoWxTtT8Z75KMZ5hZdlbn4OoXm1YEjcQSAzHgV4j48Ltxu5ReWJ+ms2H8AK iyrl+6vl6J1tvZeWI1YqwVgoXWanJO+BvQajw0H5Lfd5Yk3wzwFA55HIAALVzBNqZ0h4j/ Vy7nApnsAMcVGKAYoClLxlNynGJ8fk5bFxdUy7Ug2qkO5hiqigQhNk4u1NVo/Q== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1675084257; a=rsa-sha256; cv=none; b=KBfS5YN/akAXXIBA37lvBW3VQhhL25yOa51EGoQtWo5WLXMmTd8RJfGgHbR2pYZjrOo/6F fkzSG8BGBhIi6dU27P+ww9n2S62XyB975EH62h86y19B9I3xnkLbHxdoQ49Mepr1LVCT5o gsRZtc5sY/6AuEEul6Rs0mt+2iuA6FEuJKX5/LgLEO/0lRKsm93RyfxQWp0qxdDK8+FpZG DD/Cqte6C5KNzIZyJ37KDjnE6Z1VJMKdj3+YQaSAD9aBEkCkVEk1GXLoyNh2K1A3Wk5vGX gciQ5B/SHdd/4rBS4rQVNcEPwwXWSkozCCqoj/GeX/q5/DFlK55Oz3ORGsCukQ== 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 4P57pn0Vwrz18Gn; Mon, 30 Jan 2023 13:10:57 +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 30UDAuf2068211; Mon, 30 Jan 2023 13:10:56 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 30UDAu75068208; Mon, 30 Jan 2023 13:10:56 GMT (envelope-from git) Date: Mon, 30 Jan 2023 13:10:56 GMT Message-Id: <202301301310.30UDAu75068208@gitrepo.freebsd.org> To: ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org From: Po-Chuan Hsieh Subject: git: 54f442cbe1cb - main - sysutils/py-plumbum: Update to 1.8.1 List-Id: Commit messages for all branches of the ports repository List-Archive: https://lists.freebsd.org/archives/dev-commits-ports-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-ports-all@freebsd.org X-BeenThere: dev-commits-ports-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: sunpoet X-Git-Repository: ports X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 54f442cbe1cb4041c660644c395d5fc26ec22ade Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by sunpoet: URL: https://cgit.FreeBSD.org/ports/commit/?id=54f442cbe1cb4041c660644c395d5fc26ec22ade commit 54f442cbe1cb4041c660644c395d5fc26ec22ade Author: Po-Chuan Hsieh AuthorDate: 2023-01-30 12:34:22 +0000 Commit: Po-Chuan Hsieh CommitDate: 2023-01-30 13:00:17 +0000 sysutils/py-plumbum: Update to 1.8.1 Changes: https://github.com/tomerfiliba/plumbum/releases --- sysutils/py-plumbum/Makefile | 6 ++++- sysutils/py-plumbum/distinfo | 6 ++--- sysutils/py-plumbum/files/setup.py | 54 ++++++++++++++++++++++++++++++++++++++ 3 files changed, 62 insertions(+), 4 deletions(-) diff --git a/sysutils/py-plumbum/Makefile b/sysutils/py-plumbum/Makefile index da2c5ab6ff08..7110079c9a3d 100644 --- a/sysutils/py-plumbum/Makefile +++ b/sysutils/py-plumbum/Makefile @@ -1,5 +1,5 @@ PORTNAME= plumbum -PORTVERSION= 1.8.0 +PORTVERSION= 1.8.1 CATEGORIES= sysutils python PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX} MASTER_SITES= PYPI @@ -20,4 +20,8 @@ OPTIONS_DEFINE= SSH SSH_RUN_DEPENDS= ${PYTHON_PKGNAMEPREFIX}paramiko>=0:security/py-paramiko@${PY_FLAVOR} +post-patch: + @${RM} ${WRKSRC}/pyproject.toml + @${SED} -e 's|%%PORTVERSION%%|${PORTVERSION}|' ${FILESDIR}/setup.py > ${WRKSRC}/setup.py + .include diff --git a/sysutils/py-plumbum/distinfo b/sysutils/py-plumbum/distinfo index ee65d4514290..ab331f36bbbd 100644 --- a/sysutils/py-plumbum/distinfo +++ b/sysutils/py-plumbum/distinfo @@ -1,3 +1,3 @@ -TIMESTAMP = 1665330646 -SHA256 (plumbum-1.8.0.tar.gz) = f1da1f167a2afe731a85de3f56810f424926c0a1a8fd1999ceb2ef20b618246d -SIZE (plumbum-1.8.0.tar.gz) = 325060 +TIMESTAMP = 1674590006 +SHA256 (plumbum-1.8.1.tar.gz) = 88a40fc69247d0cd585e21ca169b3820f46c484535102e16455d2202727bb37b +SIZE (plumbum-1.8.1.tar.gz) = 316432 diff --git a/sysutils/py-plumbum/files/setup.py b/sysutils/py-plumbum/files/setup.py new file mode 100644 index 000000000000..55ecd32110d7 --- /dev/null +++ b/sysutils/py-plumbum/files/setup.py @@ -0,0 +1,54 @@ +# -*- coding: utf-8 -*- +from setuptools import setup + +setup( + name='plumbum', + version='%%PORTVERSION%%', + description='Plumbum: shell combinators library', + long_description='.. image:: https://readthedocs.org/projects/plumbum/badge/\n :target: https://plumbum.readthedocs.io/en/latest/\n :alt: Documentation Status\n.. image:: https://github.com/tomerfiliba/plumbum/workflows/CI/badge.svg\n :target: https://github.com/tomerfiliba/plumbum/actions\n :alt: Build Status\n.. image:: https://coveralls.io/repos/tomerfiliba/plumbum/badge.svg?branch=master&service=github\n :target: https://coveralls.io/github/tomerfiliba/plumbum?branch=master\n :alt: Coverage Status\n.. image:: https://img.shields.io/pypi/v/plumbum.svg\n :target: https://pypi.python.org/pypi/plumbum/\n :alt: PyPI Status\n.. image:: https://img.shields.io/pypi/pyversions/plumbum.svg\n :target: https://pypi.python.org/pypi/plumbum/\n :alt: PyPI Versions\n.. image:: https://img.shields.io/conda/vn/conda-forge/plumbum.svg\n :target: https://github.com/conda-forge/plumbum-feedstock\n :alt: Conda-Forge Badge\n.. image:: https://img.shields.io/pypi/l/plumbum.s vg\n :target: https://pypi.python.org/pypi/plumbum/\n :alt: PyPI License\n.. image:: https://badges.gitter.im/plumbumpy/Lobby.svg\n :alt: Join the chat at https://gitter.im/plumbumpy/Lobby\n :target: https://gitter.im/plumbumpy/Lobby?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge\n.. image:: https://img.shields.io/badge/code%20style-black-000000.svg\n :alt: Code styled with Black\n :target: https://github.com/psf/black\n\n\nPlumbum: Shell Combinators\n==========================\n\nEver wished the compactness of shell scripts be put into a **real** programming language?\nSay hello to *Plumbum Shell Combinators*. Plumbum (Latin for *lead*, which was used to create\npipes back in the day) is a small yet feature-rich library for shell script-like programs in Python.\nThe motto of the library is **"Never write shell scripts again"**, and thus it attempts to mimic\nthe **shell syntax** ("shell combinators") where it makes sense, while keeping it all **Pythonic\nand cross-platform**.\n\nApart f! rom shell-like syntax and handy shortcuts, the library provides local and remote command\nexecution (over SSH), local and remote file-system paths, easy working-directory and environment\nmanipulation, and a programmatic Command-Line Interface (CLI) application toolkit.\nNow let\'s see some code!\n\n*This is only a teaser; the full documentation can be found at*\n`Read the Docs `_\n\nCheat Sheet\n-----------\n\nBasics\n******\n\n.. code-block:: python\n\n >>> from plumbum import local\n >>> local.cmd.ls\n LocalCommand(/bin/ls)\n >>> local.cmd.ls()\n \'build.py\\nCHANGELOG.rst\\nconda.recipe\\nCONTRIBUTING.rst\\ndocs\\nexamples\\nexperiments\\nLICENSE\\nMANIFEST.in\\nPipfile\\nplumbum\\nplumbum.egg-info\\npytest.ini\\nREADME.rst\\nsetup.cfg\\nsetup.py\\ntests\\ntranslations.py\\n\'\n >>> notepad = local["c:\\\\windows\\\\notepad.exe"]\n >>> notepad() # Notepad window pops up\n \'\' # Notepad window is closed by user, command returns\n\nIn the example above, you can use ``local["ls"]`` if you have an unusually named executable or a full path to an executable. The ``local`` object represents your local machine. As you\'ll see, Plumbum also provides remote machines that use the same API!\nYou can also use ``from plumbum.cmd import ls`` as well for accessing programs in the ``PATH``.\n\nPiping\n******\n\n.. code-block:: python\n\n >>> from plumbum.cmd import ls, grep, wc\n >>> chain = ls["-a"] | grep["-v", r"\\.py"] | wc["-l"]\n >>> print(chain)\n /bin/ls -a | /bin/grep -v \'\\.py\' | /usr/bin/wc -l\n >>> chain()\n \'27\\n\'\n\nRedirection\n***********\n\n.. code-block:: python\n\n >>> from plumbum.cmd import cat, head\n >>> ((cat < "setup.py") | head["-n", 4])()\n \'#!/usr/bin/env python3\\nimport os\\n\\ntry:\\n\'\n >>> (ls["-a"] > "file.list")()\n \'\'\n >>> (cat["file.list"] | wc["-l"])()\n \'31\\n\'\n\nWorking-directory manipulation! \n*******! ***********************\n\n.. code-block:: python\n\n >>> local.cwd\n \n >>> with local.cwd(local.cwd / "docs"):\n ... chain()\n ...\n \'22\\n\'\n\nForeground and background execution\n***********************************\n\n.. code-block:: python\n\n >>> from plumbum import FG, BG\n >>> (ls["-a"] | grep[r"\\.py"]) & FG # The output is printed to stdout directly\n build.py\n setup.py\n translations.py\n >>> (ls["-a"] | grep[r"\\.py"]) & BG # The process runs "in the background"\n \n\nCommand nesting\n***************\n\n.. code-block:: python\n\n >>> from plumbum.cmd import sudo, ifconfig\n >>> print(sudo[ifconfig["-a"]])\n /usr/bin/sudo /sbin/ifconfig -a\n >>> (sudo[ifconfig["-a"]] | grep["-i", "loop"]) & FG\n lo Link encap:Local Loopback\n UP LOOPBACK RUNNING MTU:16436 Metric:1\n\nRemote commands (o ver SSH)\n**************************\n\nSupports `openSSH `_-compatible clients,\n`PuTTY `_ (on Windows)\nand `Paramiko `_ (a pure-Python implementation of SSH2)\n\n.. code-block:: python\n\n >>> from plumbum import SshMachine\n >>> remote = SshMachine("somehost", user = "john", keyfile = "/path/to/idrsa")\n >>> r_ls = remote["ls"]\n >>> with remote.cwd("/lib"):\n ... (r_ls | grep["0.so.0"])()\n ...\n \'libusb-1.0.so.0\\nlibusb-1.0.so.0.0.0\\n\'\n\nCLI applications\n****************\n\n.. code-block:: python\n\n import logging\n from plumbum import cli\n\n class MyCompiler(cli.Application):\n verbose = cli.Flag(["-v", "--verbose"], help = "Enable verbose mode")\n include_dirs = cli.SwitchAttr("-I", list = True, help = "Specify include directories")\n\n @cli.switch("--loglevel", int)\n def set_log_level(self, level):\n """Sets the log-level ! of the lo! gger"""\n logging.root.setLevel(level)\n\n def main(self, *srcfiles):\n print("Verbose:", self.verbose)\n print("Include dirs:", self.include_dirs)\n print("Compiling:", srcfiles)\n\n if __name__ == "__main__":\n MyCompiler.run()\n\nSample output\n+++++++++++++\n\n::\n\n $ python3 simple_cli.py -v -I foo/bar -Ispam/eggs x.cpp y.cpp z.cpp\n Verbose: True\n Include dirs: [\'foo/bar\', \'spam/eggs\']\n Compiling: (\'x.cpp\', \'y.cpp\', \'z.cpp\')\n\nColors and Styles\n-----------------\n\n.. code-block:: python\n\n from plumbum import colors\n with colors.red:\n print("This library provides safe, flexible color access.")\n print(colors.bold | "(and styles in general)", "are easy!")\n print("The simple 16 colors or",\n colors.orchid & colors.underline | \'256 named colors,\',\n colors.rgb(18, 146, 64) | "or full rgb colors",\n \'can be used.\')\n print("Unsafe " + colors.bg.dark_khaki + "color access" + colors.bg.reset + " is available too.")\n', + classifiers=[ + 'Development Status :: 5 - Production/Stable', + 'License :: OSI Approved :: MIT License', + 'Operating System :: Microsoft :: Windows', + 'Operating System :: POSIX', + 'Programming Language :: Python :: 3', + 'Programming Language :: Python :: 3 :: Only', + 'Programming Language :: Python :: 3.6', + 'Programming Language :: Python :: 3.7', + 'Programming Language :: Python :: 3.8', + 'Programming Language :: Python :: 3.9', + 'Programming Language :: Python :: 3.10', + 'Programming Language :: Python :: 3.11', + 'Topic :: Software Development :: Build Tools', + 'Topic :: System :: Systems Administration', + ], + install_requires=[ + 'pywin32; platform_system == "Windows" and platform_python_implementation != "PyPy"', + ], + extras_require={ + 'dev': [ + 'paramiko', + 'psutil', + 'pytest-cov', + 'pytest-mock', + 'pytest-timeout', + 'pytest>=6.0', + ], + 'docs': [ + 'sphinx-rtd-theme>=1.0.0', + 'sphinx>=4.0.0', + ], + 'ssh': [ + 'paramiko', + ], + }, + packages=[ + 'plumbum', + 'plumbum.cli', + 'plumbum.colorlib', + 'plumbum.commands', + 'plumbum.fs', + 'plumbum.machines', + 'plumbum.path', + ], +)