Commit 179571d8 authored by Fabian Affolter's avatar Fabian Affolter
Browse files

python312Packages.secure: refactor

- enable tests
- update disabled
- update build-system
- add changelog to meta
parent f69ae533
Loading
Loading
Loading
Loading
+13 −8
Original line number Diff line number Diff line
@@ -2,37 +2,42 @@
  lib,
  buildPythonPackage,
  fetchFromGitHub,
  isPy27,
  maya,
  pythonOlder,
  requests,
  pytestCheckHook,
  setuptools,
}:

buildPythonPackage rec {
  version = "1.0.1";
  format = "setuptools";
  pname = "secure";
  disabled = isPy27;
  version = "1.0.1";
  pyproject = true;

  disabled = pythonOlder "3.10";

  src = fetchFromGitHub {
    owner = "typeerror";
    repo = "secure.py";
    tag = "v${version}";
    sha256 = "sha256-lyosOejztFEINGKO0wAYv3PWBL7vpmAq+eQunwP9h5I=";
    hash = "sha256-lyosOejztFEINGKO0wAYv3PWBL7vpmAq+eQunwP9h5I=";
  };

  propagatedBuildInputs = [
  build-system = [ setuptools ];

  dependencies = [
    maya
    requests
  ];

  # no tests in release
  doCheck = false;
  nativeCheckInputs = [ pytestCheckHook ];

  pythonImportsCheck = [ "secure" ];

  meta = with lib; {
    description = "Adds optional security headers and cookie attributes for Python web frameworks";
    homepage = "https://github.com/TypeError/secure.py";
    changelog = "https://github.com/TypeError/secure/releases/tag/v${version}";
    license = licenses.mit;
    maintainers = [ ];
  };