From nobody Tue Mar 21 19:28:29 2023 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 4Ph1qL1cqXz40hsq; Tue, 21 Mar 2023 19:28:30 +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 4Ph1qL0wfdz4R1V; Tue, 21 Mar 2023 19:28:30 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1679426910; 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=OBxKRlLjhDSQ2gy46z8lQ7QkvkMsRn3lBSrhHSEjUiY=; b=mrF+XfdJFqd25EJPBtzTaMNe9lAILXxHbVNsIhkVTnJNA6lHk6b231xT6mkcur94LH9+l4 pB496uvbR450q6pOf+tzWswbpsu0+APaxDRbXNCRpA2YSdr2cVN2ZMgszGkdsTfUH/koNd BUPbPo/ooay6PLuQAvBa3CVjMyyQVq7XFTYpXIfV56W5+5EdkydjvfNRT6FssmDFcLZ4Qd QnE1qqaaM5oAMzCktgUytTwc9Z2Eji+gW3QN/L12CozvGIS1GIoPrDA+7gn5i+WjXAQH/i LlK7vcF9UN0cR7aN7pacI4winaTu7NEwnhG01MGmIMcrkYH1a4Fa4+5lu7AAtA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1679426910; 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=OBxKRlLjhDSQ2gy46z8lQ7QkvkMsRn3lBSrhHSEjUiY=; b=GcwJSatAXD3Igb0bPpUIfFS/ksLKGq6HI2zd/Ahe5DUIurBNYKL5oEBzk3is7esi2xui2r qS/QbhFi2D9bjwlGPIqmaSwWrf7SgzgWanccie/fpsL/kjqdOifc//yWJGzBKH0gKum1By Obq0tPn6xmrrtnNKumFiq6Zw9r7pN3yRbz1XGsnqhptwujHBS4TGQF3djiwt53FYW/hZ89 bgdRDBvIptz7UoOipxrvbrvMom6sziaigyOG6VEphMq/aLWdea4mV5X/CUpBMj1j/BhB2+ EusmPEuY/g9gnUQ4Ntet1Ejp1PkLz+6UuGsce5LuC9d/q5QrlLPHm1tVBvNanw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1679426910; a=rsa-sha256; cv=none; b=lB9I0e03pD0sTYYhSja/FH+NNC5ZqxMYBSuYOWjwesA2SNPcPKxAr6gqZWmuBa7ZkNs+Go Sdk3hjmRrlueOy29ivALjQgqmTOA4sxhlPaZTizUsK660YHyljwD4FjomP1R0zMPHwoS2l Tq6xX/qcGw2GZimYyKX3pWgQWV3AUm0hLjSHA63fodDadXWwsxo3QoHuHnn09NcKdi5Fo7 zl+Okin2xBZRDZwGSQ9X05YVHHh4fCjixASqkl9blspZ4P+h3SpmSNW8OcOuaUk2XYLyu+ mgiWibHMHAlx53WshCssJ/XxMsUIl3WEClxhty+erZUf5irhYoyXeYnOSjmmZw== 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 4Ph1qK74dbzPMn; Tue, 21 Mar 2023 19:28:29 +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 32LJSTQ6032122; Tue, 21 Mar 2023 19:28:29 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 32LJSTRQ032121; Tue, 21 Mar 2023 19:28:29 GMT (envelope-from git) Date: Tue, 21 Mar 2023 19:28:29 GMT Message-Id: <202303211928.32LJSTRQ032121@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: db730ad9a84e - main - devel/py-pipx: Convert to USE_PYTHON=pep517 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: sunpoet X-Git-Repository: ports X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: db730ad9a84e39467ea4bbff6df0af89d4cb2fcc Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by sunpoet: URL: https://cgit.FreeBSD.org/ports/commit/?id=db730ad9a84e39467ea4bbff6df0af89d4cb2fcc commit db730ad9a84e39467ea4bbff6df0af89d4cb2fcc Author: Po-Chuan Hsieh AuthorDate: 2023-03-21 18:45:02 +0000 Commit: Po-Chuan Hsieh CommitDate: 2023-03-21 19:20:56 +0000 devel/py-pipx: Convert to USE_PYTHON=pep517 - Bump PORTREVISION for dependency and package change --- devel/py-pipx/Makefile | 11 ++++------- devel/py-pipx/files/setup.py | 39 --------------------------------------- 2 files changed, 4 insertions(+), 46 deletions(-) diff --git a/devel/py-pipx/Makefile b/devel/py-pipx/Makefile index c91752f2c371..4b20f542fa12 100644 --- a/devel/py-pipx/Makefile +++ b/devel/py-pipx/Makefile @@ -1,6 +1,6 @@ PORTNAME= pipx PORTVERSION= 1.1.0 -PORTREVISION= 1 +PORTREVISION= 2 CATEGORIES= devel python MASTER_SITES= PYPI PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX} @@ -12,12 +12,13 @@ WWW= https://github.com/pypa/pipx LICENSE= MIT LICENSE_FILE= ${WRKSRC}/LICENSE +BUILD_DEPENDS= ${PYTHON_PKGNAMEPREFIX}hatchling>=0.15.0:devel/py-hatchling@${PY_FLAVOR} RUN_DEPENDS= ${PYTHON_PKGNAMEPREFIX}argcomplete>=1.9.4:devel/py-argcomplete@${PY_FLAVOR} \ ${PYTHON_PKGNAMEPREFIX}packaging>=20.0:devel/py-packaging@${PY_FLAVOR} \ ${PYTHON_PKGNAMEPREFIX}userpath>=1.6.0:devel/py-userpath@${PY_FLAVOR} -USES= python:3.6+ -USE_PYTHON= autoplist concurrent distutils +USES= python:3.7+ +USE_PYTHON= autoplist concurrent pep517 NO_ARCH= yes @@ -27,8 +28,4 @@ NO_ARCH= yes RUN_DEPENDS+= ${PYTHON_PKGNAMEPREFIX}importlib-metadata>=3.3.0:devel/py-importlib-metadata@${PY_FLAVOR} .endif -post-patch: - @${RM} ${WRKSRC}/pyproject.toml - @${SED} -e 's|%%PORTVERSION%%|${PORTVERSION}|' ${FILESDIR}/setup.py > ${WRKSRC}/setup.py - .include diff --git a/devel/py-pipx/files/setup.py b/devel/py-pipx/files/setup.py deleted file mode 100644 index 850f2e02e016..000000000000 --- a/devel/py-pipx/files/setup.py +++ /dev/null @@ -1,39 +0,0 @@ -# -*- coding: utf-8 -*- -from setuptools import setup - -setup( - name='pipx', - version='%%PORTVERSION%%', - description='Install and Run Python Applications in Isolated Environments', - long_description='

\n\n\n\n

\n\n# pipx — Install and Run Python Applications in Isolated Environments\n\n

\n\n\n\n

\n\n

\n\nimage PyPI version \n\n

\n\n**Documentation**: https://pypa.github.io/pipx/\n\n**Source Code**: https://github.com/pypa/pipx\n\n_For comparison to other tools including pipsi, see [Comparison to Other Tools](https://pypa.github.io /pipx/comparisons/)._\n\n## Install pipx\n\n### On macOS\n\n```\nbrew install pipx\npipx ensurepath\n```\n\nUpgrade pipx with `brew update && brew upgrade pipx`.\n\n### On Linux, install via pip (requires pip 19.0 or later)\n\n```\npython3 -m pip install --user pipx\npython3 -m pipx ensurepath\n```\n\nUpgrade pipx with `python3 -m pip install --user -U pipx`.\n\n### On Windows, install via pip (requires pip 19.0 or later)\n\n```\n# If you installed python using the app-store, replace `python` with `python3` in the next line.\npython -m pip install --user pipx\n```\n\nIt is possible (even most likely) the above finishes with a WARNING looking similar to this:\n\n```\nWARNING: The script pipx.exe is installed in `\\AppData\\Roaming\\Python\\Python3x\\Scripts` which is not on PATH\n```\n\nIf so, go to the mentioned folder, allowing you to run the pipx executable directly.\nEnter the following line (even if you did not get the warning):\n\n```\npipx ensurepath\n```\n\nThis will add both the above mentioned path and t! he `%USERPROFILE%\\.local\\bin` folder to your search path.\nRestart your terminal session and verify `pipx` does run.\n\nUpgrade pipx with `python3 -m pip install --user -U pipx`.\n\n### Shell completions\n\nShell completions are available by following the instructions printed with this command:\n\n```\npipx completions\n```\n\nFor more details, see the [installation instructions](https://pypa.github.io/pipx/installation/).\n\n## Overview: What is `pipx`?\n\npipx is a tool to help you install and run end-user applications written in Python. It\'s roughly similar to macOS\'s `brew`, JavaScript\'s [npx](https://medium.com/@maybekatz/introducing-npx-an-npm-package-runner-55f7d4bd282b), and Linux\'s `apt`.\n\nIt\'s closely related to pip. In fact, it uses pip, but is focused on installing and managing Python packages that can be run from the command line directly as applications.\n\n### How is it Different from pip?\n\npip is a general-purpose package installer for both libraries and a pps with no environment isolation. pipx is made specifically for application installation, as it adds isolation yet still makes the apps available in your shell: pipx creates an isolated environment for each application and its associated packages.\n\npipx does not ship with pip, but installing it is often an important part of bootstrapping your system.\n\n### Where Does `pipx` Install Apps From?\n\nBy default, pipx uses the same package index as pip, [PyPI](https://pypi.org/). pipx can also install from all other sources pip can, such as a local directory, wheel, git url, etc.\n\nPython and PyPI allow developers to distribute code with "console script entry points". These entry points let users call into Python code from the command line, effectively acting like standalone applications.\n\npipx is a tool to install and run any of these thousands of application-containing packages in a safe, convenient, and reliable way. **In a way, it turns Python Package Index (PyPI) into a big ap p store for Python applications.** Not all P! ython pac! kages have entry points, but many do.\n\nIf you would like to make your package compatible with pipx, all you need to do is add a [console scripts](https://python-packaging.readthedocs.io/en/latest/command-line-scripts.html#the-console-scripts-entry-point) entry point. If you\'re a poetry user, use [these instructions](https://python-poetry.org/docs/pyproject/#scripts).\n\n## Features\n\n`pipx` enables you to\n\n- Expose CLI entrypoints of packages ("apps") installed to isolated environments with the `install` command. This guarantees no dependency conflicts and clean uninstalls!\n- Easily list, upgrade, and uninstall packages that were installed with pipx\n- Run the latest version of a Python application in a temporary environment with the `run` command\n\nBest of all, pipx runs with regular user permissions, never calling `sudo pip install` (you aren\'t doing that, are you? 😄).\n\n### Walkthrough: Installing a Package and its Applications With `pipx`\n\nYou can globally install an application by running\n\n```\npipx install PACKAGE\n```\n\nThis automatically creates a virtual environment, installs the package, and adds the package\'s associated applications (entry points) to a location on your `PATH`. For example, `pipx install pycowsay` makes the `pycowsay` command available globally, but sandboxes the pycowsay package in its own virtual environment. **pipx never needs to run as sudo to do this.**\n\nExample:\n\n```\n>> pipx install pycowsay\n installed package pycowsay 2.0.3, Python 3.7.3\n These apps are now globally available\n - pycowsay\ndone! ✨ 🌟 ✨\n\n\n>> pipx list\nvenvs are in /home/user/.local/pipx/venvs\napps are exposed on your $PATH at /home/user/.local/bin\n package pycowsay 2.0.3, Python 3.7.3\n - pycowsay\n\n\n# Now you can run pycowsay from anywhere\n>> pycowsay mooo\n ____\n< mooo >\n ====\n \\\n \\\n ^__^\n (oo)\\_______\n (__)\\ )\\/\\\n ||----w |\n || ||\n\n```\n\n### I! nstalling! from Source Control\n\nYou can also install from a git repository. Here, `black` is used as an example.\n\n```\npipx install git+https://github.com/psf/black.git\npipx install git+https://github.com/psf/black.git@branch # branch of your choice\npipx install git+https://github.com/psf/black.git@ce14fa8b497bae2b50ec48b3bd7022573a59cdb1 # git hash\npipx install https://github.com/psf/black/archive/18.9b0.zip # install a release\n```\n\n### Walkthrough: Running an Application in a Temporary Virtual Environment\n\nThis is an alternative to `pipx install`.\n\n`pipx run` downloads and runs the above mentioned Python "apps" in a one-time, temporary environment, leaving your system untouched afterwards.\n\nThis can be handy when you need to run the latest version of an app, but don\'t necessarily want it installed on your computer.\n\nYou may want to do this when you are initializing a new project and want to set up the right directory structure, when you want to view the help text of an application, or if you simply want to run an app in a one-off case and leave your system untouched afterwards.\n\nFor example, the blog post [How to set up a perfect Python project](https://sourcery.ai/blog/python-best-practices/) uses `pipx run` to kickstart a new project with [cookiecutter](https://github.com/cookiecutter/cookiecutter), a tool that creates projects from project templates.\n\nA nice side benefit is that you don\'t have to remember to upgrade the app since `pipx run` will automatically run a recent version for you.\n\nOkay, let\'s see what this looks like in practice!\n\n```\npipx run APP [ARGS...]\n```\n\nThis will install the package in an isolated, temporary directory and invoke the app. Give it a try:\n\n```\n> pipx run pycowsay moo\n\n ---\n< moo >\n ---\n \\ ^__^\n \\ (oo)\\_______\n (__)\\ )\\/\\\n ||----w |\n || ||\n\n\n```\n\nNotice that you **don\'t need to execute any install commands to run the app**.\n\nAny arguments after the application name will b! e passed ! directly to the application:\n\n```\n> pipx run pycowsay these arguments are all passed to pycowsay!\n\n -------------------------------------------\n< these arguments are all passed to pycowsay! >\n -------------------------------------------\n \\ ^__^\n \\ (oo)\\_______\n (__)\\ )\\/\\\n ||----w |\n || ||\n\n```\n\nRe-running the same app is quick because pipx caches Virtual Environments on a per-app basis. The caches only last a few days, and when they expire, pipx will again use the latest version of the package. This way you can be sure you\'re always running a new version of the package without having to manually upgrade.\n\nIf the app name does not match that package name, you can use the `--spec` argument to specify the package to install and app to run separately:\n\n```\npipx run --spec PACKAGE APP\n```\n\nYou can also specify specific versions, version ranges, or extras:\n\n```\npipx run APP==1.0.0\n```\n\n### Running from Sou rce Control\n\nYou can also run from a git repository. Here, `black` is used as an example.\n\n```\npipx run --spec git+https://github.com/psf/black.git black\npipx run --spec git+https://github.com/psf/black.git@branch black # branch of your choice\npipx run --spec git+https://github.com/psf/black.git@ce14fa8b497bae2b50ec48b3bd7022573a59cdb1 black # git hash\npipx run --spec https://github.com/psf/black/archive/18.9b0.zip black # install a release\n```\n\n### Running from URL\n\nYou can run .py files directly, too.\n\n```\npipx run https://gist.githubusercontent.com/cs01/fa721a17a326e551ede048c5088f9e0f/raw/6bdfbb6e9c1132b1c38fdd2f195d4a24c540c324/pipx-demo.py\npipx is working!\n```\n\n### Summary\n\nThat\'s it! Those are the most important commands `pipx` offers. To see all of pipx\'s documentation, run `pipx --help` or see the [docs](https://pypa.github.io/pipx/docs/).\n\n## Testimonials\n\n
\n"Thanks for improving the workflow that pipsi has covered in the past. Nicely don e!"\n
\n—Jannis Leidel, PSF fellow, former pip and Django core developer, and founder of the Python Packaging Authority (PyPA)\n
\n
\n\n

\n\n
\n"My setup pieces together pyenv, poetry, and pipx. [...] For the things I need, it’s perfect."\n
\n—Jacob Kaplan-Moss, co-creator of Django in blog post My Python Development Environment, 2020 Edition\n
\n
\n\n

\n\n
\n"I\'m a big fan of pipx. I think pipx is super cool."\n
\n—Michael Kennedy, co-host of PythonBytes podcast in episode 139\n
\n
\n\n

\ n\n## Credits\n\npipx was inspired by [pipsi](https://github.com/mitsuhiko/pipsi) and [npx](https://github.com/npm/npx). It was created by [Chad Smith](https://github.com/cs01/) and has had lots of help from [contributors](https://github.com/pypa/pipx/graphs/contributors). The logo was created by [@IrishMorales](https://github.com/IrishMorales).\n\npipx is maintained by a team of volunteers (in alphabetical order)\n\n- [Bernát Gábor](https://github.com/gaborbernat)\n- [Chad Smith](https://github.com/cs01) - co-lead maintainer\n- [Matthew Clapp](https://github.com/itsayellow) - co-lead maintainer\n- [Tzu-ping Chung](https://github.com/uranusjr)\n\n## Contributing\n\nIssues and Pull Requests are definitely welcome! Check out [Contributing](https://pypa.github.io/pipx/contributing/) to get started.\nEveryone who interacts with the pipx project via codebase, issue tracker, chat rooms, or otherwise is expected to follow\nthe [PSF Code of Conduct](https://github.com/pypa/.github/blob/ma in/CODE_OF_CONDUCT.md).\n', - author_email='Chad Smith ', - classifiers=[ - 'License :: OSI Approved :: MIT License', - 'Operating System :: OS Independent', - 'Programming Language :: Python', - 'Programming Language :: Python :: 3 :: Only', - 'Programming Language :: Python :: 3.7', - 'Programming Language :: Python :: 3.8', - 'Programming Language :: Python :: 3.9', - 'Programming Language :: Python :: 3.10', - ], - install_requires=[ - 'argcomplete>=1.9.4', - 'colorama>=0.4.4; sys_platform == "win32"', - 'importlib-metadata>=3.3.0; python_version < "3.8"', - 'packaging>=20.0', - 'userpath>=1.6.0', - ], - entry_points={ - 'console_scripts': [ - 'pipx = pipx.main:cli', - ], - }, - packages=[ - 'pipx', - 'pipx.commands', - ], - package_dir={ - '': 'src', - }, -)