mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-27 01:13:05 +00:00
python312Packages.timecop: refactor
- add pythonImportsCheck - switch to unittestCheckHook
This commit is contained in:
parent
db176ef1d6
commit
c5010efa1f
@ -1,20 +1,40 @@
|
||||
{ lib, buildPythonPackage, fetchPypi }:
|
||||
{ lib
|
||||
, buildPythonPackage
|
||||
, fetchPypi
|
||||
, pythonOlder
|
||||
, setuptools
|
||||
, unittestCheckHook
|
||||
}:
|
||||
|
||||
buildPythonPackage rec {
|
||||
pname = "timecop";
|
||||
version = "0.5.0dev";
|
||||
format = "setuptools";
|
||||
pyproject = true;
|
||||
|
||||
disabled = pythonOlder "3.7";
|
||||
|
||||
src = fetchPypi {
|
||||
inherit pname version;
|
||||
sha256 = "0zbi58sw2yp1qchzfhyi7bsrwxajiypphg65fir98kvj03g011wd";
|
||||
hash = "sha256-jYcA3gByT5RydMU8eK+PUnWe9TrRQ/chw+F6wTUqcX0=";
|
||||
};
|
||||
|
||||
build-system = [
|
||||
setuptools
|
||||
];
|
||||
|
||||
nativeCheckInputs = [
|
||||
unittestCheckHook
|
||||
];
|
||||
|
||||
# test_epoch fails, see https://github.com/bluekelp/pytimecop/issues/4
|
||||
preCheck = ''
|
||||
sed -i 's/test_epoch/_test_epoch/' timecop/tests/test_freeze.py
|
||||
'';
|
||||
|
||||
pythonImportsCheck = [
|
||||
"timecop"
|
||||
];
|
||||
|
||||
meta = with lib; {
|
||||
description = "A port of the most excellent TimeCop Ruby Gem for Python";
|
||||
homepage = "https://github.com/bluekelp/pytimecop";
|
||||
|
Loading…
Reference in New Issue
Block a user