git.iko.soy/typeable/nixpkgs
on master help sign in
Merge pull request #120281 from mweinelt/home-assistant

home-assistant: find unstable versions in parse-requirements.py

commit3ab9aaa5cf55ada3d8ebc28ab10fa71004422bde authorJörg Thalheim <Mic92@users.noreply.github.com> dateFri 23 Apr 2021, 05:57 (6 years ago) parentbc6fe91bf77354
4 files changed+8−4
pkgs/development/python-modules/slackclient/default.nix+1−1 pkgs/servers/home-assistant/component-packages.nix+2−2 pkgs/servers/home-assistant/default.nix+1 pkgs/servers/home-assistant/parse-requirements.py+4−1
pkgs/development/python-modules/slackclient/default.nix+1−1
@@ -18,7 +18,7 @@
1818}:
1919
2020buildPythonPackage rec {
21− pname = "python-slackclient";
21+ pname = "slackclient";
2222 version = "2.9.3";
2323
2424 disabled = !isPy3k;
pkgs/servers/home-assistant/component-packages.nix+2−2
@@ -90,7 +90,7 @@
9090 "blueprint" = ps: with ps; [ ];
9191 "bluesound" = ps: with ps; [ xmltodict ];
9292 "bluetooth_le_tracker" = ps: with ps; [ ]; # missing inputs: pygatt[GATTTOOL]
93− "bluetooth_tracker" = ps: with ps; [ bt_proximity ]; # missing inputs: pybluez
93+ "bluetooth_tracker" = ps: with ps; [ bt_proximity pybluez ];
9494 "bme280" = ps: with ps; [ smbus-cffi ]; # missing inputs: i2csense
9595 "bme680" = ps: with ps; [ bme680 smbus-cffi ];
9696 "bmp280" = ps: with ps; [ ]; # missing inputs: RPi.GPIO adafruit-circuitpython-bmp280
@@ -750,7 +750,7 @@
750750 "sky_hub" = ps: with ps; [ ]; # missing inputs: pyskyqhub
751751 "skybeacon" = ps: with ps; [ ]; # missing inputs: pygatt[GATTTOOL]
752752 "skybell" = ps: with ps; [ skybellpy ];
753− "slack" = ps: with ps; [ ]; # missing inputs: slackclient
753+ "slack" = ps: with ps; [ slackclient ];
754754 "sleepiq" = ps: with ps; [ sleepyq ];
755755 "slide" = ps: with ps; [ ]; # missing inputs: goslide-api
756756 "sma" = ps: with ps; [ pysma ];
pkgs/servers/home-assistant/default.nix+1
@@ -354,6 +354,7 @@ in with py.pkgs; buildPythonApplication rec {
354354 "sleepiq"
355355 "sma"
356356 "sensor"
357+ "slack"
357358 "smarttub"
358359 "smtp"
359360 "smappee"
pkgs/servers/home-assistant/parse-requirements.py+4−1
@@ -124,7 +124,10 @@ def name_to_attr_path(req: str, packages: Dict[str, Dict[str, str]]) -> Optional
124124 for name in names:
125125 # treat "-" and "_" equally
126126 name = re.sub("[-_]", "[-_]", name)
127− pattern = re.compile("^python\\d\\.\\d-{}-\\d".format(name), re.I)
127+ # python(minor).(major)-(pname)-(version or unstable-date)
128+ # we need the version qualifier, or we'll have multiple matches
129+ # (e.g. pyserial and pyserial-asyncio when looking for pyserial)
130+ pattern = re.compile("^python\\d\\.\\d-{}-(?:\\d|unstable-.*)".format(name), re.I)
128131 for attr_path, package in packages.items():
129132 if pattern.match(package["name"]):
130133 attr_paths.add(attr_path)