| 323 | # @return AbsPath: The Absolute path of the distribution file if existed, None else |
| 324 | # |
| 325 | def GetFullPathDist(DistFile, WorkspaceDir): |
| 326 | if os.path.isabs(DistFile): |
| 327 | if not (os.path.exists(DistFile) and os.path.isfile(DistFile)): |
| 328 | return None |
| 329 | else: |
| 330 | return DistFile |
| 331 | else: |
| 332 | AbsPath = os.path.normpath(os.path.join(os.getcwd(), DistFile)) |
| 333 | if not (os.path.exists(AbsPath) and os.path.isfile(AbsPath)): |
| 334 | AbsPath = os.path.normpath(os.path.join(WorkspaceDir, DistFile)) |
| 335 | if not (os.path.exists(AbsPath) and os.path.isfile(AbsPath)): |
| 336 | return None |
| 337 | |
| 338 | return AbsPath |
| 339 | |
| 340 | if __name__ == '__main__': |
| 341 | RETVAL = Main() |