Author: mattip <matti.pi...@gmail.com> Branch: win32-lib-name Changeset: r83412:a1bfc9e7f00c Date: 2016-03-28 19:14 +0300 http://bitbucket.org/pypy/pypy/changeset/a1bfc9e7f00c/
Log: fix for case where cwd is not pypy/goal diff --git a/pypy/goal/targetpypystandalone.py b/pypy/goal/targetpypystandalone.py --- a/pypy/goal/targetpypystandalone.py +++ b/pypy/goal/targetpypystandalone.py @@ -240,8 +240,9 @@ "when --shared is on (it is by default). " "See issue #1971.") if sys.platform == 'win32': - config.translation.libname = '..\\..\\libs\\python27.lib' - thisdir.join('..', '..', 'libs').ensure(dir=1) + libdir = thisdir.join('..', '..', 'libs') + libdir.ensure(dir=1) + config.translation.libname = str(libdir.join('python27.lib')) if config.translation.thread: config.objspace.usemodules.thread = True diff --git a/rpython/translator/driver.py b/rpython/translator/driver.py --- a/rpython/translator/driver.py +++ b/rpython/translator/driver.py @@ -490,10 +490,12 @@ # for pypy, the import library is renamed and moved to # libs/python27.lib, according to the pragma in pyconfig.h libname = self.config.translation.libname - libname = libname or soname.new(ext='lib').basename - libname = str(newsoname.dirpath().join(libname)) - shutil.copyfile(str(soname.new(ext='lib')), libname) - self.log.info("copied: %s" % (libname,)) + oldlibname = soname.new(ext='lib') + if not libname: + libname = oldlibname.basename + libname = str(newsoname.dirpath().join(libname)) + shutil.copyfile(str(oldlibname), libname) + self.log.info("copied: %s to %s" % (oldlibname, libname,)) # the pdb file goes in the same place as pypy(w).exe ext_to_copy = ['pdb',] for ext in ext_to_copy: _______________________________________________ pypy-commit mailing list pypy-commit@python.org https://mail.python.org/mailman/listinfo/pypy-commit