From 225b8de73dd0d61a87c5c50e4d4199a56beb863b Mon Sep 17 00:00:00 2001 From: Ben Wolsieffer Date: Sat, 16 Dec 2017 21:12:34 -0500 Subject: [PATCH] pythonPackages.sphinx-jinja: 0.2.1 -> 1.1.0, Python 3 support --- .../python-modules/sphinx-jinja/default.nix | 27 +++++++++++++++++++ pkgs/top-level/python-packages.nix | 21 +-------------- 2 files changed, 28 insertions(+), 20 deletions(-) create mode 100644 pkgs/development/python-modules/sphinx-jinja/default.nix diff --git a/pkgs/development/python-modules/sphinx-jinja/default.nix b/pkgs/development/python-modules/sphinx-jinja/default.nix new file mode 100644 index 000000000000..375f59ec3f91 --- /dev/null +++ b/pkgs/development/python-modules/sphinx-jinja/default.nix @@ -0,0 +1,27 @@ +{ lib, buildPythonPackage, fetchPypi, pbr, sphinx, sphinx-testing, nose, glibcLocales }: + +buildPythonPackage rec { + pname = "sphinx-jinja"; + version = "1.1.0"; + + src = fetchPypi { + inherit pname version; + sha256 = "02pgp9pbn0zrs0lggrc74mv6cvlnlq8wib84ga6yjvq30gda9v8q"; + }; + + buildInputs = [ pbr ]; + propagatedBuildInputs = [ sphinx ]; + + checkInputs = [ sphinx-testing nose glibcLocales ]; + + checkPhase = '' + # Zip (epub) does not support files with epoch timestamp + LC_ALL="en_US.UTF-8" nosetests -e test_build_epub + ''; + + meta = with lib; { + description = "Sphinx extension to include jinja templates in documentation"; + maintainers = with maintainers; [ nand0p ]; + license = licenses.mit; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index b8677cf5eeae..0df3f855c3ae 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -12977,26 +12977,7 @@ in { }; }); - sphinx-jinja = buildPythonPackage (rec { - name = "${pname}-${version}"; - pname = "sphinx-jinja"; - version = "0.2.1"; - src = pkgs.fetchurl { - url = "mirror://pypi/s/${pname}/${name}.tar.gz"; - sha256 = "1zsnhc573rvaww9qqyzs4f5h4hhvxklvppv14450vi5dk8rij81z"; - }; - buildInputs = with self; [ sphinx-testing pytest pbr]; - propagatedBuildInputs = with self; [ sphinx blockdiag ]; - checkPhase = '' - py.test -k "not test_build_epub" - ''; - disabled = isPy3k; - meta = { - description = "includes jinja templates in a documentation"; - maintainers = with maintainers; [ nand0p ]; - license = licenses.mit; - }; - }); + sphinx-jinja = callPackage ../development/python-modules/sphinx-jinja { }; sphinx_pypi_upload = buildPythonPackage (rec { name = "Sphinx-PyPI-upload-0.2.1";