depot/third_party/nixpkgs/pkgs/development/python-modules/pyairvisual/default.nix
Default email c7f94ff3ce Project import generated by Copybara.
GitOrigin-RevId: b85ed9dcbf187b909ef7964774f8847d554fab3b
2023-08-22 22:05:09 +02:00

73 lines
1.3 KiB
Nix

{ lib
, aiohttp
, aresponses
, buildPythonPackage
, certifi
, fetchFromGitHub
, numpy
, poetry-core
, pygments
, pysmb
, pytest-aiohttp
, pytest-asyncio
, pytestCheckHook
, pythonOlder
}:
buildPythonPackage rec {
pname = "pyairvisual";
version = "2023.08.1";
format = "pyproject";
disabled = pythonOlder "3.9";
src = fetchFromGitHub {
owner = "bachya";
repo = pname;
rev = "refs/tags/${version}";
hash = "sha256-+yqN3q+uA/v01uCguzUSoeCJK9lRmiiYn8d272+Dd2M=";
};
postPatch = ''
substituteInPlace pyproject.toml --replace \
'certifi = ">=2023.07.22"' \
'certifi = "*"'
'';
nativeBuildInputs = [
poetry-core
];
propagatedBuildInputs = [
aiohttp
certifi
numpy
pygments
pysmb
];
nativeCheckInputs = [
aresponses
pytest-aiohttp
pytest-asyncio
pytestCheckHook
pytestCheckHook
];
disabledTestPaths = [
# Ignore the examples directory as the files are prefixed with test_.
"examples/"
];
pythonImportsCheck = [
"pyairvisual"
];
meta = with lib; {
description = "Python library for interacting with AirVisual";
homepage = "https://github.com/bachya/pyairvisual";
changelog = "https://github.com/bachya/pyairvisual/releases/tag/${version}";
license = with licenses; [ mit ];
maintainers = with maintainers; [ fab ];
};
}