From unknown Tue Jun 17 22:28:20 2025 X-Loop: help-debbugs@gnu.org Subject: [bug#64869] [PATCH 0/2] Add pipx package manager for Python applications Resent-From: Wojtek Kosior Original-Sender: "Debbugs-submit" Resent-CC: lars@6xq.net, jgart@dismail.de, guix-patches@gnu.org Resent-Date: Wed, 26 Jul 2023 09:07:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 64869 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 64869@debbugs.gnu.org Cc: Wojtek Kosior , Lars-Dominik Braun , jgart X-Debbugs-Original-To: guix-patches@gnu.org X-Debbugs-Original-Xcc: Lars-Dominik Braun , jgart Received: via spool by submit@debbugs.gnu.org id=B.169036241526097 (code B ref -1); Wed, 26 Jul 2023 09:07:01 +0000 Received: (at submit) by debbugs.gnu.org; 26 Jul 2023 09:06:55 +0000 Received: from localhost ([127.0.0.1]:47534 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qOaTu-0006mq-W7 for submit@debbugs.gnu.org; Wed, 26 Jul 2023 05:06:55 -0400 Received: from lists.gnu.org ([2001:470:142::17]:47688) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qOaTs-0006md-N6 for submit@debbugs.gnu.org; Wed, 26 Jul 2023 05:06:53 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qOaTm-0006Vz-49 for guix-patches@gnu.org; Wed, 26 Jul 2023 05:06:46 -0400 Received: from koszko.org ([93.95.227.159]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qOaTj-0008Au-Rs for guix-patches@gnu.org; Wed, 26 Jul 2023 05:06:45 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=koszko.org; s=mail; h=Content-Transfer-Encoding:MIME-Version:Message-ID:Date:Subject:Cc: To:From:Sender:Reply-To:Content-Type:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: In-Reply-To:References:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=1SCO9s6tesRQG6phxjmAvPTakzmNlk1CU91a3BhgDVo=; b=XavopWbYX6Qw9oD2UBVdKQ2XrI QLiWCXZIGiZ+zf6RiPeN9E4Ojo69lOi8zydhwcCwVCDDcp/aGcnZfcafrNyh+L6xB8ILp6nyOOpIA BdxpdxcqG3ritQT9FJSqdRztKiTkhVAQrSSnqK9A7RrSJRSy9cFkkt4o/iqY5wDoWaPPDmsSkgddR /LLsoBGZuGYqpDPXpbjA1DoE+55lCiYyjziXwmARFucT7K4q0AZ9XPBDe9AMWNM4J8AS5+CxHCYYn d86u+oN7QUG3TKaz9fpwytaBsOyny8AaMj9cRe6kcTqzvcPnT20RbkEF9+eXH1ZyjTVp7dGAP33y8 vgZxqKMHxuXx/MOJxGg5O5rsaimR8p0EWmnkPBy5TKGZKuB6If4Xb0DHV+UfNuYBoKgFXn9ZiwVUP DyNuaSpghxSyJ37RbE19AtPDsE0uw9v0uTM65ndiVCcUlR1++rnHxn0GmbejS/QtacAE8UTyz3XT9 +MpknTTLE8iLSBb17eireQInTyaq8GImgVjZe41feM8aMvMMgFZYnU9QIvovTBn1Zsm5ORgt51oCb 1EX2w1pj8bjN+hIWAcObXGMY/HSYxwIrwbM+kV1H6V+yWeqfuoWK68FY1SiH3VPJRpb33H0ToNUph f2uKMs43FIcGV7QT/dSkZ/AKSXTkhNp7qOiB4FPhg=; Received: from [77.252.47.76] (helo=localhost.localdomain) by koszko.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1qOaTe-00022w-DB; Wed, 26 Jul 2023 11:06:38 +0200 From: Wojtek Kosior Date: Wed, 26 Jul 2023 11:05:37 +0200 Message-ID: X-Mailer: git-send-email 2.41.0 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Received-SPF: pass client-ip=93.95.227.159; envelope-from=koszko@koszko.org; helo=koszko.org X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: 0.9 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.1 (/) This series adds pipx, a tool similar to pip but oriented towards installation of Python applications rather than libraries, with automatic isolation of installed packages. Other distros are now changing pip to recommend using pipx instead[1]. Whether or not Guix will do the same, it seems like a good idea to at least have pipx available in the repos. I was unsure whether python-pipx should go into python-build or python-xyz. python-pip is declared in the former, python-virtualenv in the latter. In the end I chose python-xyz. Tests have been disabled because those of python-userpath rely on `docker pull` and those of python-pipx rely on application wheels from PyPI. It might be possible to enable at least some tests of python-pipx by using wheels from Guix. Rn I did not, however, have time to investigate. I tested the new package(s) with: #BEGIN_EXAMPLE ./pre-inst-env guix lint python-userpath python-pipx guix gc -D /gnu/store/*python-userpath-1.9.0 /gnu/store/*python-pipx-1.2.0 ./pre-inst-env guix build python-userpath --rounds=3 ./pre-inst-env guix build python-pipx --rounds=3 ./pre-inst-env guix shell -C coreutils python-pipx findutils which less bash --network --no-cwd pipx install pycowsay pipx ensurepath bash -l pycowsay moooo pipx uninstall pycowsay #END_EXAMPLE [1] https://pythonspeed.com/articles/externally-managed-environment-pep-668/ Wojtek Kosior (2): gnu: Add python-userpath. gnu: Add python-pipx. gnu/packages/python-xyz.scm | 77 +++++++++++++++++++++++++++++++++++++ 1 file changed, 77 insertions(+) base-commit: 76e041f9eef85bb039c5251d3350c62ee2066883 -- 2.41.0 From unknown Tue Jun 17 22:28:20 2025 X-Loop: help-debbugs@gnu.org Subject: [bug#64869] [PATCH 1/2] gnu: Add python-userpath. Resent-From: Wojtek Kosior Original-Sender: "Debbugs-submit" Resent-CC: lars@6xq.net, jgart@dismail.de, guix-patches@gnu.org Resent-Date: Wed, 26 Jul 2023 09:10:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 64869 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 64869@debbugs.gnu.org Cc: Wojtek Kosior , Lars-Dominik Braun , jgart X-Debbugs-Original-Xcc: Lars-Dominik Braun , jgart Received: via spool by 64869-submit@debbugs.gnu.org id=B64869.169036256126352 (code B ref 64869); Wed, 26 Jul 2023 09:10:02 +0000 Received: (at 64869) by debbugs.gnu.org; 26 Jul 2023 09:09:21 +0000 Received: from localhost ([127.0.0.1]:47543 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qOaWG-0006qw-LP for submit@debbugs.gnu.org; Wed, 26 Jul 2023 05:09:21 -0400 Received: from koszko.org ([93.95.227.159]:49670) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qOaWD-0006qh-Vg for 64869@debbugs.gnu.org; Wed, 26 Jul 2023 05:09:19 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=koszko.org; s=mail; h=Content-Transfer-Encoding:Content-Type:MIME-Version:References: In-Reply-To:Message-ID:Date:Subject:Cc:To:From:Sender:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=y6VA56ElmGXEHPxJBfbN68BNpJibSUFRUJbrEW7/b48=; b=g/WG0KUlgRQBRax2EfeY+ZcXKM XPKHdegwF89m2T01dVpsRoM5yUh2vyQ8rjpjsbu1QxH3TmjizRxWEz/i0daVEzHQDVuljD9I6bSE/ l0c7D/ag1eNaP1mJ81JQ8ZrUgstp4G9If+k2uWGjNIxdy4tl922it9ly+0YbHt7J13ur0DfQOzm8O 4hMupTpyzp2PapAIhlaIUC2lP69xw8ZZalBuOGsxF2xtxz++5gw3sYm9IalqApcoGYSpqFK5HwjzZ l31OD2JeLaEAeQWOOMdmlDmavlcTr8lVwkvjvyp0m495hbT76EQfAwYPnPBYMZVsBsBGiMZBtjp96 pr2nzESZYTHZZpUgamR2GQlDikLsAXbmRhGOvztE/T8iw3NPdY7oSfhQIAZ9rxEWd0XFidckrS+Wv NATaBhYaV/BMXtw4L2ZEOWI9ffXE2gQ95T2/mCeVY99zsF8rFTJQRXsSaYnYtpSrDTD/7DF7v5zEz Nrt7Y2TN2PlRj2pc3wMu24piAfGF40fU8lYXW3jSj373vcW8SbgpK9zVHOS05mBm5bq1Rzr6JBhrl Z8wLXKVGN0ArZy9IOMfZrAskZS3KuDM94M0eVk2zF3zR3QBMlVVCNvNMU62PFwerEd5JFBGh0o4hp JBfVeE8uRiA17IVsPzX5v5ftaCaXRsqDfyZWcHQBk=; Received: from [77.252.47.76] (helo=localhost.localdomain) by koszko.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1qOaWD-00025A-6Y; Wed, 26 Jul 2023 11:09:17 +0200 From: Wojtek Kosior Date: Wed, 26 Jul 2023 11:09:01 +0200 Message-ID: X-Mailer: git-send-email 2.41.0 In-Reply-To: References: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Score: -0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) * gnu/packages/python-xyz.scm (python-userpath): New variable. --- gnu/packages/python-xyz.scm | 39 +++++++++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm index db3e69fb45..022d26694c 100644 --- a/gnu/packages/python-xyz.scm +++ b/gnu/packages/python-xyz.scm @@ -139,6 +139,7 @@ ;;; Copyright © 2023 Dominik Delgado Steuter ;;; Copyright © 2023 Ivan Vilata-i-Balaguer ;;; Copyright © 2023 Ontje Lünsdorf +;;; Copyright © 2023 Wojtek Kosior ;;; ;;; This file is part of GNU Guix. ;;; @@ -5223,6 +5224,44 @@ (define-public python-virtualenv-clone "Clone non-relocatable virtualenvs without breaking site-packages.") (license license:expat))) +(define-public python-userpath + (package + (name "python-userpath") + (version "1.9.0") + (source + (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/ofek/userpath") + (commit (string-append "v" version)))) + (file-name (git-file-name name version)) + (sha256 + (base32 "1zrbjb54h5p7f1xadk93by1663asr38jg6qs1jsaalsfz7x83v3z")))) + (build-system pyproject-build-system) + (native-inputs (list python-hatchling)) + (arguments + `(#:tests? #f ;tests depend on a docker image + #:phases + (modify-phases %standard-phases + (add-after 'install 'install-doc + (lambda* (#:key outputs #:allow-other-keys) + (let ((doc (string-append (assoc-ref outputs "out") "/share/doc"))) + (mkdir-p doc) + (for-each (lambda (file) + (copy-file (string-append "." file) + (string-append doc file))) + '("/HISTORY.rst" "/LICENSE.txt")))))))) + (propagated-inputs (list python-click)) + (home-page "https://pypi.org/project/userpath/") + (synopsis "Cross-platform tool for adding locations to the user PATH") + (description "@code{userpath} can be used to make permanent changes to +user's PATH. It does so by modifying command line shell's initialization +files. + +You may instead want to use @code{guix home} to define PATH declaratively. +This tool is unfortunately not compatible with {guix home}.") + (license license:expat))) + (define-public python-uc-micro-py (package (name "python-uc-micro-py") -- 2.41.0 From unknown Tue Jun 17 22:28:20 2025 X-Loop: help-debbugs@gnu.org Subject: [bug#64869] [PATCH 2/2] gnu: Add python-pipx. Resent-From: Wojtek Kosior Original-Sender: "Debbugs-submit" Resent-CC: lars@6xq.net, jgart@dismail.de, guix-patches@gnu.org Resent-Date: Wed, 26 Jul 2023 09:10:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 64869 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 64869@debbugs.gnu.org Cc: Wojtek Kosior , Lars-Dominik Braun , jgart X-Debbugs-Original-Xcc: Lars-Dominik Braun , jgart Received: via spool by 64869-submit@debbugs.gnu.org id=B64869.169036256826386 (code B ref 64869); Wed, 26 Jul 2023 09:10:02 +0000 Received: (at 64869) by debbugs.gnu.org; 26 Jul 2023 09:09:28 +0000 Received: from localhost ([127.0.0.1]:47553 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qOaWK-0006rQ-KA for submit@debbugs.gnu.org; Wed, 26 Jul 2023 05:09:28 -0400 Received: from koszko.org ([93.95.227.159]:49672) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qOaWI-0006r5-97 for 64869@debbugs.gnu.org; Wed, 26 Jul 2023 05:09:23 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=koszko.org; s=mail; h=Content-Transfer-Encoding:MIME-Version:References:In-Reply-To: Message-ID:Date:Subject:Cc:To:From:Sender:Reply-To:Content-Type:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=Wzjg9XPnWOWJNVp5LjhN7MzvB/CvZKVc+q+IaYT2bpI=; b=hitvm/LKHQR3aDde5QE0YJDzfJ k4+gnFlNKt9nSgiRBZs44WkCxUIZf7wX1iqYipfz3mBISmrS0EbisJbu/UEzOK6Ni2v2JYgXmUdms a2+XhIQrTxPo2gUctZgfZDO65CwbMJDPxgURg7s55cMKlUHTOwfKsqltqJUHJvjp4SECns2Qb2gal 4JGqtxz7l/n9sGgcb0eM7nCV8c9YbNHjfuzWjBmHMlXli3JYuJC4cEVAcqd6sLvjKdPKMtOZZNQJd UP2Ef4DrxSHw/KPp6uOYApmOJEX/Q4nQdQEuZRj2cMthepg3/OqhixrXyBmGMAA4jNjjWtcELmIdS YS8OZSn980hQr5MK1AJghpfImrD/9z021hZlU1iZRS1rHelmZTel3gSIDVJ6pWlg8SZSusFEVi5O5 GM8gfO2ykLF9fIilJtNli6ipbm7hi2RUJYaCv6zMCKzXKiLcRhZ2OwpmDuTIfbNJ3ARqF078t1W/D lBUdY2J8+uPh63K4CUxycMWgRM5ubw2aUP6bJvd6evSLe3+EtFqzGbQOx5/xXLKRf+48uZnIbRT70 TqWk2vPlsmqojh729YFhGZnmsY22mADnizd+Muyf0exSZBg7/JvGkSzmUDH0kPNq9n5j1ws8DAcD2 zBTzzReqXBnrImJU8m7qsRknpyjpXEpwivdzKzcC4=; Received: from [77.252.47.76] (helo=localhost.localdomain) by koszko.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1qOaWH-00025A-IU; Wed, 26 Jul 2023 11:09:21 +0200 From: Wojtek Kosior Date: Wed, 26 Jul 2023 11:09:02 +0200 Message-ID: X-Mailer: git-send-email 2.41.0 In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Score: -0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) * gnu/packages/python-xyz.scm (python-pipx): New variable. --- gnu/packages/python-xyz.scm | 38 +++++++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm index 022d26694c..c7f2bb4a4e 100644 --- a/gnu/packages/python-xyz.scm +++ b/gnu/packages/python-xyz.scm @@ -5262,6 +5262,44 @@ (define-public python-userpath This tool is unfortunately not compatible with {guix home}.") (license license:expat))) +(define-public python-pipx + (package + (name "python-pipx") + (version "1.2.0") + (source + (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/pypa/pipx") + (commit version))) + (file-name (git-file-name name version)) + (sha256 + (base32 "112vmvd5h7gmpr8flar4848h6gm0i2s52s8xa5dbiffdr7xx0vwn")))) + (build-system pyproject-build-system) + (arguments + `(#:tests? #f ;tests require a bunch of wheels from the network + #:phases + (modify-phases %standard-phases + (add-after 'install 'install-doc + (lambda* (#:key outputs #:allow-other-keys) + (let ((doc (string-append (assoc-ref outputs "out") "/share/doc"))) + (mkdir-p doc) + (for-each (lambda (file) + (copy-file (string-append "." file) + (string-append doc file))) + '("/CHANGELOG.md" "/LICENSE")))))))) + (native-inputs (list python-hatchling)) + (propagated-inputs (list python-argcomplete + python-packaging + python-userpath)) + (home-page "https://pypa.github.io/pipx/") + (synopsis "Install and run python applications in isolated environments") + (description + "@code{pipx} is a tool to help you install and run end-user applications +written in Python. It's roughly similar to JavaScript's @code{npx}, and +Trisquel's @code{apt}.") + (license license:expat))) + (define-public python-uc-micro-py (package (name "python-uc-micro-py") -- 2.41.0