Commits

Anonymous committed 59c4dc2

Construct ``.pth`` file paths in such a way that installing an egg whose
name begins with ``import`` doesn't cause a syntax error.

  • Participants
  • Parent commits ff14195
  • Branches setuptools-0.6

Comments (0)

Files changed (2)

File EasyInstall.txt

    ``PYTHONPATH`` directory with ``--multi-version``, unless an
    ``easy-install.pth`` file is already in use there.
 
+ * Construct ``.pth`` file paths in such a way that installing an egg whose
+   name begins with ``import`` doesn't cause a syntax error.
+
 0.6b1
  * Better ambiguity management: accept ``#egg`` name/version even if processing
    what appears to be a correctly-named distutils file, and ignore ``.egg``

File setuptools/command/easy_install.py

         """Write changed .pth file back to disk"""
         if not self.dirty:
             return
-            
+
         data = '\n'.join(map(self.make_relative,self.paths))
         if data:
             log.debug("Saving %s", self.filename)
 
     def make_relative(self,path):
         if normalize_path(os.path.dirname(path))==self.basedir:
-            return os.path.basename(path)
+            return os.path.join(os.curdir, os.path.basename(path))
         return path
 
 
                 del zdc[p]
                 return
 
-    
+
 def get_script_args(dist, executable=sys_executable):
     """Yield write_script() argument tuples for a distribution's entrypoints"""
     spec = str(dist.as_requirement())