Skip to content

Commit e8163e8

Browse files
authored
Merge pull request #1103 from mattip/pypy-dlls
BUG: pypy dlls are named differently
2 parents e916509 + 4e6711d commit e8163e8

File tree

1 file changed

+19
-11
lines changed

1 file changed

+19
-11
lines changed

virtualenv.py

Lines changed: 19 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1248,16 +1248,24 @@ def install_python(home_dir, lib_dir, inc_dir, bin_dir, site_packages, clear, sy
12481248

12491249
# we need to copy the DLL to enforce that windows will load the correct one.
12501250
# may not exist if we are cygwin.
1251-
py_executable_dlls = [
1252-
(
1253-
'python%s.dll' % (sys.version_info[0]),
1254-
'python%s_d.dll' % (sys.version_info[0])
1255-
),
1256-
(
1257-
'python%s%s.dll' % (sys.version_info[0], sys.version_info[1]),
1258-
'python%s%s_d.dll' % (sys.version_info[0], sys.version_info[1])
1259-
)
1260-
]
1251+
if is_pypy:
1252+
py_executable_dlls = [
1253+
(
1254+
'libpypy-c.dll',
1255+
'libpypy_d-c.dll',
1256+
),
1257+
]
1258+
else:
1259+
py_executable_dlls = [
1260+
(
1261+
'python%s.dll' % (sys.version_info[0]),
1262+
'python%s_d.dll' % (sys.version_info[0])
1263+
),
1264+
(
1265+
'python%s%s.dll' % (sys.version_info[0], sys.version_info[1]),
1266+
'python%s%s_d.dll' % (sys.version_info[0], sys.version_info[1])
1267+
)
1268+
]
12611269

12621270
for py_executable_dll, py_executable_dll_d in py_executable_dlls:
12631271
pythondll = os.path.join(os.path.dirname(sys.executable), py_executable_dll)
@@ -1281,7 +1289,7 @@ def install_python(home_dir, lib_dir, inc_dir, bin_dir, site_packages, clear, sy
12811289
copyfile(py_executable, python_executable, symlink)
12821290

12831291
if is_win:
1284-
for name in ['libexpat.dll', 'libpypy.dll', 'libpypy-c.dll',
1292+
for name in ['libexpat.dll',
12851293
'libeay32.dll', 'ssleay32.dll', 'sqlite3.dll',
12861294
'tcl85.dll', 'tk85.dll']:
12871295
src = join(prefix, name)

0 commit comments

Comments
 (0)