Antonio Cuni avatar Antonio Cuni committed 999cc60

add lib-tk to the initial sys.path

Comments (0)

Files changed (2)

pypy/module/sys/state.py

     importlist.append(python_std_lib_modified)
     importlist.append(python_std_lib)
     #
+    lib_tk_modified = os.path.join(python_std_lib_modified, 'lib-tk')
+    lib_tk = os.path.join(python_std_lib, 'lib-tk')
+    importlist.append(lib_tk_modified)
+    importlist.append(lib_tk)
+    #
     # List here the extra platform-specific paths.
     if platform != 'win32':
         importlist.append(os.path.join(python_std_lib, 'plat-'+platform))

pypy/module/sys/test/test_initialpath.py

     path = getinitialpath(str(tmpdir))
     # we get at least 'dirs', and maybe more (e.g. plat-linux2)
     assert path[:len(dirs)] == map(str, dirs)
+
+def test_include_libtk(tmpdir):
+    lib_pypy, lib_python_modified, lib_python = build_hierarchy(tmpdir)
+    lib_tk_modified = lib_python_modified.join('lib-tk')
+    lib_tk = lib_python.join('lib-tk')
+    path = getinitialpath(str(tmpdir))
+    i = path.index(str(lib_tk_modified))
+    j = path.index(str(lib_tk))
+    assert i < j
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.