Unverified Commit 5c618b25 authored by Sylvain Fankhauser's avatar Sylvain Fankhauser
Browse files

python3Packages.draftjs-exporter: init at 2.1.7

parent 1153bb88
Loading
Loading
Loading
Loading
+45 −0
Original line number Diff line number Diff line
{ beautifulsoup4
, buildPythonPackage
, fetchFromGitHub
, html5lib
, lib
, lxml
, python
}:

buildPythonPackage rec {
  pname = "draftjs-exporter";
  version = "2.1.7";

  src = fetchFromGitHub {
    repo = "draftjs_exporter";
    owner = "springload";
    rev = "v${version}";
    sha256 = "sha256-tw0r9RnQdIwcY+pqnW8fcV0o2LzmxW0MZPn5drNgK80=";
  };

  passthru.optional-dependencies = {
    lxml = [ lxml ];
    html5lib = [ beautifulsoup4 html5lib ];
  };

  checkInputs = passthru.optional-dependencies.lxml ++ passthru.optional-dependencies.html5lib;

  checkPhase = ''
    # 2 tests in this file randomly fail because they depend on the order of
    # HTML attributes
    rm tests/test_exports.py

    ${python.interpreter} -m unittest discover
  '';

  pythonImportsCheck = [ "draftjs_exporter" ];

  meta = with lib; {
    description = "Library to convert Draft.js ContentState to HTML";
    homepage = "https://github.com/springload/draftjs_exporter";
    changelog = "https://github.com/springload/draftjs_exporter/blob/v${version}/CHANGELOG.md";
    license = licenses.mit;
    maintainers = with maintainers; [ sephi ];
  };
}
+2 −0
Original line number Diff line number Diff line
@@ -2877,6 +2877,8 @@ self: super: with self; {

  dpkt = callPackage ../development/python-modules/dpkt { };

  draftjs-exporter = callPackage ../development/python-modules/draftjs-exporter { };

  dragonfly = callPackage ../development/python-modules/dragonfly { };

  drawille = callPackage ../development/python-modules/drawille { };