unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
* [bug#53185] [PATCH 1/3] gnu: Add python-geojson.
@ 2022-01-11 10:45 phodina via Guix-patches via
  2022-01-28 22:55 ` bug#53185: " Ludovic Courtès
  0 siblings, 1 reply; 3+ messages in thread
From: phodina via Guix-patches via @ 2022-01-11 10:45 UTC (permalink / raw)
  To: 53185


[-- Attachment #1.1: Type: text/plain, Size: 100 bytes --]

Hi,

this patch series adds command line tool to show weather in your preferred location.

----
Petr

[-- Attachment #1.2: Type: text/html, Size: 320 bytes --]

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0002-gnu-Add-python-pyowm.patch --]
[-- Type: text/x-patch; name=0002-gnu-Add-python-pyowm.patch, Size: 1282 bytes --]

From e7995f7904fa6c51c8ef24e19cd5bb8396abe13d Mon Sep 17 00:00:00 2001
From: Petr Hodina <phodina@protonmail.com>
Date: Tue, 11 Jan 2022 11:28:57 +0100
Subject: [PATCH 2/3] gnu: Add python-pyowm.

* gnu/packages/python-web.scm (python-pyowm): New variable.

diff --git a/gnu/packages/python-web.scm b/gnu/packages/python-web.scm
index 253b68e02c..e98c07ab59 100644
--- a/gnu/packages/python-web.scm
+++ b/gnu/packages/python-web.scm
@@ -5493,6 +5493,24 @@ (define-public python-hupper
 changed the process is restarted.")
     (license license:expat)))
 
+(define-public python-pyowm
+  (package
+    (name "python-pyowm")
+    (version "3.2.0")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (pypi-uri "pyowm" version))
+       (sha256
+        (base32 "1pm8w6phr4m3xayndfndid366vhf1fpvdgjsp2zicxarmgc0pm53"))))
+    (build-system python-build-system)
+    (propagated-inputs (list python-geojson python-pysocks python-requests))
+    (home-page "https://github.com/csparpa/pyowm")
+    (synopsis "Python wrapper around OpenWeatherMap web APIs")
+    (description
+     "This package provides a Python wrapper around OpenWeatherMap web APIs.")
+    (license license:expat)))
+
 (define-public python-pyramid
   (package
     (name "python-pyramid")
-- 
2.34.0


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #3: 0001-gnu-Add-python-geojson.patch --]
[-- Type: text/x-patch; name=0001-gnu-Add-python-geojson.patch, Size: 1287 bytes --]

From d3287c48bb665ac08e95b9e65bc21c79c4207894 Mon Sep 17 00:00:00 2001
From: Petr Hodina <phodina@protonmail.com>
Date: Tue, 11 Jan 2022 11:28:17 +0100
Subject: [PATCH 1/3] gnu: Add python-geojson.

* gnu/packages/python-xyz.scm (python-geojson): New variable.

diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm
index 302a81b4f5..2f7616bbe5 100644
--- a/gnu/packages/python-xyz.scm
+++ b/gnu/packages/python-xyz.scm
@@ -11155,6 +11155,25 @@ (define-public python-pytest-black
 Python code formatter \"black\".")
     (license license:expat)))
 
+(define-public python-geojson
+  (package
+    (name "python-geojson")
+    (version "2.5.0")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (pypi-uri "geojson" version))
+       (sha256
+        (base32 "12k5bzqskvq3gqzkryarhdjl0df47y5k9cf8r3clasi2wjnbfjvf"))))
+    (build-system python-build-system)
+    (arguments
+     ;; https://github.com/jazzband/geojson/issues/175
+     `(#:tests? #f))
+    (home-page "https://github.com/jazzband/geojson")
+    (synopsis "Python bindings and utilities for GeoJSON")
+    (description "Python bindings and utilities for GeoJSON")
+    (license license:bsd-3)))
+
 (define-public python-get-version
   (package
     (name "python-get-version")
-- 
2.34.0


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #4: 0003-gnu-Add-wfetch.patch --]
[-- Type: text/x-patch; name=0003-gnu-Add-wfetch.patch, Size: 2366 bytes --]

From 1cb1ea2208e1575b3cdf5539644c9e4e435c0fab Mon Sep 17 00:00:00 2001
From: Petr Hodina <phodina@protonmail.com>
Date: Tue, 11 Jan 2022 11:29:23 +0100
Subject: [PATCH 3/3] gnu: Add wfetch.

* gnu/packages/admin.scm (wfetch): New variable.

diff --git a/gnu/packages/admin.scm b/gnu/packages/admin.scm
index 918a07f014..f64e9f6530 100644
--- a/gnu/packages/admin.scm
+++ b/gnu/packages/admin.scm
@@ -1859,6 +1859,45 @@ (define-public opendoas
     (license (list license:bsd-3        ; libbsd/*
                    license:isc))))      ; everything else
 
+(define-public wfetch
+  (let ((commit "e1cfa37814aebc9eb56ce994ebe877b6a6f9a715")
+        (revision "1"))
+    (package
+      (name "wfetch")
+      (version (git-version "0.1-pre" revision commit))
+      (source
+       (origin
+         (method git-fetch)
+         (uri (git-reference
+               (url "https://github.com/Gcat101/Wfetch")
+               (commit commit)))
+         (file-name (git-file-name name version))
+         (sha256
+          (base32 "1dmr85plx8zr6s14ym3r32g6crwxghkval5a24ah90ijx4dbn5q5"))))
+      (build-system python-build-system)
+      (arguments
+       `(#:use-setuptools? #f           ; no setup.py
+         #:tests? #f                    ; no test suite
+         #:phases
+         (modify-phases %standard-phases
+           (delete 'build)
+           (replace 'install
+             (lambda* (#:key outputs #:allow-other-keys)
+               (let* ((out (assoc-ref outputs "out"))
+                      (bin (string-append out "/bin"))
+                      (share (string-append out "/share")))
+                 (mkdir-p share)
+                 (substitute* "wfetch/wfetch.py"
+                   (("os.sep, 'opt', 'wfetch'") (string-append "'" share "'")))
+                 (install-file "wfetch/wfetch.py" bin)
+                 (copy-recursively "wfetch/icons" share)))))))
+      (inputs (list python-pyowm python-fire python-termcolor python-requests))
+      (home-page "https://github.com/zJairO/wfetch")
+      (synopsis "Neofetch/pfetch, but for weather")
+      (description "This package provides Neofetch/pfetch, but for weather.
+In order to use you must export WEATHER_CLI_API=<your OWM api key>.")
+      (license license:gpl3+))))
+
 (define-public wpa-supplicant-minimal
   (package
     (name "wpa-supplicant-minimal")
-- 
2.34.0


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* bug#53185: [PATCH 1/3] gnu: Add python-geojson.
  2022-01-11 10:45 [bug#53185] [PATCH 1/3] gnu: Add python-geojson phodina via Guix-patches via
@ 2022-01-28 22:55 ` Ludovic Courtès
  2022-01-29  5:11   ` [bug#53185] " phodina via Guix-patches via
  0 siblings, 1 reply; 3+ messages in thread
From: Ludovic Courtès @ 2022-01-28 22:55 UTC (permalink / raw)
  To: phodina; +Cc: 53185-done

Hi,

phodina <phodina@protonmail.com> skribis:

> From e7995f7904fa6c51c8ef24e19cd5bb8396abe13d Mon Sep 17 00:00:00 2001
> From: Petr Hodina <phodina@protonmail.com>
> Date: Tue, 11 Jan 2022 11:28:57 +0100
> Subject: [PATCH 2/3] gnu: Add python-pyowm.
>
> * gnu/packages/python-web.scm (python-pyowm): New variable.

[...]

> From d3287c48bb665ac08e95b9e65bc21c79c4207894 Mon Sep 17 00:00:00 2001
> From: Petr Hodina <phodina@protonmail.com>
> Date: Tue, 11 Jan 2022 11:28:17 +0100
> Subject: [PATCH 1/3] gnu: Add python-geojson.
>
> * gnu/packages/python-xyz.scm (python-geojson): New variable.

[...]

> From 1cb1ea2208e1575b3cdf5539644c9e4e435c0fab Mon Sep 17 00:00:00 2001
> From: Petr Hodina <phodina@protonmail.com>
> Date: Tue, 11 Jan 2022 11:29:23 +0100
> Subject: [PATCH 3/3] gnu: Add wfetch.
>
> * gnu/packages/admin.scm (wfetch): New variable.

Applied, after tweaking synopses/descriptions, moving wfetch to
python-xyz.scm (since it has nothing to do with system administration)
and fixing its ‘home-page’.

Please pay attention to these things for subsequent patches and you may
benefit from faster review in return.  :-)

Thanks,
Ludo’.




^ permalink raw reply	[flat|nested] 3+ messages in thread

* [bug#53185] [PATCH 1/3] gnu: Add python-geojson.
  2022-01-28 22:55 ` bug#53185: " Ludovic Courtès
@ 2022-01-29  5:11   ` phodina via Guix-patches via
  0 siblings, 0 replies; 3+ messages in thread
From: phodina via Guix-patches via @ 2022-01-29  5:11 UTC (permalink / raw)
  To: Ludovic Courtès; +Cc: 53185-done

Thanks Ludo’,

> Hi,
>
> phodina phodina@protonmail.com skribis:
>
> > From e7995f7904fa6c51c8ef24e19cd5bb8396abe13d Mon Sep 17 00:00:00 2001
> >
> > From: Petr Hodina phodina@protonmail.com
> >
> > Date: Tue, 11 Jan 2022 11:28:57 +0100
> >
> > Subject: [PATCH 2/3] gnu: Add python-pyowm.
> >
> > -   gnu/packages/python-web.scm (python-pyowm): New variable.
>
> [...]
>
> > From d3287c48bb665ac08e95b9e65bc21c79c4207894 Mon Sep 17 00:00:00 2001
> >
> > From: Petr Hodina phodina@protonmail.com
> >
> > Date: Tue, 11 Jan 2022 11:28:17 +0100
> >
> > Subject: [PATCH 1/3] gnu: Add python-geojson.
> >
> > -   gnu/packages/python-xyz.scm (python-geojson): New variable.
>
> [...]
>
> > From 1cb1ea2208e1575b3cdf5539644c9e4e435c0fab Mon Sep 17 00:00:00 2001
> >
> > From: Petr Hodina phodina@protonmail.com
> >
> > Date: Tue, 11 Jan 2022 11:29:23 +0100
> >
> > Subject: [PATCH 3/3] gnu: Add wfetch.
> >
> > -   gnu/packages/admin.scm (wfetch): New variable.
>
> Applied, after tweaking synopses/descriptions, moving wfetch to
>
> python-xyz.scm (since it has nothing to do with system administration)
>
> and fixing its ‘home-page’.
>
> Please pay attention to these things for subsequent patches and you may
>
> benefit from faster review in return. :-)
>
> Thanks,
>
> Ludo’.

I've checked the diffs and your synopsis as well as description are more appropriate.

I agree that the package wfetch belongs into python-xyz.scm as it does nothing special. The reason why I placed it in admin.scm was that I found about it due to pfetch and thought it's "smiliar". Then again it does not gather data from the system just fetches some weather info.

Thanks for catching the wrong homepage, as both projects were on github and had the same name it went unnoticed.

I'll be more vigilant next time :-)

----
Petr




^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2022-01-29  6:56 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-01-11 10:45 [bug#53185] [PATCH 1/3] gnu: Add python-geojson phodina via Guix-patches via
2022-01-28 22:55 ` bug#53185: " Ludovic Courtès
2022-01-29  5:11   ` [bug#53185] " phodina via Guix-patches via

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).