2024-06-05 15:53:02 +00:00
|
|
|
{
|
|
|
|
lib,
|
|
|
|
buildPythonPackage,
|
|
|
|
django,
|
|
|
|
faker,
|
|
|
|
fetchPypi,
|
|
|
|
flask,
|
|
|
|
flask-sqlalchemy,
|
|
|
|
mongoengine,
|
|
|
|
pytestCheckHook,
|
|
|
|
pythonOlder,
|
|
|
|
sqlalchemy,
|
|
|
|
sqlalchemy-utils,
|
2020-04-24 23:36:52 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
2021-12-06 16:07:01 +00:00
|
|
|
pname = "factory-boy";
|
2023-08-10 07:59:29 +00:00
|
|
|
version = "3.3.0";
|
2021-12-06 16:07:01 +00:00
|
|
|
format = "setuptools";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2023-08-10 07:59:29 +00:00
|
|
|
disabled = pythonOlder "3.7";
|
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
src = fetchPypi {
|
2021-12-06 16:07:01 +00:00
|
|
|
pname = "factory_boy";
|
|
|
|
inherit version;
|
2023-08-10 07:59:29 +00:00
|
|
|
hash = "sha256-vHbZfRplu9mEKm1yKIIJjrVJ7I7hCB+fsuj/KfDDAPE=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2023-08-10 07:59:29 +00:00
|
|
|
postPatch = ''
|
|
|
|
substituteInPlace tests/test_version.py \
|
|
|
|
--replace '"3.2.1.dev0")' '"${version}")'
|
|
|
|
'';
|
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
propagatedBuildInputs = [ faker ];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2023-02-02 18:25:31 +00:00
|
|
|
nativeCheckInputs = [
|
2021-02-13 14:23:35 +00:00
|
|
|
django
|
|
|
|
flask
|
2022-08-12 12:06:08 +00:00
|
|
|
flask-sqlalchemy
|
2021-02-13 14:23:35 +00:00
|
|
|
mongoengine
|
|
|
|
pytestCheckHook
|
|
|
|
sqlalchemy
|
2023-08-10 07:59:29 +00:00
|
|
|
sqlalchemy-utils
|
2021-02-13 14:23:35 +00:00
|
|
|
];
|
|
|
|
|
|
|
|
# Checks for MongoDB requires an a running DB
|
2024-06-05 15:53:02 +00:00
|
|
|
disabledTests = [ "MongoEngineTestCase" ];
|
2021-12-06 16:07:01 +00:00
|
|
|
|
2023-01-20 10:41:00 +00:00
|
|
|
disabledTestPaths = [
|
|
|
|
# incompatible with latest flask-sqlalchemy
|
|
|
|
"examples/flask_alchemy/test_demoapp.py"
|
|
|
|
];
|
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
pythonImportsCheck = [ "factory" ];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
meta = with lib; {
|
2021-02-13 14:23:35 +00:00
|
|
|
description = "Python package to create factories for complex objects";
|
|
|
|
homepage = "https://github.com/rbarrois/factory_boy";
|
2023-08-10 07:59:29 +00:00
|
|
|
changelog = "https://github.com/FactoryBoy/factory_boy/blob/${version}/docs/changelog.rst";
|
2021-02-13 14:23:35 +00:00
|
|
|
license = with licenses; [ mit ];
|
|
|
|
maintainers = with maintainers; [ fab ];
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|