mirror of
https://github.com/NixOS/nixpkgs.git
synced 2026-08-25 17:55:21 +00:00
Merge pull request #127474 from dotlambda/pyhiveapi-init
This commit is contained in:
63
pkgs/development/python-modules/pyhiveapi/default.nix
Normal file
63
pkgs/development/python-modules/pyhiveapi/default.nix
Normal file
@@ -0,0 +1,63 @@
|
||||
{ lib
|
||||
, buildPythonPackage
|
||||
, pythonOlder
|
||||
, fetchFromGitHub
|
||||
, unasync
|
||||
, boto3
|
||||
, botocore
|
||||
, requests
|
||||
, aiohttp
|
||||
, pyquery
|
||||
, loguru
|
||||
}:
|
||||
|
||||
buildPythonPackage rec {
|
||||
pname = "pyhiveapi";
|
||||
version = "0.4.2";
|
||||
|
||||
format = "pyproject";
|
||||
|
||||
disabled = pythonOlder "3.6";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "Pyhass";
|
||||
repo = "Pyhiveapi";
|
||||
rev = "v${version}";
|
||||
sha256 = "0x9cfxfdpccz360azpyfhvn09xxkw7vxy42npgbqhpy2g6mh5sif";
|
||||
};
|
||||
|
||||
postPatch = ''
|
||||
substituteInPlace requirements.txt \
|
||||
--replace "pre-commit" ""
|
||||
'';
|
||||
|
||||
nativeBuildInputs = [
|
||||
unasync
|
||||
];
|
||||
|
||||
propagatedBuildInputs = [
|
||||
boto3
|
||||
botocore
|
||||
requests
|
||||
aiohttp
|
||||
pyquery
|
||||
loguru
|
||||
];
|
||||
|
||||
# tests are not functional yet
|
||||
doCheck = false;
|
||||
|
||||
postBuild = ''
|
||||
# pyhiveapi accesses $HOME upon importing
|
||||
export HOME=$TMPDIR
|
||||
'';
|
||||
|
||||
pythonImportsCheck = [ "pyhiveapi" ];
|
||||
|
||||
meta = with lib; {
|
||||
description = "Python library to interface with the Hive API";
|
||||
homepage = "https://github.com/Pyhass/Pyhiveapi";
|
||||
license = licenses.mit;
|
||||
maintainers = with maintainers; [ dotlambda ];
|
||||
};
|
||||
}
|
||||
45
pkgs/development/python-modules/unasync/default.nix
Normal file
45
pkgs/development/python-modules/unasync/default.nix
Normal file
@@ -0,0 +1,45 @@
|
||||
{ lib
|
||||
, buildPythonPackage
|
||||
, fetchFromGitHub
|
||||
, setuptools
|
||||
, pytestCheckHook
|
||||
}:
|
||||
|
||||
buildPythonPackage rec {
|
||||
pname = "unasync";
|
||||
version = "0.5.0";
|
||||
|
||||
format = "pyproject";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "python-trio";
|
||||
repo = "unasync";
|
||||
rev = "v${version}";
|
||||
sha256 = "0h86i09v4909a8nk5lp36jlwz6rsln6vyg3d0i13ykxa6lrx1c2l";
|
||||
};
|
||||
|
||||
propagatedBuildInputs = [
|
||||
setuptools
|
||||
];
|
||||
|
||||
checkInputs = [
|
||||
pytestCheckHook
|
||||
];
|
||||
|
||||
disabledTests = [
|
||||
# mess with $PYTHONPATH
|
||||
"test_build_py_modules"
|
||||
"test_build_py_packages"
|
||||
"test_project_structure_after_build_py_packages"
|
||||
"test_project_structure_after_customized_build_py_packages"
|
||||
];
|
||||
|
||||
pythonImportsCheck = [ "unasync" ];
|
||||
|
||||
meta = with lib; {
|
||||
description = "Project that can transform your asynchronous code into synchronous code";
|
||||
homepage = "https://github.com/python-trio/unasync";
|
||||
license = with licenses; [ mit /* or */ asl20 ];
|
||||
maintainers = with maintainers; [ dotlambda ];
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user