gnu: python-distlib: Update to 0.3.5.
* gnu/packages/python-xyz.scm (python-distlib): Update to 0.3.5. [source](uri): Use tarball instead of zipball. [arguments]: Use gexp and a PEP517-style build. [native-inputs]: Add PYTHON-PYPA-BUILD and PYTHON-PYTEST.
This commit is contained in:
		
							parent
							
								
									c5dd6e5d40
								
							
						
					
					
						commit
						6c03dce10d
					
				
					 1 changed files with 30 additions and 18 deletions
				
			
		| 
						 | 
					@ -6955,31 +6955,43 @@ by pycodestyle.")
 | 
				
			||||||
(define-public python-distlib
 | 
					(define-public python-distlib
 | 
				
			||||||
  (package
 | 
					  (package
 | 
				
			||||||
    (name "python-distlib")
 | 
					    (name "python-distlib")
 | 
				
			||||||
    (version "0.3.1")
 | 
					    (version "0.3.5")
 | 
				
			||||||
    (source
 | 
					    (source
 | 
				
			||||||
     (origin
 | 
					     (origin
 | 
				
			||||||
       (method url-fetch)
 | 
					       (method url-fetch)
 | 
				
			||||||
       (uri (pypi-uri "distlib" version ".zip"))
 | 
					       (uri (pypi-uri "distlib" version))
 | 
				
			||||||
       (sha256
 | 
					       (sha256
 | 
				
			||||||
        (base32
 | 
					        (base32
 | 
				
			||||||
         "1wdzv7fsjhrkhh1wfkarlhcwa8m00mgcpdsvknmf2qy8f9l13xpd"))))
 | 
					         "1zmjraasgqkz0gfv4mc4w4fj4k2fxj62h1pf5dgb5qqbqwvmgxx7"))))
 | 
				
			||||||
    (build-system python-build-system)
 | 
					    (build-system python-build-system)
 | 
				
			||||||
    (arguments
 | 
					    (arguments
 | 
				
			||||||
     `(#:phases
 | 
					     (list
 | 
				
			||||||
       (modify-phases %standard-phases
 | 
					      #:phases
 | 
				
			||||||
 | 
					      #~(modify-phases %standard-phases
 | 
				
			||||||
 | 
					          (replace 'build
 | 
				
			||||||
 | 
					            (lambda _
 | 
				
			||||||
 | 
					              ;; ZIP does not support timestamps before 1980.
 | 
				
			||||||
 | 
					              (setenv "SOURCE_DATE_EPOCH" "315532800")
 | 
				
			||||||
 | 
					              (invoke "python" "-m" "build" "--wheel" "--no-isolation" ".")))
 | 
				
			||||||
          (add-before 'build 'no-/bin/sh
 | 
					          (add-before 'build 'no-/bin/sh
 | 
				
			||||||
            (lambda _
 | 
					            (lambda _
 | 
				
			||||||
              (substitute* '("distlib/scripts.py" "tests/test_scripts.py")
 | 
					              (substitute* '("distlib/scripts.py" "tests/test_scripts.py")
 | 
				
			||||||
               (("/bin/sh") (which "sh")))
 | 
					                (("/bin/sh") (which "sh")))))
 | 
				
			||||||
             #t))
 | 
					          (replace 'check
 | 
				
			||||||
         (add-before 'check 'prepare-test-env
 | 
					            (lambda* (#:key tests? #:allow-other-keys)
 | 
				
			||||||
           (lambda _
 | 
					 | 
				
			||||||
              (setenv "HOME" "/tmp")
 | 
					              (setenv "HOME" "/tmp")
 | 
				
			||||||
              ;; NOTE: Any value works, the variable just has to be present.
 | 
					              ;; NOTE: Any value works, the variable just has to be present.
 | 
				
			||||||
              (setenv "SKIP_ONLINE" "1")
 | 
					              (setenv "SKIP_ONLINE" "1")
 | 
				
			||||||
             #t)))))
 | 
					              (when tests?
 | 
				
			||||||
    (native-inputs (list unzip))
 | 
					                (invoke "pytest" "-vv"))))
 | 
				
			||||||
    (home-page "https://bitbucket.org/pypa/distlib")
 | 
					          (replace 'install
 | 
				
			||||||
 | 
					            (lambda _
 | 
				
			||||||
 | 
					              (let ((whl (car (find-files "dist" "\\.whl$"))))
 | 
				
			||||||
 | 
					                (invoke "pip" "--no-cache-dir" "--no-input"
 | 
				
			||||||
 | 
					                        "install" "--no-deps" "--prefix" #$output whl)))))))
 | 
				
			||||||
 | 
					    (native-inputs
 | 
				
			||||||
 | 
					     (list python-pypa-build python-pytest))
 | 
				
			||||||
 | 
					    (home-page "https://github.com/pypa/distlib")
 | 
				
			||||||
    (synopsis "Distribution utilities")
 | 
					    (synopsis "Distribution utilities")
 | 
				
			||||||
    (description "Distlib is a library which implements low-level functions that
 | 
					    (description "Distlib is a library which implements low-level functions that
 | 
				
			||||||
relate to packaging and distribution of Python software.  It is intended to be
 | 
					relate to packaging and distribution of Python software.  It is intended to be
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Reference in a new issue