From 830a9bf4fbe124e60fd1c2541249d8a7411f6312 Mon Sep 17 00:00:00 2001 From: Lancelot SIX Date: Mon, 31 Oct 2016 15:27:25 +0100 Subject: [PATCH 1/3] pythonPackages.filebrowser_safe: disable tests The distribution do not seem to include tests, and fails when trying to run them --- pkgs/top-level/python-packages.nix | 3 +++ 1 file changed, 3 insertions(+) diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 185043b27e3c..744af1ef1370 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -10706,6 +10706,9 @@ in { buildInputs = [ self.django ]; + # There is no test embedded + doCheck = false; + meta = { description = "A snapshot of django-filebrowser for the Mezzanine CMS"; longDescription = '' From 0f7decd0121af57fc60a63623d83b19c9dee1229 Mon Sep 17 00:00:00 2001 From: Lancelot SIX Date: Mon, 31 Oct 2016 16:08:13 +0100 Subject: [PATCH 2/3] pythonPackages.django_1_6: disable for python >= 3.4 django 1.6 does not support python>=3.4 --- pkgs/top-level/python-packages.nix | 3 +++ 1 file changed, 3 insertions(+) diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 744af1ef1370..71d1092d8f8f 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -9719,6 +9719,9 @@ in { name = "Django-${version}"; version = "1.6.11"; + # Support to python-3.4 and higher was introduced in django_1_7 + disabled = !(isPy26 || isPy27 || isPy33); + src = pkgs.fetchurl { url = "http://www.djangoproject.com/m/releases/1.6/${name}.tar.gz"; sha256 = "0misvia78c14y07zs5xsb9lv54q0v217jpaindrmhhw4wiryal3y"; From 8617a068b8ed7fa77356a518e79a12d37460c0ae Mon Sep 17 00:00:00 2001 From: Lancelot SIX Date: Mon, 31 Oct 2016 16:09:19 +0100 Subject: [PATCH 3/3] pythonPackages.mezzanine: Fix template project This makes sure that the template project can be used and updated. Otherzise files copied from the store stay readonly and cannot be updated during the generation process. --- .../mezzanine/writable_settings.patch | 21 +++++++++++++++++++ pkgs/top-level/python-packages.nix | 1 + 2 files changed, 22 insertions(+) create mode 100644 pkgs/development/python-modules/mezzanine/writable_settings.patch diff --git a/pkgs/development/python-modules/mezzanine/writable_settings.patch b/pkgs/development/python-modules/mezzanine/writable_settings.patch new file mode 100644 index 000000000000..4b5be7b5950c --- /dev/null +++ b/pkgs/development/python-modules/mezzanine/writable_settings.patch @@ -0,0 +1,21 @@ +diff -Nur mezzanine-3.1.10/mezzanine/bin/mezzanine_project.py mezzanine-3.1.10-patched/mezzanine/bin/mezzanine_project.py +--- mezzanine-3.1.10/mezzanine/bin/mezzanine_project.py 2014-08-30 07:12:19.000000000 +0200 ++++ mezzanine-3.1.10-patched/mezzanine/bin/mezzanine_project.py 2016-10-31 14:47:30.982401818 +0100 +@@ -5,6 +5,7 @@ + from distutils.dir_util import copy_tree + from optparse import OptionParser + import os ++import stat + from shutil import move + from uuid import uuid4 + +@@ -61,6 +62,9 @@ + copy_tree(os.path.join(package_path, "project_template"), project_path) + move(local_settings_path + ".template", local_settings_path) + ++ os.chmod(local_settings_path, ++ os.stat(local_settings_path).st_mode | stat.S_IWRITE) ++ + # Generate a unique SECRET_KEY for the project's setttings module. + with open(local_settings_path, "r") as f: + data = f.read() diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 71d1092d8f8f..b3077272050d 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -13967,6 +13967,7 @@ in { url = "https://github.com/stephenmcd/mezzanine/archive/${version}.tar.gz"; sha256 = "1cd7d3dji8q4mvcnf9asxn8j109pd5g5d5shr6xvn0iwr35qprgi"; }; + patches = [ ../development/python-modules/mezzanine/writable_settings.patch ]; disabled = isPyPy;