Index: setuptools/tests/__init__.py
===================================================================
--- setuptools/tests/__init__.py	(revision 60968)
+++ setuptools/tests/__init__.py	(working copy)
@@ -13,6 +13,9 @@
 from distutils.util import convert_path
 import sys, os.path
 
+supports_extract_constant = \
+    not sys.platform.startswith('java') and sys.platform != 'cli'
+
 def additional_tests():
     import doctest, unittest
     suite = unittest.TestSuite((
@@ -47,6 +50,8 @@
 class DependsTests(TestCase):
 
     def testExtractConst(self):
+        if not supports_extract_constant:
+            return
 
         from setuptools.depends import extract_constant
 
@@ -74,6 +79,9 @@
         f,p,i = find_module('setuptools.tests'); f.close()
 
     def testModuleExtract(self):
+        if not supports_extract_constant:
+            return
+
         from distutils import __version__
         self.assertEqual(
             get_module_constant('distutils','__version__'), __version__
@@ -86,6 +94,8 @@
         )
 
     def testRequire(self):
+        if not supports_extract_constant:
+            return
 
         req = Require('Distutils','1.0.3','distutils')
 
Index: setuptools/command/egg_info.py
===================================================================
--- setuptools/command/egg_info.py	(revision 60968)
+++ setuptools/command/egg_info.py	(working copy)
@@ -168,6 +168,7 @@
         for ep in iter_entry_points('egg_info.writers'):
             writer = ep.load(installer=installer)
             writer(self, ep.name, os.path.join(self.egg_info,ep.name))
+        self.prune_native_libs()
         self.find_sources()
 
     def tags(self):
@@ -252,6 +253,16 @@
         mm.run()
         self.filelist = mm.filelist
 
+    def prune_native_libs(self):
+        """Delete the native_libs.txt from the egg-info dir
+
+        If it exists it was mistakenly created in an earlier version of
+        bdist_egg
+        """
+        native_libs = os.path.join(self.egg_info,"native_libs.txt")
+        if os.path.exists(native_libs):
+            self.delete_file(native_libs)
+
     def check_broken_egg_info(self):
         bei = self.egg_name+'.egg-info'
         if self.egg_base != os.curdir:
Index: setuptools/command/bdist_egg.py
===================================================================
--- setuptools/command/bdist_egg.py	(revision 60968)
+++ setuptools/command/bdist_egg.py	(working copy)
@@ -203,10 +203,13 @@
             log.info("installing scripts to %s" % script_dir)
             self.call_command('install_scripts',install_dir=script_dir,no_ep=1)
 
-        native_libs = os.path.join(self.egg_info,"native_libs.txt")
+        self.copy_metadata_to(egg_info)
+
+        native_libs = os.path.join(egg_info,"native_libs.txt")
         if all_outputs:
             log.info("writing %s" % native_libs)
             if not self.dry_run:
+                ensure_directory(egg_info)
                 libs_file = open(native_libs, 'wt')
                 libs_file.write('\n'.join(all_outputs))
                 libs_file.write('\n')
@@ -216,8 +219,6 @@
             if not self.dry_run:
                 os.unlink(native_libs)
 
-        self.copy_metadata_to(egg_info)
-
         write_safety_flag(
             os.path.join(archive_root,'EGG-INFO'), self.zip_safe()
         )
