~ruther/guix-local

d9433bf9648949f68d97c9da325863d0e38e7812 — Sharlatan Hellseher a month ago 89e9a8f
gnu: python-yewtube: Fix entry point.

* gnu/packages/video.scm (python-yewtube):
[phases]{relax-requirements}: Use #$version.
{sanity-check}: Do not overwrite it.
{fix-entry-points}: New phase.
[native-inputs]: Remove python-wheel.

Change-Id: I720800e34e70b32101b516f45ff4e88a950cba68
1 files changed, 11 insertions(+), 8 deletions(-)

M gnu/packages/video.scm
M gnu/packages/video.scm => gnu/packages/video.scm +11 -8
@@ 6751,29 6751,32 @@ can also directly record to WebM or MP4 if you prefer.")
     (list
      #:phases
      #~(modify-phases %standard-phases
          (add-after 'unpack 'fix-entry-points
            (lambda _
              (substitute* "setup.py"
                ;; main.py is in a "mps_youtube" and not in
                ;; "mps_youtube/main", see:
                ;; <https://github.com/mps-youtube/yewtube/pull/1334>.
                (("yt = mps_youtube:main.main")
                 "yt = mps_youtube.main:main"))))
          (add-after 'unpack 'relax-requirements
            (lambda _
              (substitute* "mps_youtube/__init__.py"
                (("from pip\\._vendor import pkg_resources.*")
                 "")
                (("__version__ =.*")
                 (format #f "__version__ = ~s~%"
                         #$(package-version this-package))))
                 (format #f "__version__ = ~s~%" #$version)))
              (substitute* "requirements.txt"
                (("httpx.*")
                 "httpx\n"))))
          (add-before 'check 'configure-tests
            (lambda _
              (setenv "HOME" (getcwd))))
          (replace 'sanity-check
            (lambda _
              (invoke (string-append #$output "/bin/yt") "-h"))))))
              (setenv "HOME" (getcwd)))))))
    (native-inputs
     (list python-dbus
           python-pygobject
           python-pytest
           python-setuptools
           python-wheel))
           python-setuptools))
    (propagated-inputs
     (list python-pylast
           python-pyperclip