mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-02 07:31:26 +00:00
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.
This commit is contained in:
parent
0f7decd012
commit
8617a068b8
@ -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()
|
@ -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;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user