setup.py
changeset 44080 4e05272dd681
parent 44058 bde1cd4c99d9
child 44115 e1b8b4e4f496
equal deleted inserted replaced
44079:191a461d6be6 44080:4e05272dd681
  1062         ):
  1062         ):
  1063             # can't make relative paths from one drive to another, so use an
  1063             # can't make relative paths from one drive to another, so use an
  1064             # absolute path instead
  1064             # absolute path instead
  1065             libdir = self.install_lib
  1065             libdir = self.install_lib
  1066         else:
  1066         else:
  1067             common = os.path.commonprefix((self.install_dir, self.install_lib))
  1067             libdir = os.path.relpath(self.install_lib, self.install_dir)
  1068             rest = self.install_dir[len(common) :]
       
  1069             uplevel = len([n for n in os.path.split(rest) if n])
       
  1070 
       
  1071             libdir = uplevel * ('..' + os.sep) + self.install_lib[len(common) :]
       
  1072 
  1068 
  1073         for outfile in self.outfiles:
  1069         for outfile in self.outfiles:
  1074             with open(outfile, 'rb') as fp:
  1070             with open(outfile, 'rb') as fp:
  1075                 data = fp.read()
  1071                 data = fp.read()
  1076 
  1072