git.iko.soy/typeable/nixpkgs
on master help sign in
Merge pull request #108777 from fabaff/bump-pyhaversion
commite6a184aca0d0d3252a516c317afbfa30fcc7e5d7 authorSandro <sandro.jaeckel@gmail.com> dateWed 13 Jan 2021, 10:15 (6 years ago) parentf2380fe0b37194
3 files changed+67−17
pkgs/development/python-modules/awesomeversion/default.nix+39 pkgs/development/python-modules/pyhaversion/default.nix+26−17 pkgs/top-level/python-packages.nix+2
pkgs/development/python-modules/awesomeversion/default.nixnew file+39
@@ -0,0 +1,39 @@
1+{ lib
2+, buildPythonPackage
3+, fetchFromGitHub
4+, pytestCheckHook
5+, pythonOlder
6+, requests
7+}:
8+
9+buildPythonPackage rec {
10+ pname = "awesomeversion";
11+ version = "20.12.5";
12+ disabled = pythonOlder "3.8";
13+
14+ src = fetchFromGitHub {
15+ owner = "ludeeus";
16+ repo = pname;
17+ rev = version;
18+ sha256 = "1jwlfqnrqlxjp30fj9bcqh7vgicmpdbn5kjdcmll4srnl87lalfg";
19+ };
20+
21+ postPatch = ''
22+ substituteInPlace setup.py --replace "main" ${version}
23+ '';
24+
25+ propagatedBuildInputs = [ requests ];
26+
27+ checkInputs = [
28+ pytestCheckHook
29+ ];
30+
31+ pythonImportsCheck = [ "awesomeversion" ];
32+
33+ meta = with lib; {
34+ description = "Python module to deal with versions";
35+ homepage = "https://github.com/ludeeus/awesomeversion";
36+ license = with licenses; [ mit ];
37+ maintainers = with maintainers; [ fab ];
38+ };
39+}
pkgs/development/python-modules/pyhaversion/default.nix+26−17
@@ -1,40 +1,49 @@
11{ lib
2−, buildPythonPackage
3−, fetchPypi
4−, pythonOlder
52, aiohttp
3+, aresponses
64, async-timeout
7−, semantic-version
8−, pytestrunner
5+, awesomeversion
6+, buildPythonPackage
7+, fetchFromGitHub
8+, pythonAtLeast
9+, pytest-asyncio
10+, pytestCheckHook
911}:
12+
1013buildPythonPackage rec {
1114 pname = "pyhaversion";
12− version = "3.4.2";
13− disabled = pythonOlder "3.8";
15+ version = "20.12.1";
16+
17+ # Only 3.8.0 and beyond are supported
18+ disabled = pythonAtLeast "3.8";
1419
15− src = fetchPypi {
16− inherit pname version;
17− sha256 = "b4e49dfa0f9dae10edd072e630d902e5497daa312baad58b7df7618efe863377";
20+ src = fetchFromGitHub {
21+ owner = "ludeeus";
22+ repo = pname;
23+ rev = version;
24+ sha256 = "17yl67dgw75dghljcfwzblm11kqnh6sxf47w62mxz86aq9zrvcxd";
1825 };
1926
2027 propagatedBuildInputs = [
2128 aiohttp
2229 async-timeout
23− semantic-version
30+ awesomeversion
2431 ];
2532
26− buildInputs = [
27− pytestrunner
33+ checkInputs = [
34+ aresponses
35+ awesomeversion
36+ pytest-asyncio
37+ pytestCheckHook
2838 ];
2939
30− # no tests
31− doCheck = false;
3240 pythonImportsCheck = [ "pyhaversion" ];
3341
3442 meta = with lib; {
35− description = "A python module to the newest version number of Home Assistant";
43+ description = "Python module to the newest version number of Home Assistant";
3644 homepage = "https://github.com/ludeeus/pyhaversion";
45+ changelog = "https://github.com/ludeeus/pyhaversion/releases/tag/${version}";
3746 license = with licenses; [ mit ];
38− maintainers = [ maintainers.makefu ];
47+ maintainers = with maintainers; [ makefu ];
3948 };
4049}
pkgs/top-level/python-packages.nix+2
@@ -541,6 +541,8 @@ in {
541541
542542 awesome-slugify = callPackage ../development/python-modules/awesome-slugify { };
543543
544+ awesomeversion = callPackage ../development/python-modules/awesomeversion { };
545+
544546 awkward0 = callPackage ../development/python-modules/awkward0 { };
545547 awkward = callPackage ../development/python-modules/awkward { };
546548