gnu: python-pip: Ungraft.

* gnu/packages/python-build.scm (python-pip): Ungraft and apply source snippet
directly.
(python-pip/fixed): Remove variable.

Change-Id: I4913e8f87f5934bffec9d58ad86b97f8ca16ba32
This commit is contained in:
Josselin Poiret 2024-05-16 11:22:56 +02:00 committed by Ludovic Courtès
parent b6ea2c48f6
commit a0d74866ab
No known key found for this signature in database
GPG key ID: 090B11993D9AEBB5

View file

@ -284,36 +284,20 @@ (define-public python-pip
(package
(name "python-pip")
(version "23.1")
(replacement python-pip/fixed)
(source
(origin
(method url-fetch)
(uri (pypi-uri "pip" version))
(sha256
(base32
"0jnk639v9h7ghslm4jnlic6rj3v29nygflx1hgxxndg5gs4kk1a0"))))
(build-system python-build-system)
(arguments
'(#:tests? #f)) ; there are no tests in the pypi archive.
(home-page "https://pip.pypa.io/")
(synopsis "Package manager for Python software")
(description
"Pip is a package manager for Python software, that finds packages on the
Python Package Index (PyPI).")
(license license:expat)))
(define python-pip/fixed
(package
(inherit python-pip)
(source (origin
(inherit (package-source python-pip))
(snippet
#~(begin
(delete-file "src/pip/_vendor/certifi/cacert.pem")
(delete-file "src/pip/_vendor/certifi/core.py")
(with-output-to-file "src/pip/_vendor/certifi/core.py"
(lambda _
(display "\"\"\"
"0jnk639v9h7ghslm4jnlic6rj3v29nygflx1hgxxndg5gs4kk1a0"))
(snippet
#~(begin
(delete-file "src/pip/_vendor/certifi/cacert.pem")
(delete-file "src/pip/_vendor/certifi/core.py")
(with-output-to-file "src/pip/_vendor/certifi/core.py"
(lambda _
(display "\"\"\"
certifi.py
~~~~~~~~~~
This file is a Guix-specific version of core.py.
@ -335,7 +319,16 @@ (define python-pip/fixed
def contents() -> str:
with open(where(), \"r\", encoding=\"ascii\") as data:
return data.read()")))))))))
return data.read()")))))))
(build-system python-build-system)
(arguments
'(#:tests? #f)) ; there are no tests in the pypi archive.
(home-page "https://pip.pypa.io/")
(synopsis "Package manager for Python software")
(description
"Pip is a package manager for Python software, that finds packages on the
Python Package Index (PyPI).")
(license license:expat)))
(define-public python-setuptools
(package