From nobody Tue Mar 21 19:30:05 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 4Ph1sC6Y2cz40j1W; Tue, 21 Mar 2023 19:30:07 +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 4Ph1sC3DBGz4Tn2; Tue, 21 Mar 2023 19:30:05 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1679427007; 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=uuMuy5McGAgMzhyxr6ax0UOp+e9pAjDN0C3bTlpBqw4=; b=CNrrhicFn5uHweCUsdoDib3t2bb4H8zFHutLLF1TgBxH0SbuCWP2ReVyuOuq4YtwVG4CkS f3wQkMup/JZf5wWXA5otIRTUNfUU5Z+3uNpRrbitMssNK4hSs6zObkYrY2e/WC/hABzDPo UOOLiJBBuB0FcO3lkoY6t/UZrWJbdvT0XPUtHNYozNQycStakqT8LRhkdzAa77S21b/IZn mBPWuR7VLuGiec8AHcjza+ump0RsQPwTdXAMqDdlXaBxjLjGGsMSxB+PISACyDcV90nBbz Toc/+MrlAIQQz2p6yZqn0sivnW2RDKflpXfIDe9JanxvBR2Pd4vkgwbkql6gGQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1679427007; 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=uuMuy5McGAgMzhyxr6ax0UOp+e9pAjDN0C3bTlpBqw4=; b=CtKDsuQcmFeegW623GyoTSqznR2a6uHQk6I+jRIcmw3kLhln+zTGCNPQSY7FOhNk4p8thh UPZc1TwkDhJCRIgXTSWUYtXFv978P1aaucpJfAC4W+6vNfNKL5P7i1u9uPz0UP1rcrPfF0 Awd90d3A7we3W5BfGtcOGWetysoEyhSQgjcNkrhtgmQfm1caiG/g0CdDQm3lNBEoQn45QX qkprNig20yzUeK4LI/DnQ8UIezljTWPMOvy+Pu8R3kH3wjXTyhT1v6MH8+79bacN5exAx4 /eyrdXZ5w6NSNggIitt28bnddvDF5WiOA+7JvEcr2kGOaAPTs75McncjN+2F2g== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1679427007; a=rsa-sha256; cv=none; b=luch8t8S6H8/j2tdrYY0qZ9oFVVoCYMPKtwka2iq8XwtVFAstC1Cp5NfFHaKQfg1vYnv7B /iotPXYSKeKyUKgii+n41cNRhAsXpePrlcMbYDx8eHwkO1fX6JuUIbheN8tS+6IjDIO+mp HSxSQ+qXB6pVGqBP7Bz/pJMpUH6JmM9CtZMmO96Vxa0KMrY7a07NW85eo4ohER+oExr3mU HoYxMRy08sT9kwRTeFkvpsSsy2L1xrxBJKD1aEkYRWs+HjYFuhrRh5GGCkjsjQ3bzLdLMh CToZdrI+1rNatudwE9cBRDsPko4vnGBzEuHQEM5hOCiCo7fxk8UxFrkQKOsEFQ== 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 4Ph1s9319HzPKg; Tue, 21 Mar 2023 19:30:05 +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 32LJU5cR036645; Tue, 21 Mar 2023 19:30:05 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 32LJU5we036643; Tue, 21 Mar 2023 19:30:05 GMT (envelope-from git) Date: Tue, 21 Mar 2023 19:30:05 GMT Message-Id: <202303211930.32LJU5we036643@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: cfe9365d6e3a - main - sysutils/py-plumbum: Convert to USE_PYTHON=pep517 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: cfe9365d6e3a5a02695fd72e045377dcfa1a2643 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by sunpoet: URL: https://cgit.FreeBSD.org/ports/commit/?id=cfe9365d6e3a5a02695fd72e045377dcfa1a2643 commit cfe9365d6e3a5a02695fd72e045377dcfa1a2643 Author: Po-Chuan Hsieh AuthorDate: 2023-03-21 18:48:02 +0000 Commit: Po-Chuan Hsieh CommitDate: 2023-03-21 19:21:18 +0000 sysutils/py-plumbum: Convert to USE_PYTHON=pep517 - Bump PORTREVISION for dependency and package change --- sysutils/py-plumbum/Makefile | 10 +++---- sysutils/py-plumbum/files/setup.py | 54 -------------------------------------- 2 files changed, 5 insertions(+), 59 deletions(-) diff --git a/sysutils/py-plumbum/Makefile b/sysutils/py-plumbum/Makefile index 7110079c9a3d..6fe0d3560691 100644 --- a/sysutils/py-plumbum/Makefile +++ b/sysutils/py-plumbum/Makefile @@ -1,5 +1,6 @@ PORTNAME= plumbum PORTVERSION= 1.8.1 +PORTREVISION= 1 CATEGORIES= sysutils python PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX} MASTER_SITES= PYPI @@ -11,8 +12,11 @@ WWW= https://github.com/tomerfiliba/plumbum LICENSE= MIT LICENSE_FILE= ${WRKSRC}/LICENSE +BUILD_DEPENDS= ${PYTHON_PKGNAMEPREFIX}hatch-vcs>=0:devel/py-hatch-vcs@${PY_FLAVOR} \ + ${PYTHON_PKGNAMEPREFIX}hatchling>=0:devel/py-hatchling@${PY_FLAVOR} + USES= python:3.6+ -USE_PYTHON= autoplist concurrent distutils +USE_PYTHON= autoplist concurrent pep517 NO_ARCH= yes @@ -20,8 +24,4 @@ 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/files/setup.py b/sysutils/py-plumbum/files/setup.py deleted file mode 100644 index 55ecd32110d7..000000000000 --- a/sysutils/py-plumbum/files/setup.py +++ /dev/null @@ -1,54 +0,0 @@ -# -*- 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', - ], -)