Message ID | 20161102104057.8226-2-ng0@we.make.ritual.n0.is |
---|---|
State | New |
Headers | show |
Am 02.11.2016 um 11:40 schrieb ng0: > + (inputs > + `(("youtube-dl" ,youtube-dl))) This needs to be a propagated input since python-pafy is a package itself.
Hartmut Goebel <h.goebel@crazy-compilers.com> writes: > Am 02.11.2016 um 11:40 schrieb ng0: >> + (inputs >> + `(("youtube-dl" ,youtube-dl))) > > This needs to be a propagated input since python-pafy is a package itself. Can you be more specific? I know now that other python inputs should be propagated, but why non-python software? Or is youtube-dl just another python software? Thanks
Am 04.11.2016 um 19:18 schrieb ng0: > Hartmut Goebel <h.goebel@crazy-compilers.com> writes: > >> Am 02.11.2016 um 11:40 schrieb ng0: >>> + (inputs >>> + `(("youtube-dl" ,youtube-dl))) >> This needs to be a propagated input since python-pafy is a package itself. > Can you be more specific? I know now that other python inputs > should be propagated, but why non-python software? Or is > youtube-dl just another python software? Oh, sorry, I thought you know that youtube-dl is a python tool. (I not it since I'm using it myself). Basically you were right: tools do not need to be propagated (at least as far as I understood). But the reason this needs to be propagated is: it is not used as a tool (via some system-call or such), but the python package is imported, see <https://github.com/mps-youtube/pafy/blob/develop/pafy/backend_youtube_dl.py#L11>. I have to admit that this is not obvious.
Hartmut Goebel <h.goebel@crazy-compilers.com> writes: > Am 04.11.2016 um 19:18 schrieb ng0: >> Hartmut Goebel <h.goebel@crazy-compilers.com> writes: >> >>> Am 02.11.2016 um 11:40 schrieb ng0: >>>> + (inputs >>>> + `(("youtube-dl" ,youtube-dl))) >>> This needs to be a propagated input since python-pafy is a package itself. >> Can you be more specific? I know now that other python inputs >> should be propagated, but why non-python software? Or is >> youtube-dl just another python software? > > Oh, sorry, I thought you know that youtube-dl is a python tool. (I not > it since I'm using it myself). Ah, thanks. I use it, but I have forgotten which language it is written in as it is not relevant for me. > > Basically you were right: tools do not need to be propagated (at least > as far as I understood). > > But the reason this needs to be propagated is: it is not used as a tool > (via some system-call or such), but the python package is imported, see > <https://github.com/mps-youtube/pafy/blob/develop/pafy/backend_youtube_dl.py#L11>. > I have to admit that this is not obvious. Ok, thanks for the explanation. I will add this with a comment to a new revision of the patch series.
[PATCH 1/2] gnu: Add python-pafy. - made youtube-dl propagated-input as suggested by harmut [PATCH 2/2] gnu: Add mps-youtube. - no changes
Am 04.11.2016 um 20:23 schrieb ng0: > [PATCH 1/2] gnu: Add python-pafy. > > - made youtube-dl propagated-input as suggested by harmut > > [PATCH 2/2] gnu: Add mps-youtube. > > - no changes > Both LGTM. Adding the comment about youtube_dl was a good idea :-)
Hartmut Goebel <h.goebel@crazy-compilers.com> writes: > Am 04.11.2016 um 20:23 schrieb ng0: >> [PATCH 1/2] gnu: Add python-pafy. >> >> - made youtube-dl propagated-input as suggested by harmut >> >> [PATCH 2/2] gnu: Add mps-youtube. >> >> - no changes >> > > Both LGTM. > > Adding the comment about youtube_dl was a good idea :-) Both of these packages have 'or later' in the source license header. Also mps-youtube does not need mpv or ffmpeg in inputs, since they are optional runtime dependencies. Additionally home-page should be https. Other than that this works great, neat program! I pushed the patches with these changes, and a minor edit to the mps-youtube description to make it clear that mplayer or mpv is required.
Marius Bakke <mbakke@fastmail.com> writes: > Hartmut Goebel <h.goebel@crazy-compilers.com> writes: > >> Am 04.11.2016 um 20:23 schrieb ng0: >>> [PATCH 1/2] gnu: Add python-pafy. >>> >>> - made youtube-dl propagated-input as suggested by harmut >>> >>> [PATCH 2/2] gnu: Add mps-youtube. >>> >>> - no changes >>> >> >> Both LGTM. >> >> Adding the comment about youtube_dl was a good idea :-) > > Both of these packages have 'or later' in the source license header. > Also mps-youtube does not need mpv or ffmpeg in inputs, since they are > optional runtime dependencies. Oh... I had forgotten about these two changes I wanted to make. Thanks for fixing it! > Additionally home-page should be https. > > Other than that this works great, neat program! > > I pushed the patches with these changes, and a minor edit to the > mps-youtube description to make it clear that mplayer or mpv is > required. >
diff --git a/gnu/packages/python.scm b/gnu/packages/python.scm index b7c9e11..32caf20 100644 --- a/gnu/packages/python.scm +++ b/gnu/packages/python.scm @@ -86,6 +86,7 @@ #:use-module (gnu packages texinfo) #:use-module (gnu packages tls) #:use-module (gnu packages version-control) + #:use-module (gnu packages video) #:use-module (gnu packages web) #:use-module (gnu packages base) #:use-module (gnu packages xml) @@ -1583,6 +1584,26 @@ standard library.") `(#:python ,python-2 #:tests? #f)))) ; no setup.py test command +(define-public python-pafy + (package + (name "python-pafy") + (version "0.5.2") + (source + (origin + (method url-fetch) + (uri (pypi-uri "pafy" version)) + (sha256 + (base32 + "1ckvrypyvb7jbqlgwdz0y337ajagjv7dgxyns326nqwypn1wpq0i")))) + (build-system python-build-system) + (inputs + `(("youtube-dl" ,youtube-dl))) + (home-page "http://np1.github.io/pafy/") + (synopsis "Retrieve YouTube content and metadata") + (description + "@code{pafy} is a python library to retrieve YouTube content and metadata.") + (license license:lgpl3))) + (define-public python-py (package (name "python-py")