From 9ede2d15aa8dea029a59d9e8816524d6604eda11 Mon Sep 17 00:00:00 2001 From: Will Dietz Date: Tue, 23 May 2017 14:34:49 -0500 Subject: [PATCH 1/4] python.feedgenerator: 1.7 -> 1.9 --- pkgs/top-level/python-packages.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index f40f60c6294b..de67d029fb65 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -10799,11 +10799,11 @@ in { }; feedgenerator = buildPythonPackage (rec { - name = "feedgenerator-1.7"; + name = "feedgenerator-1.9"; src = pkgs.fetchurl { url = "mirror://pypi/f/feedgenerator/${name}.tar.gz"; - sha256 = "5d6b0b10134ac392be0c0c3a39c0e1d7e9c17cc7894590f75981e3f497a4a60f"; + sha256 = "01mirwkm7xfx539hmvj7g9da1j51gw5lsx74dr0glizskjm5vq2s"; }; buildInputs = [ pkgs.glibcLocales ]; From 330dee016da8b56cba87afa5710a0ec2f8e26372 Mon Sep 17 00:00:00 2001 From: Will Dietz Date: Tue, 23 May 2017 14:35:10 -0500 Subject: [PATCH 2/4] python.pelican: 3.6.3 -> 3.7.1, enable tests --- pkgs/top-level/python-packages.nix | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index de67d029fb65..51d72d0508fd 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -17872,20 +17872,22 @@ in { pelican = buildPythonPackage rec { name = "pelican-${version}"; - version = "3.6.3"; + version = "3.7.1"; disabled = isPy26; src = pkgs.fetchFromGitHub { owner = "getpelican"; repo = "pelican"; rev = version; - sha256 = "1k572anw39rws67mvxl2w6y93y8w8q5smnwc0dd2gnnr16cc2vsh"; + sha256 = "0nkxrb77k2bra7bqckg7f5k73wk98hcbz7rimxl8sw05b2bvd62g"; }; - patches = [ ../development/python-modules/pelican-fix-tests-with-pygments-2.1.patch ]; + doCheck = true; - # There's still some failing tests due to pygments 2.1.3 - doCheck = false; + # https://github.com/getpelican/pelican/pull/2004#issuecomment-247610716 + checkPhase = '' + ${python.interpreter} -Wd -m unittest discover + ''; buildInputs = with self; [ pkgs.glibcLocales @@ -17901,7 +17903,7 @@ in { propagatedBuildInputs = with self; [ jinja2 pygments docutils pytz unidecode six dateutil feedgenerator - blinker pillow beautifulsoup4 markupsafe + blinker pillow beautifulsoup4 markupsafe lxml ]; postPatch= '' From 3e9f7bcb98536082e77782d3b4460afacc35b7c9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Thalheim?= Date: Tue, 23 May 2017 22:09:07 +0100 Subject: [PATCH 3/4] pythonPackages.pelican: move to external file --- .../python-modules/pelican/default.nix | 53 +++++++++++++++++++ pkgs/top-level/python-packages.nix | 50 +---------------- 2 files changed, 55 insertions(+), 48 deletions(-) create mode 100644 pkgs/development/python-modules/pelican/default.nix diff --git a/pkgs/development/python-modules/pelican/default.nix b/pkgs/development/python-modules/pelican/default.nix new file mode 100644 index 000000000000..72901881b039 --- /dev/null +++ b/pkgs/development/python-modules/pelican/default.nix @@ -0,0 +1,53 @@ +{ stdenv, buildPythonPackage, fetchFromGitHub, isPy26 +, glibcLocales, pandoc, git +, mock, nose, markdown, lxml, typogrify +, jinja2, pygments, docutils, pytz, unidecode, six, dateutil, feedgenerator +, blinker, pillow, beautifulsoup4, markupsafe }: + +buildPythonPackage rec { + name = "pelican-${version}"; + version = "3.7.1"; + disabled = isPy26; + + src = fetchFromGitHub { + owner = "getpelican"; + repo = "pelican"; + rev = version; + sha256 = "0nkxrb77k2bra7bqckg7f5k73wk98hcbz7rimxl8sw05b2bvd62g"; + }; + + doCheck = true; + + checkPhase = '' + python -Wd -m unittest discover + ''; + + buildInputs = [ + glibcLocales + pandoc + git + mock + nose + markdown + typogrify + ]; + + propagatedBuildInputs = [ + jinja2 pygments docutils pytz unidecode six dateutil feedgenerator + blinker pillow beautifulsoup4 markupsafe lxml + ]; + + postPatch= '' + substituteInPlace pelican/tests/test_pelican.py \ + --replace "'git'" "'${git}/bin/git'" + ''; + + LC_ALL="en_US.UTF-8"; + + meta = with stdenv.lib; { + description = "A tool to generate a static blog from reStructuredText or Markdown input files"; + homepage = "http://getpelican.com/"; + license = licenses.agpl3; + maintainers = with maintainers; [ offline prikhi garbas ]; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 51d72d0508fd..7da7f2a51dea 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -17870,54 +17870,8 @@ in { }; }; - pelican = buildPythonPackage rec { - name = "pelican-${version}"; - version = "3.7.1"; - disabled = isPy26; - - src = pkgs.fetchFromGitHub { - owner = "getpelican"; - repo = "pelican"; - rev = version; - sha256 = "0nkxrb77k2bra7bqckg7f5k73wk98hcbz7rimxl8sw05b2bvd62g"; - }; - - doCheck = true; - - # https://github.com/getpelican/pelican/pull/2004#issuecomment-247610716 - checkPhase = '' - ${python.interpreter} -Wd -m unittest discover - ''; - - buildInputs = with self; [ - pkgs.glibcLocales - pkgs.pandoc - pkgs.git - mock - nose - markdown - beautifulsoup4 - lxml - typogrify - ]; - - propagatedBuildInputs = with self; [ - jinja2 pygments docutils pytz unidecode six dateutil feedgenerator - blinker pillow beautifulsoup4 markupsafe lxml - ]; - - postPatch= '' - sed -i -e "s|'git'|'${pkgs.git}/bin/git'|" pelican/tests/test_pelican.py - ''; - - LC_ALL="en_US.UTF-8"; - - meta = { - description = "A tool to generate a static blog from reStructuredText or Markdown input files"; - homepage = "http://getpelican.com/"; - license = licenses.agpl3; - maintainers = with maintainers; [ offline prikhi garbas ]; - }; + pelican = callPackage ../development/python-modules/pelican { + inherit (pkgs) glibcLocales pandoc git; }; pep8 = buildPythonPackage rec { From bfc9420b7f3114ce595e978469497ae2a36229ef Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Thalheim?= Date: Tue, 23 May 2017 22:37:43 +0100 Subject: [PATCH 4/4] feedgenerator: move to external file --- pkgs/top-level/python-packages.nix | 23 +++-------------------- 1 file changed, 3 insertions(+), 20 deletions(-) diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 7da7f2a51dea..eccf1047cc42 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -10798,26 +10798,9 @@ in { }; }; - feedgenerator = buildPythonPackage (rec { - name = "feedgenerator-1.9"; - - src = pkgs.fetchurl { - url = "mirror://pypi/f/feedgenerator/${name}.tar.gz"; - sha256 = "01mirwkm7xfx539hmvj7g9da1j51gw5lsx74dr0glizskjm5vq2s"; - }; - - buildInputs = [ pkgs.glibcLocales ]; - - LC_ALL="en_US.UTF-8"; - - propagatedBuildInputs = with self; [ six pytz ]; - - meta = { - description = "Standalone version of django.utils.feedgenerator, compatible with Py3k"; - homepage = https://github.com/dmdm/feedgenerator-py3k.git; - maintainers = with maintainers; [ garbas ]; - }; - }); + feedgenerator = callPackage ../development/python-modules/feedgenerator { + inherit (pkgs) glibcLocales; + }; feedparser = buildPythonPackage (rec { name = "feedparser-5.2.1";