[med-svn] [python-mne] 01/02: debian/{rules.patches/changeset_b9d4d*} Absorb upstream patch and specify not using HOME directory for generated pre-computed data, but instead use tempdir. (Closes: #768730)
Yaroslav Halchenko
debian at onerussian.com
Wed Nov 25 15:52:55 UTC 2015
This is an automated email from the git hooks/post-receive script.
yoh pushed a commit to branch master
in repository python-mne.
commit 94d5ecabbdc185c52bc0b9a24b5f18d9d13c9947
Author: Yaroslav Halchenko <debian at onerussian.com>
Date: Wed Dec 10 21:47:58 2014 -0500
debian/{rules.patches/changeset_b9d4d*} Absorb upstream patch and specify not using HOME directory for generated pre-computed data, but instead use tempdir. (Closes: #768730)
Conflicts:
debian/changelog
---
debian/changelog | 8 ++++
...t_b9d4df78db7aaeda1feb58c18b0071934de2361e.diff | 45 ++++++++++++++++++++++
debian/patches/series | 1 +
debian/rules | 2 +-
4 files changed, 55 insertions(+), 1 deletion(-)
diff --git a/debian/changelog b/debian/changelog
index 1d6255e..9b829f4 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,11 @@
+python-mne (0.8.6+dfsg-1) unstable; urgency=medium
+
+ * debian/{rules.patches/changeset_b9d4d*}
+ Absorb upstream patch and specify not using HOME directory for generated
+ pre-computed data, but instead use tempdir. (Closes: #768730)
+
+ -- Yaroslav Halchenko <debian at onerussian.com> Thu, 11 Dec 2014 09:33:18 -0500
+
python-mne (0.8.6+dfsg-1) unstable; urgency=low
* New upstream version
diff --git a/debian/patches/changeset_b9d4df78db7aaeda1feb58c18b0071934de2361e.diff b/debian/patches/changeset_b9d4df78db7aaeda1feb58c18b0071934de2361e.diff
new file mode 100644
index 0000000..df5e861
--- /dev/null
+++ b/debian/patches/changeset_b9d4df78db7aaeda1feb58c18b0071934de2361e.diff
@@ -0,0 +1,45 @@
+commit b9d4df78db7aaeda1feb58c18b0071934de2361e
+Author: Eric89GXL <larson.eric.d at gmail.com>
+Date: Wed Nov 12 10:22:45 2014 -0800
+
+ ENH: Allow not writing home
+
+--- a/mne/utils.py
++++ b/mne/utils.py
+@@ -24,6 +24,7 @@ from math import log, ceil
+ import json
+ import ftplib
+ import hashlib
++import atexit
+
+ import numpy as np
+ import scipy
+@@ -983,8 +984,12 @@ def get_subjects_dir(subjects_dir=None,
+ return subjects_dir
+
+
++_temp_home_dir = None
++
++
+ def _get_extra_data_path(home_dir=None):
+ """Get path to extra data (config, tables, etc.)"""
++ global _temp_home_dir
+ if home_dir is None:
+ # this has been checked on OSX64, Linux64, and Win32
+ if 'nt' == os.name.lower():
+@@ -996,7 +1001,14 @@ def _get_extra_data_path(home_dir=None):
+ # of script that isn't launched via the command line (e.g. a script
+ # launched via Upstart) then the HOME environment variable will
+ # not be set.
+- home_dir = os.path.expanduser('~')
++ if os.getenv('MNE_DONTWRITE_HOME', '') == 'true':
++ if _temp_home_dir is None:
++ _temp_home_dir = tempfile.mkdtemp()
++ atexit.register(partial(shutil.rmtree, _temp_home_dir,
++ ignore_errors=True))
++ home_dir = _temp_home_dir
++ else:
++ home_dir = os.path.expanduser('~')
+
+ if home_dir is None:
+ raise ValueError('mne-python config file path could '
diff --git a/debian/patches/series b/debian/patches/series
index 87a6838..0b56cc9 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1,2 +1,3 @@
+changeset_b9d4df78db7aaeda1feb58c18b0071934de2361e.diff
changeset_9c7ef6d10f1f767b742525ea31e42a65a0469327.diff
debian_paths
diff --git a/debian/rules b/debian/rules
index cc3e3f3..4510dbe 100755
--- a/debian/rules
+++ b/debian/rules
@@ -15,7 +15,7 @@ override_dh_auto_build:
yui-compressor debian/JS/bootstrap/bootstrap.js > $(CURDIR)/mne/html/bootstrap.min.js
override_dh_auto_test:
- MNE_SKIP_SAMPLE_DATASET_TESTS=true MNE_FORCE_SERIAL=true MNE_SKIP_NETWORK_TESTS=1 \
+ MNE_DONTWRITE_HOME=true MNE_SKIP_SAMPLE_DATASET_TESTS=true MNE_FORCE_SERIAL=true MNE_SKIP_NETWORK_TESTS=1 \
xvfb-run --auto-servernum --server-num=20 -s "-screen 0 1024x768x24 -ac +extension GLX +render -noreset" \
$(NOSETESTS) mne
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-med/python-mne.git
More information about the debian-med-commit
mailing list