[pypy-commit] pypy py3k: do not rename windows import library in rpython, it belongs in pypy

mattip noreply at buildbot.pypy.org
Sun Apr 13 16:33:44 CEST 2014


Author: Matti Picus <matti.picus at gmail.com>
Branch: py3k
Changeset: r70611:76a42490f211
Date: 2014-04-13 15:09 +0300
http://bitbucket.org/pypy/pypy/changeset/76a42490f211/

Log:	do not rename windows import library in rpython, it belongs in pypy

diff --git a/rpython/translator/driver.py b/rpython/translator/driver.py
--- a/rpython/translator/driver.py
+++ b/rpython/translator/driver.py
@@ -476,11 +476,11 @@
                 shutil_copy(str(soname), str(newsoname))
                 self.log.info("copied: %s" % (newsoname,))
                 if sys.platform == 'win32':
-                    # the import library is named python27.lib, according
-                    # to the pragma in pyconfig.h
-                    libname = str(newsoname.dirpath().join('python27.lib'))
-                    shutil.copyfile(str(soname.new(ext='lib')), libname)
-                    self.log.info("copied: %s" % (libname,))
+                    # copy the import library as well
+                    libname = soname.new(ext='lib')
+                    newlibname = newexename.new(basename=soname.basename)
+                    shutil.copyfile(str(libname), str(newlibname.new(ext='lib')))
+                    self.log.info("copied: %s" % (newlibname,))
             self.c_entryp = newexename
         self.log.info('usession directory: %s' % (udir,))
         self.log.info("created: %s" % (self.c_entryp,))
diff --git a/rpython/translator/test/test_driver.py b/rpython/translator/test/test_driver.py
--- a/rpython/translator/test/test_driver.py
+++ b/rpython/translator/test/test_driver.py
@@ -72,7 +72,7 @@
     td.create_exe()
     assert dst_name.read() == 'exe'
     assert dst_name.new(ext='dll').read() == 'dll'
-    assert dst_name.new(purebasename='python27',ext='lib').read() == 'lib'
+    assert dst_name.new(ext='lib').read() == 'lib'
 
 def test_shutil_copy():
     a = udir.join('file_a')


More information about the pypy-commit mailing list