e0464e4788
In preparation for the deprecation of `stdenv.isX`. These shorthands are not conducive to cross-compilation because they hide the platforms. Darwin might get cross-compilation for which the continued usage of `stdenv.isDarwin` will get in the way One example of why this is bad and especially affects compiler packages https://www.github.com/NixOS/nixpkgs/pull/343059 There are too many files to go through manually but a treewide should get users thinking when they see a `hostPlatform.isX` in a place where it doesn't make sense. ``` fd --type f "\.nix" | xargs sd --fixed-strings "stdenv.is" "stdenv.hostPlatform.is" fd --type f "\.nix" | xargs sd --fixed-strings "stdenv'.is" "stdenv'.hostPlatform.is" fd --type f "\.nix" | xargs sd --fixed-strings "clangStdenv.is" "clangStdenv.hostPlatform.is" fd --type f "\.nix" | xargs sd --fixed-strings "gccStdenv.is" "gccStdenv.hostPlatform.is" fd --type f "\.nix" | xargs sd --fixed-strings "stdenvNoCC.is" "stdenvNoCC.hostPlatform.is" fd --type f "\.nix" | xargs sd --fixed-strings "inherit (stdenv) is" "inherit (stdenv.hostPlatform) is" fd --type f "\.nix" | xargs sd --fixed-strings "buildStdenv.is" "buildStdenv.hostPlatform.is" fd --type f "\.nix" | xargs sd --fixed-strings "effectiveStdenv.is" "effectiveStdenv.hostPlatform.is" fd --type f "\.nix" | xargs sd --fixed-strings "originalStdenv.is" "originalStdenv.hostPlatform.is" ```
81 lines
1.4 KiB
Nix
81 lines
1.4 KiB
Nix
{
|
|
lib,
|
|
stdenv,
|
|
buildPythonPackage,
|
|
fetchPypi,
|
|
gevent,
|
|
pytest-asyncio,
|
|
pytest-tornado,
|
|
pytestCheckHook,
|
|
pythonOlder,
|
|
pytz,
|
|
setuptools,
|
|
setuptools-scm,
|
|
six,
|
|
tornado,
|
|
twisted,
|
|
tzlocal,
|
|
}:
|
|
|
|
buildPythonPackage rec {
|
|
pname = "apscheduler";
|
|
version = "3.10.4";
|
|
pyproject = true;
|
|
|
|
disabled = pythonOlder "3.7";
|
|
|
|
src = fetchPypi {
|
|
pname = "APScheduler";
|
|
inherit version;
|
|
hash = "sha256-5t8HGyfZvomOSGvHlAp75QtK8unafAjwdEqW1L1M70o=";
|
|
};
|
|
|
|
build-system = [
|
|
setuptools
|
|
setuptools-scm
|
|
];
|
|
|
|
dependencies = [
|
|
pytz
|
|
setuptools
|
|
six
|
|
tzlocal
|
|
];
|
|
|
|
nativeCheckInputs = [
|
|
gevent
|
|
pytest-asyncio
|
|
pytest-tornado
|
|
pytestCheckHook
|
|
tornado
|
|
twisted
|
|
];
|
|
|
|
postPatch = ''
|
|
substituteInPlace setup.cfg \
|
|
--replace-fail " --cov --tb=short" ""
|
|
'';
|
|
|
|
disabledTests =
|
|
[
|
|
"test_broken_pool"
|
|
# gevent tests have issue on newer Python releases
|
|
"test_add_live_job"
|
|
"test_add_pending_job"
|
|
"test_shutdown"
|
|
]
|
|
++ lib.optionals stdenv.hostPlatform.isDarwin [
|
|
"test_submit_job"
|
|
"test_max_instances"
|
|
];
|
|
|
|
pythonImportsCheck = [ "apscheduler" ];
|
|
|
|
meta = with lib; {
|
|
description = "Library that lets you schedule your Python code to be executed";
|
|
homepage = "https://github.com/agronholm/apscheduler";
|
|
license = licenses.mit;
|
|
maintainers = [ ];
|
|
};
|
|
}
|