Files
macports-ports/python/py-spyder/files/patch-spyder_config_base.py.diff
Renee Otten d243602d8f py-spyder: update to 4.2.1
- pin to version 4.1.6 for py27/py35 subports

Closes: https://trac.macports.org/ticket/61952
2021-01-09 22:00:14 -05:00

50 lines
2.2 KiB
Diff

--- spyder/config/base.py.orig 2020-11-08 16:56:03.000000000 -0500
+++ spyder/config/base.py 2020-12-11 23:26:53.000000000 -0500
@@ -126,23 +126,29 @@
#==============================================================================
def get_conf_subfolder():
"""Return the configuration subfolder for different ooperating systems."""
- # Spyder settings dir
- # NOTE: During the 2.x.x series this dir was named .spyder2, but
- # since 3.0+ we've reverted back to use .spyder to simplify major
- # updates in version (required when we change APIs by Linux
- # packagers)
- if sys.platform.startswith('linux'):
- SUBFOLDER = 'spyder'
- else:
- SUBFOLDER = '.spyder'
-
- # We can't have PY2 and PY3 settings in the same dir because:
- # 1. This leads to ugly crashes and freezes (e.g. by trying to
- # embed a PY2 interpreter in PY3)
- # 2. We need to save the list of installed modules (for code
- # completion) separately for each version
- if PY3:
- SUBFOLDER = SUBFOLDER + '-py3'
+## # Spyder settings dir
+## # NOTE: During the 2.x.x series this dir was named .spyder2, but
+## # since 3.0+ we've reverted back to use .spyder to simplify major
+## # updates in version (required when we change APIs by Linux
+## # packagers)
+## if sys.platform.startswith('linux'):
+## SUBFOLDER = 'spyder'
+## else:
+## SUBFOLDER = '.spyder'
+##
+## # We can't have PY2 and PY3 settings in the same dir because:
+## # 1. This leads to ugly crashes and freezes (e.g. by trying to
+## # embed a PY2 interpreter in PY3)
+## # 2. We need to save the list of installed modules (for code
+## # completion) separately for each version
+## if PY3:
+## SUBFOLDER = SUBFOLDER + '-py3'
+##
+
+ # MacPorts: we allow multiple Python 2.x or 3.x versions side-by-side;
+ # keep preferences separate.
+ SUBFOLDER = '.spyder%s-%s%s' % (__version__.split('.')[0],
+ sys.version_info[0], sys.version_info[1])
# If running a development/beta version, save config in a separate
# directory to avoid wiping or contaiminating the user's saved stable