Merge pull request #20019 from lsix/19989-fix-mezzanine-for-python3

python33Packages.mezzanine Fix

authored by Frederik Rietdijk and committed by GitHub 1558b09a ea2907ad

+28
+21
pkgs/development/python-modules/mezzanine/writable_settings.patch
··· 1 + diff -Nur mezzanine-3.1.10/mezzanine/bin/mezzanine_project.py mezzanine-3.1.10-patched/mezzanine/bin/mezzanine_project.py 2 + --- mezzanine-3.1.10/mezzanine/bin/mezzanine_project.py 2014-08-30 07:12:19.000000000 +0200 3 + +++ mezzanine-3.1.10-patched/mezzanine/bin/mezzanine_project.py 2016-10-31 14:47:30.982401818 +0100 4 + @@ -5,6 +5,7 @@ 5 + from distutils.dir_util import copy_tree 6 + from optparse import OptionParser 7 + import os 8 + +import stat 9 + from shutil import move 10 + from uuid import uuid4 11 + 12 + @@ -61,6 +62,9 @@ 13 + copy_tree(os.path.join(package_path, "project_template"), project_path) 14 + move(local_settings_path + ".template", local_settings_path) 15 + 16 + + os.chmod(local_settings_path, 17 + + os.stat(local_settings_path).st_mode | stat.S_IWRITE) 18 + + 19 + # Generate a unique SECRET_KEY for the project's setttings module. 20 + with open(local_settings_path, "r") as f: 21 + data = f.read()
+7
pkgs/top-level/python-packages.nix
··· 9761 9761 name = "Django-${version}"; 9762 9762 version = "1.6.11"; 9763 9763 9764 + # Support to python-3.4 and higher was introduced in django_1_7 9765 + disabled = !(isPy26 || isPy27 || isPy33); 9766 + 9764 9767 src = pkgs.fetchurl { 9765 9768 url = "http://www.djangoproject.com/m/releases/1.6/${name}.tar.gz"; 9766 9769 sha256 = "0misvia78c14y07zs5xsb9lv54q0v217jpaindrmhhw4wiryal3y"; ··· 10747 10750 }; 10748 10751 10749 10752 buildInputs = [ self.django ]; 10753 + 10754 + # There is no test embedded 10755 + doCheck = false; 10750 10756 10751 10757 meta = { 10752 10758 description = "A snapshot of django-filebrowser for the Mezzanine CMS"; ··· 14003 14009 url = "https://github.com/stephenmcd/mezzanine/archive/${version}.tar.gz"; 14004 14010 sha256 = "1cd7d3dji8q4mvcnf9asxn8j109pd5g5d5shr6xvn0iwr35qprgi"; 14005 14011 }; 14012 + patches = [ ../development/python-modules/mezzanine/writable_settings.patch ]; 14006 14013 14007 14014 disabled = isPyPy; 14008 14015