1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2024-12-20 04:48:10 +00:00
nixpkgs/pkgs/development/python-modules/pyowm/default.nix
Lancelot SIX 2798da019f
pythonPackages.pyowm: disable python2
- Python2 support has been deprecated in 2.9 (https://github.com/csparpa/pyowm/releases/tag/2.9.0)
- Python-3.3 support dropped in 2.10 (https://github.com/csparpa/pyowm/releases/tag/2.10)
2019-08-22 15:01:22 +02:00

32 lines
787 B
Nix

{ lib, buildPythonPackage, fetchPypi, pythonOlder, requests, geojson }:
buildPythonPackage rec {
pname = "pyowm";
version = "2.10.0";
disabled = pythonOlder "3.3";
src = fetchPypi {
inherit pname version;
sha256 = "8fd41a18536f4d6c432bc6d9ea69994efb1ea9b43688cf19523659b6f4d86cf7";
};
propagatedBuildInputs = [ requests geojson ];
# This may actually break the package.
postPatch = ''
substituteInPlace setup.py \
--replace "requests>=2.18.2,<2.19" "requests" \
--replace "geojson>=2.3.0,<2.4" "geojson<2.5,>=2.3.0"
'';
# No tests in archive
doCheck = false;
meta = with lib; {
description = "A Python wrapper around the OpenWeatherMap web API";
homepage = https://pyowm.readthedocs.io/;
license = licenses.mit;
};
}