2024-06-05 15:53:02 +00:00
|
|
|
{
|
|
|
|
lib,
|
|
|
|
buildPythonPackage,
|
|
|
|
fetchFromGitHub,
|
|
|
|
fetchpatch,
|
|
|
|
psutil,
|
|
|
|
pylibmc,
|
|
|
|
pytest,
|
|
|
|
pytestCheckHook,
|
|
|
|
pythonOlder,
|
|
|
|
requests,
|
|
|
|
setuptools,
|
|
|
|
setuptools-scm,
|
|
|
|
toml,
|
|
|
|
mysqlclient,
|
|
|
|
zc-lockfile,
|
2020-04-24 23:36:52 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "pytest-services";
|
2020-12-07 07:45:13 +00:00
|
|
|
version = "2.2.1";
|
2024-04-21 15:54:59 +00:00
|
|
|
pyproject = true;
|
|
|
|
|
|
|
|
disabled = pythonOlder "3.7";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2024-04-21 15:54:59 +00:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "pytest-dev";
|
|
|
|
repo = "pytest-services";
|
|
|
|
rev = "refs/tags/${version}";
|
|
|
|
hash = "sha256-E/VcKcAb1ekypm5jP4lsSz1LYJTcTSed6i5OY5ihP30=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2024-04-21 15:54:59 +00:00
|
|
|
patches = [
|
|
|
|
# Replace distutils.spawn.find_executable with shutil.which, https://github.com/pytest-dev/pytest-services/pull/46
|
|
|
|
(fetchpatch {
|
|
|
|
name = "replace-distutils.patch";
|
|
|
|
url = "https://github.com/pytest-dev/pytest-services/commit/e0e2a85434a2dcbcc0584299c5b2b751efe0b6db.patch";
|
|
|
|
hash = "sha256-hvr7EedfjfonHDn6v2slwUBqz1xQoF7Ez/kqAhZRXEc=";
|
|
|
|
})
|
|
|
|
];
|
|
|
|
|
2020-12-07 07:45:13 +00:00
|
|
|
nativeBuildInputs = [
|
2021-06-04 09:07:49 +00:00
|
|
|
setuptools-scm
|
2020-12-07 07:45:13 +00:00
|
|
|
toml
|
|
|
|
];
|
|
|
|
|
2021-04-05 15:23:46 +00:00
|
|
|
buildInputs = [ pytest ];
|
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
propagatedBuildInputs = [
|
|
|
|
requests
|
|
|
|
psutil
|
2024-01-25 14:12:00 +00:00
|
|
|
zc-lockfile
|
2022-01-03 16:56:52 +00:00
|
|
|
];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2024-04-21 15:54:59 +00:00
|
|
|
nativeCheckInputs = [
|
|
|
|
mysqlclient
|
|
|
|
pylibmc
|
|
|
|
pytestCheckHook
|
|
|
|
];
|
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
pythonImportsCheck = [ "pytest_services" ];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2024-04-21 15:54:59 +00:00
|
|
|
disabledTests = [
|
|
|
|
# Tests require binaries and additional parts
|
|
|
|
"test_memcached"
|
|
|
|
"test_mysql"
|
|
|
|
"test_xvfb "
|
|
|
|
];
|
2020-12-07 07:45:13 +00:00
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
meta = with lib; {
|
|
|
|
description = "Services plugin for pytest testing framework";
|
|
|
|
homepage = "https://github.com/pytest-dev/pytest-services";
|
2024-04-21 15:54:59 +00:00
|
|
|
changelog = "https://github.com/pytest-dev/pytest-services/blob/${version}/CHANGES.rst";
|
2020-04-24 23:36:52 +00:00
|
|
|
license = licenses.mit;
|
|
|
|
maintainers = with maintainers; [ dotlambda ];
|
|
|
|
};
|
|
|
|
}
|