Merge pull request #195924 from fabaff/meteofrance-api-bump

python310Packages.meteofrance-api: 1.0.2 -> 1.1.0
This commit is contained in:
Fabian Affolter 2022-10-14 18:38:04 +02:00 committed by GitHub
commit d55c532819
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1,7 +1,6 @@
{ lib
, buildPythonPackage
, fetchFromGitHub
, fetchpatch
, poetry-core
, pytestCheckHook
, pythonOlder
@ -14,26 +13,18 @@
buildPythonPackage rec {
pname = "meteofrance-api";
version = "1.0.2";
version = "1.1.0";
format = "pyproject";
disabled = pythonOlder "3.6";
disabled = pythonOlder "3.7";
src = fetchFromGitHub {
owner = "hacf-fr";
repo = pname;
rev = "v${version}";
hash = "sha256-X8f0z9ZPXH7Wc3GqHmPptxpNxbHeezdOzw4gZCprumU=";
hash = "sha256-1ZN/9ur6uhK7M5TurmmWgUjzkc79MPqKnT637hbAAWA=";
};
patches = [
(fetchpatch {
# Switch to poetry-core
url = "https://github.com/hacf-fr/meteofrance-api/commit/7536993fe38dfe3d0833da3fd750be9277aeffa6.patch";
hash = "sha256-/4VgzoJxhaXoj1N1GNLJNvkQvv6IW9OcBJV6vg6kthM=";
})
];
nativeBuildInputs = [
poetry-core
];
@ -41,9 +32,8 @@ buildPythonPackage rec {
propagatedBuildInputs = [
pytz
requests
urllib3
] ++ lib.optionals (pythonOlder "3.7") [
typing-extensions
urllib3
];
checkInputs = [
@ -51,12 +41,6 @@ buildPythonPackage rec {
requests-mock
];
postPatch = ''
# https://github.com/hacf-fr/meteofrance-api/pull/378
substituteInPlace pyproject.toml \
--replace 'pytz = ">=2020.4,<2022.0"' 'pytz = ">=2020.4,<2023.0"'
'';
pythonImportsCheck = [
"meteofrance_api"
];