python312Packages.fnllm: 0.0.11 -> 0.0.12 (#364582)
[NixPkgs.git] / pkgs / development / python-modules / flask-gravatar / default.nix
blob81a29a3c56fabd29205a3c4a7563b3f80dcdbae5
2   lib,
3   buildPythonPackage,
4   fetchPypi,
5   fetchpatch,
7   # build-system
8   setuptools,
10   # dependencies
11   flask,
13   # tests
14   pytestCheckHook,
15   pytest-cov-stub,
16   pygments,
19 buildPythonPackage rec {
20   pname = "flask-gravatar";
21   version = "0.5.0";
22   pyproject = true;
24   src = fetchPypi {
25     pname = "Flask-Gravatar";
26     inherit version;
27     sha256 = "YGZfMcLGEokdto/4Aek+06CIHGyOw0arxk0qmSP1YuE=";
28   };
30   patches = [
31     (fetchpatch {
32       # flask 3.0 compat
33       url = "https://github.com/zzzsochi/Flask-Gravatar/commit/d74d70d9695c464b602c96c2383d391b38ed51ac.patch";
34       hash = "sha256-tCKkA2io/jhvrh6RhTeEw4AKnIZc9hsqTf2qItUsdjo=";
35     })
36   ];
38   postPatch = ''
39     sed -i setup.py \
40      -e "s|tests_require=tests_require,||g" \
41      -e "s|extras_require=extras_require,||g" \
42      -e "s|setup_requires=setup_requires,||g"
43     # pep8 is deprecated
44     substituteInPlace pytest.ini \
45      --replace-fail "--pep8" ""
46   '';
48   build-system = [ setuptools ];
50   dependencies = [ flask ];
52   nativeCheckInputs = [
53     pytestCheckHook
54     pytest-cov-stub
55     pygments
56   ];
58   pythonImportsCheck = [ "flask_gravatar" ];
60   meta = with lib; {
61     homepage = "https://github.com/zzzsochi/Flask-Gravatar";
62     description = "Small and simple integration of gravatar into flask";
63     license = licenses.bsd3;
64     maintainers = with maintainers; [ gador ];
65   };