Hi,
Pierre-Henry Fröhring <contact@phfrohring.com> skribis:
The question mark here suggests you’re not running the tests with a
UTF-8 locale.
Could you add, say, ‘glibc-locales’ to your environment, ensure
GUIX_LOCPATH points to it, and set LC_ALL=en_US.UTF-8 (or similar)?
Toggle quote (75 lines)
> ;;; (fail (package (name "python-foo") (version "1.0.0") (source (origin (method url-fetch) (uri (pypi-uri "foo" version)) (sha256 (base32 "03ygiww1c9fdgs998x4rqhxa73gq0r30rp0vq50q022wp1d6w0cz")))) (build-system python-build-system) (propagated-inputs (list python-wrong)) (home-page "http://example.com") (synopsis "summary") (description "summary") (license license:lgpl2.0)) #f)
> test-name: pypi->guix-package, wheels
> location: /home/phf/src/guix/tests/pypi.scm:276
> source:
> + (test-assert
> + "pypi->guix-package, wheels"
> + (mock ((guix import utils)
> + url-fetch
> + (lambda (url file-name)
> + (match url
> + ("https://example.com/foo-1.0.0.tar.gz"
> + (begin
> + (mkdir-p "foo-1.0.0/foo.egg-info/")
> + (with-output-to-file
> + "foo-1.0.0/foo.egg-info/requires.txt"
> + (lambda ()
> + (display
> + "wrong data to make sure we're testing wheels ")))
> + (parameterize
> + ((current-output-port (%make-void-port "rw+")))
> + (system* "tar" "czvf" file-name "foo-1.0.0/"))
> + (delete-file-recursively "foo-1.0.0")
> + (set! test-source-hash
> + (call-with-input-file file-name port-sha256))))
> + ("https://example.com/foo-1.0.0-py2.py3-none-any.whl"
> + (begin
> + (mkdir "foo-1.0.0.dist-info")
> + (with-output-to-file
> + "foo-1.0.0.dist-info/METADATA"
> + (lambda () (display test-metadata)))
> + (let ((zip-file (string-append file-name ".zip")))
> + (system*
> + "zip"
> + "-q"
> + zip-file
> + "foo-1.0.0.dist-info/METADATA")
> + (rename-file zip-file file-name))
> + (delete-file-recursively "foo-1.0.0.dist-info")))
> + (_ (error "Unexpected URL: " url)))))
> + (mock ((guix http-client)
> + http-fetch
> + (lambda (url . rest)
> + (match url
> + ("https://pypi.org/pypi/foo/json"
> + (values
> + (open-input-string test-json-1)
> + (string-length test-json-1)))
> + ("https://example.com/foo-1.0.0-py2.py3-none-any.whl"
> + #f)
> + (_ (error "Unexpected URL: " url)))))
> + (invalidate-memoization! pypi->guix-package)
> + (match (pypi->guix-package "foo")
> + (('package
> + ('name "python-foo")
> + ('version "1.0.0")
> + ('source
> + ('origin
> + ('method 'url-fetch)
> + ('uri ('pypi-uri "foo" 'version))
> + ('sha256 ('base32 (? string? hash)))))
> + ('build-system 'python-build-system)
> + ('propagated-inputs
> + ('list 'python-bar 'python-baz))
> + ('native-inputs ('list 'python-pytest))
> + ('home-page "http://example.com")
> + ('synopsis "summary")
> + ('description "summary")
> + ('license 'license:lgpl2.0))
> + (string=?
> + (bytevector->nix-base32-string test-source-hash)
> + hash))
> + (x (pk 'fail x #f))))))
> actual-value: #f
> result: FAIL
Not sure about that one. Does it still occur on current ‘master’?
See
on how to run only tests from ‘tests/pypi.scm’.
Thanks,
Ludo’.