[PATCH] WIP: Add homeassistant.

  • Open
  • quality assurance status badge
Details
2 participants
  • phodina
  • Raghav Gururajan
Owner
unassigned
Submitted by
phodina
Severity
normal
P
P
phodina wrote on 25 Dec 2022 18:24
znLeCLDDKDEAuidADwa4L37YXCFmY8MRGVnIFwtk9zLJm8-Rlp-W7sJE51_TX9pKULrR81C6oOa6LCZ0LphgU27otG_eU696FPXlPwobo5I=@protonmail.com
Hi,

I'd love to add Home assistant to Guix to liberate our homes :-D

However, it has one nasty problem. There's one Python module 'orjson' which depends on rust package [1]. Since it would mean to add a lot of Rust packages I'd like to ask for help if there isn't a better way to build the package 'orjson'? [2]

FIY Marius I saw you patch set where you mentioned module 'orjson' as test dependency [3]

Just out of curiosity have you been able to package the Home assistant? [4]

$ /gnu/store/8dgdzxj7vvawbd77q405fbjm4rnjdxld-homeassistant-2022.12.8/bin/hass
Traceback (most recent call last):
File "/gnu/store/8dgdzxj7vvawbd77q405fbjm4rnjdxld-homeassistant-2022.12.8/bin/.hass-real", line 5, in <module>
sys.exit (mod.main ())
File "/gnu/store/8dgdzxj7vvawbd77q405fbjm4rnjdxld-homeassistant-2022.12.8/lib/python3.9/site-packages/homeassistant/__main__.py", line 169, in main
args = get_arguments()
File "/gnu/store/8dgdzxj7vvawbd77q405fbjm4rnjdxld-homeassistant-2022.12.8/lib/python3.9/site-packages/homeassistant/__main__.py", line 69, in get_arguments
from . import config as config_util
File "/gnu/store/8dgdzxj7vvawbd77q405fbjm4rnjdxld-homeassistant-2022.12.8/lib/python3.9/site-packages/homeassistant/config.py", line 20, in <module>
from . import auth
File "/gnu/store/8dgdzxj7vvawbd77q405fbjm4rnjdxld-homeassistant-2022.12.8/lib/python3.9/site-packages/homeassistant/auth/__init__.py", line 12, in <module>
from homeassistant import data_entry_flow
File "/gnu/store/8dgdzxj7vvawbd77q405fbjm4rnjdxld-homeassistant-2022.12.8/lib/python3.9/site-packages/homeassistant/data_entry_flow.py", line 16, in <module>
from .core import HomeAssistant, callback
File "/gnu/store/8dgdzxj7vvawbd77q405fbjm4rnjdxld-homeassistant-2022.12.8/lib/python3.9/site-packages/homeassistant/core.py", line 46, in <module>
from . import block_async_io, loader, util
File "/gnu/store/8dgdzxj7vvawbd77q405fbjm4rnjdxld-homeassistant-2022.12.8/lib/python3.9/site-packages/homeassistant/loader.py", line 34, in <module>
from .helpers.json import JSON_DECODE_EXCEPTIONS, json_loads
File "/gnu/store/8dgdzxj7vvawbd77q405fbjm4rnjdxld-homeassistant-2022.12.8/lib/python3.9/site-packages/homeassistant/helpers/json.py", line 7, in <module>
import orjsonModuleNotFoundError: No module named 'orjson'


----
Petr
Attachment: file
From ca6bdd2758e02c239e2c31a64997b8022f7c43bf Mon Sep 17 00:00:00 2001
From: Petr Hodina <phodina@protonmail.com>
Date: Sun, 25 Dec 2022 16:56:06 +0100
Subject: [PATCH 02/11] gnu: Add python-lru-dict.

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

Toggle diff (31 lines)
diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm
index 3ea2763b49..b1b0bb46fb 100644
--- a/gnu/packages/python-xyz.scm
+++ b/gnu/packages/python-xyz.scm
@@ -5704,6 +5704,24 @@ (define-public python-feedgenerator
which can produce feeds in RSS 2.0, RSS 0.91, and Atom formats.")
(license license:bsd-3)))
+(define-public python-lru-dict
+ (package
+ (name "python-lru-dict")
+ (version "1.1.8")
+ (source (origin
+ (method url-fetch)
+ (uri (pypi-uri "lru-dict" version))
+ (sha256
+ (base32
+ "059i1c6yw02dwfynl4602jwfhhfvhm2wzhfzafwwzrbk83pwi2w7"))))
+ (build-system python-build-system)
+ (native-inputs (list python-pytest))
+ (home-page "https://github.com/amitdev/lru-dict")
+ (synopsis "Fixed size dict like container")
+ (description "This package provides fixed size dict like container which
+evicts Least Recently Used (LRU) items once size limit is exceeded.")
+ (license license:expat)))
+
(define-public python-lsp-jsonrpc
(package
(name "python-lsp-jsonrpc")
--
2.38.1
From 65217ed1fb1d4cf3667a6ce1ca270504dc7fa585 Mon Sep 17 00:00:00 2001
From: Petr Hodina <phodina@protonmail.com>
Date: Sun, 25 Dec 2022 17:04:43 +0100
Subject: [PATCH 11/11] ! gnu: Add homeassistant.

* gnu/packages/engineering.scm (homeassistant): New variable.

Toggle diff (92 lines)
diff --git a/gnu/packages/engineering.scm b/gnu/packages/engineering.scm
index ee224ad173..ab225f398f 100644
--- a/gnu/packages/engineering.scm
+++ b/gnu/packages/engineering.scm
@@ -69,9 +69,11 @@ (define-module (gnu packages engineering)
#:use-module (guix build-system gnu)
#:use-module (guix build-system meson)
#:use-module (guix build-system python)
+ #:use-module (guix build-system pyproject)
#:use-module (guix build-system qt)
#:use-module (gnu packages)
#:use-module (gnu packages algebra)
+ #:use-module (gnu packages astronomy)
#:use-module (gnu packages autotools)
#:use-module (gnu packages base)
#:use-module (gnu packages bash)
@@ -130,6 +132,7 @@ (define-module (gnu packages engineering)
#:use-module (gnu packages pretty-print)
#:use-module (gnu packages protobuf)
#:use-module (gnu packages python)
+ #:use-module (gnu packages python-build)
#:use-module (gnu packages python-check)
#:use-module (gnu packages python-crypto)
#:use-module (gnu packages python-science)
@@ -146,6 +149,7 @@ (define-module (gnu packages engineering)
#:use-module (gnu packages tcl)
#:use-module (gnu packages texinfo)
#:use-module (gnu packages text-editors)
+ #:use-module (gnu packages time)
#:use-module (gnu packages tls)
#:use-module (gnu packages tex)
#:use-module (gnu packages version-control)
@@ -1440,6 +1444,57 @@ (define-public harminv
determines the frequencies, decay constants, amplitudes, and phases of those sinusoids.")
(license license:gpl2+)))
+(define-public homeassistant
+ (package
+ (name "homeassistant")
+ (version "2022.12.8")
+ (source (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/home-assistant/core")
+ (commit version)))
+ (sha256
+ (base32
+ "0cjw73i2ix6zpy6bagwbasyfphllqsq8hmzxkldh75hbh78h1750"))))
+ (build-system pyproject-build-system)
+ ;; TODO: Remove once python-orjson is packaged
+ (arguments
+ (list #:tests? #f ;missing orjson
+ #:phases #~(modify-phases %standard-phases
+ (delete 'sanity-check))))
+ (native-inputs (list python-pytest-socket python-requests-mock python-pip))
+ (propagated-inputs (list python-aiohttp
+ python-astral
+ python-async-timeout
+ python-atomicwrites
+ python-attrs
+ python-awesomeversion
+ python-bcrypt
+ python-certifi
+ python-ciso8601
+ python-cryptography
+ python-home-assistant-bluetooth
+ python-httpx
+ python-ifaddr
+ python-jinja2
+ python-lru-dict
+ python-freezegun
+ ;; python-orjson
+ python-pyjwt
+ python-pyyaml
+ python-requests
+ python-slugify-4
+ python-typing-extensions
+ python-voluptuous
+ python-voluptuous-serialize
+ python-yarl))
+ (home-page "https://www.home-assistant.io/")
+ (synopsis "home automation platform")
+ (description
+ "This package provides home automation that puts local control
+and privacy first.")
+ (license license:asl2.0)))
+
(define-public guile-libctl
(package
(name "guile-libctl")
--
2.38.1
From 65e2961c4af21ffac88871ce1d9a4c0944ce7b18 Mon Sep 17 00:00:00 2001
From: Petr Hodina <phodina@protonmail.com>
Date: Sun, 25 Dec 2022 16:56:44 +0100
Subject: [PATCH 03/11] gnu: Add python-awesomeversion.

* gnu/pacakges/python-xyz.scm (python-awesomeversion): New variable.

Toggle diff (30 lines)
diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm
index b1b0bb46fb..3baa1b0b01 100644
--- a/gnu/packages/python-xyz.scm
+++ b/gnu/packages/python-xyz.scm
@@ -9464,6 +9464,23 @@ (define-public python-asttokens
for automated refactoring or highlighting.")
(license license:asl2.0)))
+(define-public python-awesomeversion
+ (package
+ (name "python-awesomeversion")
+ (version "22.9.0")
+ (source (origin
+ (method url-fetch)
+ (uri (pypi-uri "awesomeversion" version))
+ (sha256
+ (base32
+ "0zkzl6kpl19rp98rszm63pqzb5imvc6iamp1ljr107p86g9r0h9g"))))
+ (build-system python-build-system)
+ (home-page "https://github.com/ludeeus/awesomeversion")
+ (synopsis "Version parsing and comparison")
+ (description "This package provides semantic version parsing and
+comparison.")
+ (license license:expat)))
+
(define-public python-littleutils
(package
(name "python-littleutils")
--
2.38.1
From 341ab116cd6a697583a4a47e391d771c81439a90 Mon Sep 17 00:00:00 2001
From: Petr Hodina <phodina@protonmail.com>
Date: Sun, 25 Dec 2022 17:02:03 +0100
Subject: [PATCH 08/11] gnu: Add python-yarl: Update to 1.8.1.

* gnu/packages/python-web.scm (python-yarl): Update to 1.8.1.

Toggle diff (23 lines)
diff --git a/gnu/packages/python-web.scm b/gnu/packages/python-web.scm
index 15f22925f6..922be35c68 100644
--- a/gnu/packages/python-web.scm
+++ b/gnu/packages/python-web.scm
@@ -4685,14 +4685,14 @@ (define-public python-pycares
(define-public python-yarl
(package
(name "python-yarl")
- (version "1.6.3")
+ (version "1.8.1")
(source
(origin
(method url-fetch)
(uri (pypi-uri "yarl" version))
(sha256
(base32
- "045z4ssg8g5h0qhz8hnx74hswgkndaldqq1xi5l1n5s0j996d44a"))
+ "1gxba93lyccxv0zkfy8kfrxananxyav75zq5avmn1q62p12pi25g"))
(modules '((guix build utils)))
(snippet
#~(begin
--
2.38.1
From 9d91f8ecb760e115a77e6de2f552900aee4820ec Mon Sep 17 00:00:00 2001
From: Petr Hodina <phodina@protonmail.com>
Date: Sun, 25 Dec 2022 17:00:11 +0100
Subject: [PATCH 06/11] gnu: python-voluptuous: Update to 0.13.1.

* gnu/packages/python-xyz.scm (python-voluptuous): Update 0.13.1.

Toggle diff (23 lines)
diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm
index 5bf30c0184..be971d3bc1 100644
--- a/gnu/packages/python-xyz.scm
+++ b/gnu/packages/python-xyz.scm
@@ -27119,14 +27119,14 @@ (define-public python-osc
(define-public python-voluptuous
(package
(name "python-voluptuous")
- (version "0.11.7")
+ (version "0.13.1")
(source
(origin
(method url-fetch)
(uri (pypi-uri "voluptuous" version))
(sha256
(base32
- "0mplkcpb5d8wjf8vk195fys4y6a3wbibiyf708imw33lphfk9g1a"))))
+ "08wp91dn1ibsmjd0660hpldq5ii9xqmg9h6l2k5p6rqxc0h1rlz8"))))
(build-system python-build-system)
(native-inputs
(list python-nose))
--
2.38.1
From 2dc08ab845aef62453e2a5afa0975e64ee8d8e87 Mon Sep 17 00:00:00 2001
From: Petr Hodina <phodina@protonmail.com>
Date: Sun, 25 Dec 2022 16:58:53 +0100
Subject: [PATCH 05/11] gnu: python-typing-extensions-next: Update to 4.4.0.

* gnu/packages/python-xyz.scm (python-typing-extensions-next): Update to
4.4.0.
[arguments]: Remove phase 'enter-source-directory.

Toggle diff (28 lines)
diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm
index 32e37b4eed..5bf30c0184 100644
--- a/gnu/packages/python-xyz.scm
+++ b/gnu/packages/python-xyz.scm
@@ -22510,7 +22510,7 @@ (define-public python-typing-extensions-next
(package
(inherit python-typing-extensions)
(name "python-typing-extensions")
- (version "4.2.0")
+ (version "4.4.0")
(source (origin
(method git-fetch)
(uri (git-reference
@@ -22519,7 +22519,11 @@ (define-public python-typing-extensions-next
(file-name (git-file-name name version))
(sha256
(base32
- "1bbry1rg7q5ppkgzdk4nwl7q1w8bbhajm4q68wb9dm6rf7hg1023"))))))
+ "1al7634rq9zqw1s7d1nbry0l23c05s0wrc8jihcxvy1bp55l648m"))))
+ (arguments
+ (substitute-keyword-arguments (package-arguments python-typing-extensions)
+ ((#:phases phases)
+ (delete 'enter-source-directory))))))
(define-public bpython
(package
--
2.38.1
From fbf092a0023c1dd7b570d41e254420cb2e048d10 Mon Sep 17 00:00:00 2001
From: Petr Hodina <phodina@protonmail.com>
Date: Sun, 25 Dec 2022 16:57:17 +0100
Subject: [PATCH 04/11] gnu: Add python-dbus-fast.

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

Toggle diff (30 lines)
diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm
index 3baa1b0b01..32e37b4eed 100644
--- a/gnu/packages/python-xyz.scm
+++ b/gnu/packages/python-xyz.scm
@@ -9912,6 +9912,23 @@ (define-public python-dbus-next
mobile environments.")
(license license:expat)))
+(define-public python-dbus-fast
+ (package
+ (name "python-dbus-fast")
+ (version "1.83.1")
+ (source (origin
+ (method url-fetch)
+ (uri (pypi-uri "dbus_fast" version))
+ (sha256
+ (base32
+ "0cwdxs3sj4czcjy1x1yjxwacacxjdfqc1jpc034crcrhbpp9n9ij"))))
+ (build-system python-build-system)
+ (propagated-inputs (list python-async-timeout))
+ (home-page "https://github.com/bluetooth-devices/dbus-fast")
+ (synopsis "Faster version of dbus-next")
+ (description "This package provides a faster version of dbus-next")
+ (license license:expat)))
+
(define-public python-notify2
(package
(name "python-notify2")
--
2.38.1
From 62dbbb1af6b2817d1c5c1fbbcec441a6376121ec Mon Sep 17 00:00:00 2001
From: Petr Hodina <phodina@protonmail.com>
Date: Sun, 25 Dec 2022 16:46:09 +0100
Subject: [PATCH 01/11] gnu: Add python-slugify-4.

* gnu/package/python-web.scm (python-slugify-4): New variable.

Toggle diff (25 lines)
diff --git a/gnu/packages/python-web.scm b/gnu/packages/python-web.scm
index 18c0b47b67..15f22925f6 100644
--- a/gnu/packages/python-web.scm
+++ b/gnu/packages/python-web.scm
@@ -5060,6 +5060,18 @@ (define-public python-slugify
library to create slugs from unicode strings while keeping it DRY.")
(license license:expat)))
+(define-public python-slugify-4
+ (package
+ (inherit python-slugify)
+ (name "python-slugify")
+ (version "4.0.1")
+ (source (origin
+ (method url-fetch)
+ (uri (pypi-uri "python-slugify" version))
+ (sha256
+ (base32
+ "0w22fapghmzk3xdasc4dn7h8sl58l08d1h5zbf72dh80drv1g9b9"))))))
+
(define-public python-branca
(package
(name "python-branca")
--
2.38.1
From 0c9a3d85178c14cfa1aa9e3c85ce1968bafb4829 Mon Sep 17 00:00:00 2001
From: Petr Hodina <phodina@protonmail.com>
Date: Sun, 25 Dec 2022 17:02:48 +0100
Subject: [PATCH 09/11] gnu: Add python-bleak.

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

Toggle diff (35 lines)
diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm
index 655724d95a..bb734ee6ea 100644
--- a/gnu/packages/python-xyz.scm
+++ b/gnu/packages/python-xyz.scm
@@ -13789,6 +13789,28 @@ (define-public python-bleach
(description "Bleach is an easy whitelist-based HTML-sanitizing tool.")
(license license:asl2.0)))
+(define-public python-bleak
+ (package
+ (name "python-bleak")
+ (version "0.19.5")
+ (source (origin
+ (method url-fetch)
+ (uri (pypi-uri "bleak" version))
+ (sha256
+ (base32
+ "126dwfd9w4aflwxz5lxw6h2q0miigd548df7668c2n1w8nb5m147"))))
+ (build-system python-build-system)
+ (arguments
+ (list #:tests? #f))
+ (propagated-inputs (list python-async-timeout
+ python-dbus-fast
+ python-typing-extensions))
+ (home-page "https://github.com/hbldh/bleak")
+ (synopsis "Bluetooth Low Energy platform Agnostic Klient")
+ (description "This package provides GATT client software using
+asyncio.")
+ (license license:expat)))
+
(define-public python-entrypoints
(package
(name "python-entrypoints")
--
2.38.1
From bff394cbce48b9e59b72b5b4c2bfefd2ede2d595 Mon Sep 17 00:00:00 2001
From: Petr Hodina <phodina@protonmail.com>
Date: Sun, 25 Dec 2022 17:01:13 +0100
Subject: [PATCH 07/11] gnu: Add python-voluptuous-serialize.

* gnu/packages/python-xyz.scm (python-voluptuous-serialize): New variable.
[native-inputs]: Use python-pytest instead of python-nose.

Toggle diff (40 lines)
diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm
index be971d3bc1..655724d95a 100644
--- a/gnu/packages/python-xyz.scm
+++ b/gnu/packages/python-xyz.scm
@@ -27129,7 +27129,7 @@ (define-public python-voluptuous
"08wp91dn1ibsmjd0660hpldq5ii9xqmg9h6l2k5p6rqxc0h1rlz8"))))
(build-system python-build-system)
(native-inputs
- (list python-nose))
+ (list python-pytest))
(home-page "https://github.com/alecthomas/voluptuous")
(synopsis "Python data validation library")
(description
@@ -27137,6 +27137,24 @@ (define-public python-voluptuous
intended for validating data coming into Python as JSON, YAML, etc.")
(license license:bsd-3)))
+(define-public python-voluptuous-serialize
+ (package
+ (name "python-voluptuous-serialize")
+ (version "2.5.0")
+ (source (origin
+ (method url-fetch)
+ (uri (pypi-uri "voluptuous-serialize" version))
+ (sha256
+ (base32
+ "0ys43byjwhsmzjj9q2dgn8k94p3my2s7f1vf0q1swwprlkhg4nak"))))
+ (build-system python-build-system)
+ (propagated-inputs (list python-voluptuous))
+ (home-page "https://github.com/home-assistant-libs/voluptuous-serialize")
+ (synopsis "Convert voluptuous schemas to dictionaries")
+ (description "This package provides library for converting
+voluptuous schemas to dictionaries")
+ (license license:asl2.0)))
+
(define-public python-cmd2
(package
(name "python-cmd2")
--
2.38.1
From 8859d65e8236009ebe605ab8089958ae2c1ef35a Mon Sep 17 00:00:00 2001
From: Petr Hodina <phodina@protonmail.com>
Date: Sun, 25 Dec 2022 17:04:06 +0100
Subject: [PATCH 10/11] gnu: Add python-home-assistant-bluetooth.

* gnu/packages/python-xyz.scm (python-home-assistant-bluetooth): New
variable.

Toggle diff (32 lines)
diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm
index bb734ee6ea..c4eb7aaba6 100644
--- a/gnu/packages/python-xyz.scm
+++ b/gnu/packages/python-xyz.scm
@@ -8479,6 +8479,25 @@ (define-public python-gridmap
cluster without needing to write any wrapper code yourself.")
(license license:gpl3+)))
+(define-public python-home-assistant-bluetooth
+ (package
+ (name "python-home-assistant-bluetooth")
+ (version "1.9.0")
+ (source (origin
+ (method url-fetch)
+ (uri (pypi-uri "home_assistant_bluetooth" version))
+ (sha256
+ (base32
+ "0jcb7l8pn30dsh3rhkcmd5h9b7r7igpqi4kk9wz0lzlqi0568a45"))))
+ (build-system python-build-system)
+ (propagated-inputs (list python-bleak))
+ (home-page
+ "https://github.com/home-assistant-libs/home-assistant-bluetooth")
+ (synopsis "Home Assistant Bluetooth Models and Helpers")
+ (description "This package provides helpers for accessing Home
+Assistant Bluetooth models.")
+ (license license:asl2.0)))
+
(define-public python-honcho
(package
(name "python-honcho")
--
2.38.1
R
R
Raghav Gururajan wrote on 26 Dec 2022 06:11
(name . phodina)(address . phodina@protonmail.com)
634278b7-4dd9-a561-e022-0cde3b6714d9@raghavgururajan.name
Petr,
Toggle quote (1 lines)
> I'd love to add Home assistant to Guix to liberate our homes :-D
Woah! Thanks so much for working on this. I've been eyeing at
homeassitant for a while. :D
Toggle quote (1 lines)
> However, it has one nasty problem. There's one Python module 'orjson' which depends on rust package [1]. Since it would mean to add a lot of Rust packages I'd like to ask for help if there isn't a better way to build the package 'orjson'?
I'd like to help. Let's see if we can avoid that dependency. If we
can't, I'll aid this work with packing the related rust packages.
Toggle quote (1 lines)
> Just out of curiosity have you been able to package the Home assistant?
Darn! I forgot that I created that post. I must've working on that and
lost the work because of SSD failure happened midst 2021. :(
Regards,
RG.
Attachment: OpenPGP_signature
P
P
phodina wrote on 27 Dec 2022 23:06
(name . Raghav Gururajan)(address . rg@raghavgururajan.name)
GbwhtL97GyJGV2-KL-uY0aKQINkXGFRmj1MoeO25f5LnR_Fbg-dW2SH6kkGyqOhaPinfulGyzIn0dHbcFXPolDRvoJynfrPihIEQGYnuQxY=@protonmail.com
Toggle quote (12 lines)
>> > I'd love to add Home assistant to Guix to liberate our homes :-D
>
>
> Woah! Thanks so much for working on this. I've been eyeing at
> homeassitant for a while. :D
>
> > However, it has one nasty problem. There's one Python module 'orjson' which depends on rust package [1]. Since it would mean to add a lot of Rust packages I'd like to ask for help if there isn't a better way to build the package 'orjson'?
>
>
> I'd like to help. Let's see if we can avoid that dependency. If we
> can't, I'll aid this work with packing the related rust packages.

Here are the additional Python packages from the orjson module repo from various requirements.txt.
Please consider them more WIP as they build and allow you to have a look around the 'python-orjson'.
I also have the Rust modules, but packaging them is quite tedious as it's almost 3k lines of code :-/
Any ideas here?

Toggle quote (7 lines)
>
> > Just out of curiosity have you been able to package the Home assistant?
>
>
> Darn! I forgot that I created that post. I must've working on that and
> lost the work because of SSD failure happened midst 2021. :(

Home the 'smartmontools' might save you from similar thing in future :-)

----
Petr
From 5e1fa4cdebd127d37a19cc1f01098cea7d3ae2d4 Mon Sep 17 00:00:00 2001
From: Petr Hodina <phodina@protonmail.com>
Date: Tue, 27 Dec 2022 22:58:46 +0100
Subject: [PATCH 05/10] gnu: Add python-pytest-random-order.

* gnu/packages/python-xyz.scm (python-pytest-random-order): New variable.

Toggle diff (33 lines)
diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm
index 985d36ba49..d98a442fde 100644
--- a/gnu/packages/python-xyz.scm
+++ b/gnu/packages/python-xyz.scm
@@ -12729,6 +12729,26 @@ (define-public python-pytest-black
Python code formatter \"black\".")
(license license:expat)))
+(define-public python-pytest-random-order
+ (package
+ (name "python-pytest-random-order")
+ (version "1.1.0")
+ (source (origin
+ (method url-fetch)
+ (uri (pypi-uri "pytest-random-order" version))
+ (sha256
+ (base32
+ "01annkcqxxi17ngafa8mrjxlvpbp6pmxpvf99jcaz9skjfxxxrnv"))))
+ (build-system python-build-system)
+ (propagated-inputs (list python-pytest))
+ (home-page "https://github.com/jbasko/pytest-random-order")
+ (synopsis
+ "Randomise the order in which pytest tests are run with some control over the randomness")
+ (description
+ "Randomise the order in which pytest tests are run with some control over the
+randomness")
+ (license license:expat)))
+
(define-public python-geojson
(package
(name "python-geojson")
--
2.38.1
From 81bc7b36643300b9a67ffae7a4cb5f11fb9d3032 Mon Sep 17 00:00:00 2001
From: Petr Hodina <phodina@protonmail.com>
Date: Tue, 27 Dec 2022 23:00:04 +0100
Subject: [PATCH 07/10] gnu: Add python-types-python-dateutil.

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

Toggle diff (30 lines)
diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm
index 2e08e6cf2b..48044a3ef3 100644
--- a/gnu/packages/python-xyz.scm
+++ b/gnu/packages/python-xyz.scm
@@ -30569,6 +30569,23 @@ (define-public python-types-protobuf
collection.")
(license license:asl2.0)))
+(define-public python-types-python-dateutil
+ (package
+ (name "python-types-python-dateutil")
+ (version "2.8.19.5")
+ (source (origin
+ (method url-fetch)
+ (uri (pypi-uri "types-python-dateutil" version))
+ (sha256
+ (base32
+ "17bsv3j5lmq60px9q8zhaj5f7pv81i6xfg8dlpcpczazf5gzr4db"))))
+ (build-system python-build-system)
+ (home-page "https://github.com/python/typeshed")
+ (synopsis "Typing stubs for python-dateutil")
+ (description "This package provides collection of library stubs for Python,
+with static types for python-dateutil.")
+ (license license:asl2.0)))
+
(define-public python-types-pytz
(package
(name "python-types-pytz")
--
2.38.1
From 4eafcd5a1d5ddaff75636122a7885b33a77d8b94 Mon Sep 17 00:00:00 2001
From: Petr Hodina <phodina@protonmail.com>
Date: Tue, 27 Dec 2022 22:56:43 +0100
Subject: [PATCH 03/10] gnu: python-pytest-benchmark: Update to 4.0.0.

* gnu/packages/python-check.scm (python-pytest-benchmark): Update to 4.0.0.

Toggle diff (28 lines)
diff --git a/gnu/packages/python-check.scm b/gnu/packages/python-check.scm
index 8ab3b5641e..d7d1ccbaaf 100644
--- a/gnu/packages/python-check.scm
+++ b/gnu/packages/python-check.scm
@@ -1315,14 +1315,13 @@ (define-public python-pytest-pycodestyle
(define-public python-pytest-benchmark
(package
(name "python-pytest-benchmark")
- (version "3.4.1")
- (source
- (origin
- (method url-fetch)
- (uri (pypi-uri "pytest-benchmark" version))
- (sha256
- (base32
- "0ivvrnhax2xr62grlgw4hlyjmmjp6nc35431j7c82nny2bwn7qj0"))))
+ (version "4.0.0")
+ (source (origin
+ (method url-fetch)
+ (uri (pypi-uri "pytest-benchmark" version))
+ (sha256
+ (base32
+ "1la802m5r49y1zqilmhqh0qvbnz139lw0qb3jmm9lngy7sw8a1zv"))))
(build-system python-build-system)
(arguments
'(#:test-target "check"))
--
2.38.1
From 9fe93b8afdcf3149d19c05bf9077d5c38b4350b7 Mon Sep 17 00:00:00 2001
From: Petr Hodina <phodina@protonmail.com>
Date: Tue, 27 Dec 2022 22:59:28 +0100
Subject: [PATCH 06/10] gnu: Add python-memory-profiler.

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

Toggle diff (32 lines)
diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm
index d98a442fde..2e08e6cf2b 100644
--- a/gnu/packages/python-xyz.scm
+++ b/gnu/packages/python-xyz.scm
@@ -17613,6 +17613,25 @@ (define-public python-memcached
more, possibly remote, memcached servers.")
(license license:psfl)))
+(define-public python-memory-profiler
+ (package
+ (name "python-memory-profiler")
+ (version "0.61.0")
+ (source (origin
+ (method url-fetch)
+ (uri (pypi-uri "memory_profiler" version))
+ (sha256
+ (base32
+ "1c3743d7dnnsv6caca38s0sgk3p7lf13x83nzf9147aahvbp6nsf"))))
+ (build-system python-build-system)
+ (propagated-inputs (list python-psutil))
+ (home-page "https://github.com/pythonprofilers/memory_profiler")
+ (synopsis "Monitor memory usage of a python program")
+ (description
+ "This package provides a module for monitoring memory usage of a python
+program")
+ (license license:bsd-3)))
+
(define-public python-mergedeep
(package
(name "python-mergedeep")
--
2.38.1
From 063ea2790d55780943a0bd07be64421106b22d4d Mon Sep 17 00:00:00 2001
From: Petr Hodina <phodina@protonmail.com>
Date: Mon, 26 Dec 2022 10:50:19 +0100
Subject: [PATCH] gnu: system-settings: Add phase 'wrap-executable and
additional inputs.

* gnu/packages/kde-plasma.scm (system-settings)[inputs]: Add qtquickcontrols-5.
[arguments]: Add phase 'wrap-executable.
[inputs]: Add kcoreaddons, kdeclarative, knewstuff, kuserfeedback,
qtgraphicaleffects and qtquickcontrols2-5.

Toggle diff (62 lines)
diff --git a/gnu/packages/kde-plasma.scm b/gnu/packages/kde-plasma.scm
index 89405bacaa..157ac3e1dd 100644
--- a/gnu/packages/kde-plasma.scm
+++ b/gnu/packages/kde-plasma.scm
@@ -2495,9 +2495,34 @@ (define-public system-settings
(base32
"0n7mf6ygi8fgn1m6pk2fadnqj1h58mxqni3h19xbi373wfypq5fl"))))
(build-system qt-build-system)
+ (arguments
+ (list #:phases #~(modify-phases %standard-phases
+ (add-after 'install 'wrap-executable
+ (lambda* (#:key inputs #:allow-other-keys)
+ (let ((out #$output)
+ (qml "/lib/qt5/qml"))
+ (wrap-program (string-append out
+ "/bin/systemsettings5")
+ `("QML2_IMPORT_PATH" ":" prefix
+ (,(string-append out qml)
+ ,@(map (lambda (i)
+ (string-append
+ (assoc-ref inputs i) qml))
+ '("kirigami"
+ "kcoreaddons"
+ "kdeclarative"
+ "knewstuff"
+ "kuserfeedback"
+ "plasma-workspace"
+ "qtdeclarative"
+ "qtgraphicaleffects"
+ "qtquickcontrols"
+ "qtquickcontrols2")))))))))))
(native-inputs (list extra-cmake-modules))
(inputs (list kauth
kcrash
+ kcoreaddons
+ kdeclarative
kitemviews
kitemmodels
kcmutils
@@ -2511,14 +2536,19 @@ (define-public system-settings
kdbusaddons
kconfig
kpackage
+ knewstuff
kactivities
kactivities-stats
kguiaddons
kirigami
knotifications
krunner
+ kuserfeedback
plasma-workspace
- qtdeclarative-5))
+ qtdeclarative-5
+ qtgraphicaleffects
+ qtquickcontrols-5
+ qtquickcontrols2-5))
(synopsis "Control center to configure Plasma Desktop")
(description "This package provides configuration UI for Plasma Desktop.")
(home-page "https://invent.kde.org/plasma/systemsettings")
--
2.38.1
From 8212bbc5ecf66f73ecc95d477be4d12079cd6c4a Mon Sep 17 00:00:00 2001
From: Petr Hodina <phodina@protonmail.com>
Date: Tue, 27 Dec 2022 22:55:54 +0100
Subject: [PATCH 02/10] gnu: Add python-benchmark.

* gnu/packages/python-check.scm (python-benchmark): New variable.

Toggle diff (29 lines)
diff --git a/gnu/packages/python-check.scm b/gnu/packages/python-check.scm
index 486abf1c13..8ab3b5641e 100644
--- a/gnu/packages/python-check.scm
+++ b/gnu/packages/python-check.scm
@@ -109,6 +109,22 @@ (define-public python-beartype
written in pure Python.")
(license license:expat)))
+(define-public python-benchmark
+ (package
+ (name "python-benchmark")
+ (version "0.1.5")
+ (source (origin
+ (method url-fetch)
+ (uri (pypi-uri "benchmark" version))
+ (sha256
+ (base32
+ "08vwzlr5n2r0sf0niv1hvdk3n2wy93x2cs2yw7c2w7c3cmbb51qg"))))
+ (build-system python-build-system)
+ (home-page "http://jspi.es/benchmark")
+ (synopsis "Python benchmarker / benchmarking framework")
+ (description "Python benchmarker / benchmarking framework")
+ (license license:asl2.0)))
+
(define-public python-pytest-click
(package
(name "python-pytest-click")
--
2.38.1
From b12d61ec74fc8fe8e4782cb932b9393b99f26811 Mon Sep 17 00:00:00 2001
From: Petr Hodina <phodina@protonmail.com>
Date: Tue, 27 Dec 2022 22:58:17 +0100
Subject: [PATCH 04/10] gnu: Add python-statistics.

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

Toggle diff (32 lines)
diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm
index 13b9129a3d..985d36ba49 100644
--- a/gnu/packages/python-xyz.scm
+++ b/gnu/packages/python-xyz.scm
@@ -9543,6 +9543,25 @@ (define-public python-stack-data
than the default.")
(license license:expat)))
+(define-public python-statistics
+ (package
+ (name "python-statistics")
+ (version "1.0.3.5")
+ (source (origin
+ (method url-fetch)
+ (uri (pypi-uri "statistics" version))
+ (sha256
+ (base32
+ "0f61hrj25p60kvf09nqysd6xlccm5dmx1jl8akfjvgq71fw7khrd"))))
+ (build-system python-build-system)
+ (arguments (list #:tests? #f))
+ (propagated-inputs (list python-docutils))
+ (home-page "UNKNOWN")
+ (synopsis "A Python 2.* port of 3.4 Statistics Module")
+ (description
+ "This package provides a Python 2.* port of 3.4 Statistics Module")
+ (license #f)))
+
(define-public python-ipython
(package
(name "python-ipython")
--
2.38.1
From 91ed56a730c40ea0d52e53e3bbbd42b24859efc5 Mon Sep 17 00:00:00 2001
From: Petr Hodina <phodina@protonmail.com>
Date: Tue, 27 Dec 2022 23:01:03 +0100
Subject: [PATCH 09/10] gnu: Add python-gunicorn.

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

Toggle diff (32 lines)
diff --git a/gnu/packages/python-web.scm b/gnu/packages/python-web.scm
index 922be35c68..01cab6712b 100644
--- a/gnu/packages/python-web.scm
+++ b/gnu/packages/python-web.scm
@@ -3612,6 +3612,25 @@ (define-public python-grequests
@code{Requests} with @code{Gevent} to make asynchronous HTTP Requests easily")
(license license:bsd-2)))
+(define-public python-gunicorn
+ (package
+ (name "python-gunicorn")
+ (version "20.1.0")
+ (source (origin
+ (method url-fetch)
+ (uri (pypi-uri "gunicorn" version))
+ (sha256
+ (base32
+ "1s7670qw36x90bgmazmgib170i5gnpyb2ypxzlla7y0mpasniag0"))))
+ (build-system python-build-system)
+ (arguments (list #:tests? #f)) ;; 1 failing test out of 223
+ (native-inputs (list python-pytest-cov python-aiohttp python-eventlet python-gevent))
+ (propagated-inputs (list python-setuptools))
+ (home-page "https://gunicorn.org")
+ (synopsis "WSGI HTTP Server for UNIX")
+ (description "WSGI HTTP Server for UNIX")
+ (license license:expat)))
+
(define-public python-dpkt
(package
(name "python-dpkt")
--
2.38.1
From 1898eda096589690a29f77679ae313701ee6ea4a Mon Sep 17 00:00:00 2001
From: Petr Hodina <phodina@protonmail.com>
Date: Tue, 27 Dec 2022 23:00:34 +0100
Subject: [PATCH 08/10] gnu: Add python-types-simplejson.

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

Toggle diff (29 lines)
diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm
index 48044a3ef3..91af772a4f 100644
--- a/gnu/packages/python-xyz.scm
+++ b/gnu/packages/python-xyz.scm
@@ -30604,6 +30604,22 @@ (define-public python-types-pytz
collection.")
(license license:asl2.0)))
+(define-public python-types-simplejson
+ (package
+ (name "python-types-simplejson")
+ (version "3.18.0.0")
+ (source (origin
+ (method url-fetch)
+ (uri (pypi-uri "types-simplejson" version))
+ (sha256
+ (base32
+ "0lizf6aiiphvd3l02gk6qm16i6p7a98rdgh3s786bg8a349xnyl5"))))
+ (build-system python-build-system)
+ (home-page "https://github.com/python/typeshed")
+ (synopsis "Typing stubs for simplejson")
+ (description "Typing stubs for simplejson")
+ (license license:asl2.0)))
+
(define-public python-types-toml
(package
(name "python-types-toml")
--
2.38.1
P
P
phodina wrote on 14 Jan 2023 20:54
(name . Raghav Gururajan)(address . rg@raghavgururajan.name)
0K1rS9pJrtvAOaPlonQccah1RVMPVYOostf5r9OIL5c4SoIp16GALP8OzIQ-hlaJ5cJiR6FJ-XpeXLhUXappq3FTSZmaE3vpRstxmI4QDBk=@protonmail.com
Hi Raghav,

have you had the time to check the Rust dependencies for the Python module `orjson`?

Kind regards
Petr
R
R
Raghav Gururajan wrote on 16 Jan 2023 04:53
(name . phodina)(address . phodina@protonmail.com)
ac0e4d8d-6b3e-f74a-26bd-5aec1110a515@raghavgururajan.name
Petr,
Toggle quote (1 lines)
> have you had the time to check the Rust dependencies for the Python module `orjson`?
Not yet, unfortunately.
I'll be working on the 21st and 22nd of this month. I'll let you know.
Regards,
RG.
Attachment: OpenPGP_signature
?
Your comment

Commenting via the web interface is currently disabled.

To comment on this conversation send an email to 60316@debbugs.gnu.org

To respond to this issue using the mumi CLI, first switch to it
mumi current 60316
Then, you may apply the latest patchset in this issue (with sign off)
mumi am -- -s
Or, compose a reply to this issue
mumi compose
Or, send patches to this issue
mumi send-email *.patch