Commit fe9041ab authored by Fabian Affolter's avatar Fabian Affolter
Browse files

python312Packages.brotlipy: refactor

parent 3a9aba55
Loading
Loading
Loading
Loading
+18 −14
Original line number Diff line number Diff line
{
  lib,
  buildPythonPackage,
  fetchPypi,
  cffi,
  enum34,
  construct,
  pytest,
  fetchPypi,
  hypothesis,
  pytest,
  pytestCheckHook,
  pythonOlder,
  setuptools,
}:

buildPythonPackage rec {
  pname = "brotlipy";
  version = "0.7.0";
  format = "setuptools";
  pyproject = true;

  disabled = pythonOlder "3.7";

  src = fetchPypi {
    inherit pname version;
    sha256 = "36def0b859beaf21910157b4c33eb3b06d8ce459c942102f16988cca6ea164df";
    hash = "sha256-Nt7wuFm+ryGRAVe0wz6zsG2M5FnJQhAvFpiMym6hZN8=";
  };

  propagatedBuildInputs = [
  build-system = [ setuptools ];

  propagatedNativeBuildInputs = [ cffi ];

  dependencies = [
    cffi
    enum34
    construct
  ];

  propagatedNativeBuildInputs = [ cffi ];

  nativeCheckInputs = [
    pytest
    hypothesis
    pytestCheckHook
  ];

  checkPhase = ''
    py.test
  '';

  # Missing test files
  doCheck = false;

  pythonImportsCheck = [ "brotli" ];

  meta = {
    description = "Python bindings for the reference Brotli encoder/decoder";
    homepage = "https://github.com/python-hyper/brotlipy/";
    license = lib.licenses.mit;
    maintainers = [ ];
  };
}