classification
Title: distutils error on windows
Type: Stage:
Components: Distutils Versions: Python 2.7
process
Status: closed Resolution:
Dependencies: Superseder:
Assigned To: tarek Nosy List: loewis, ocean-city, tarek
Priority: normal Keywords: patch

Created on 2009-05-18 11:07 by ocean-city, last changed 2009-05-18 20:16 by loewis. This issue is now closed.

Files
File name Uploaded Description Edit
workaround_tar_problem.patch ocean-city, 2009-05-18 11:14
fix_distutils_ensure_relative.patch ocean-city, 2009-05-18 11:15
Messages (6)
msg88025 - (view) Author: Hirokazu Yamamoto (ocean-city) * (Python committer) Date: 2009-05-18 11:07
I found two distutils error on windows.

1. If the implementation of ensure_relative is correct, test should be
fixed like attached patch.

2. I got tar error. This happens because tar command I'm using cannot
recognize path with drive letter. For example, "tar -cf r:/foo ." fails
with error. I'm using http://gnuwin32.sourceforge.net/packages/gtar.htm

E:\python-dev\trunk\Lib\distutils\tests>py test_archive_util.py
..tar: Cannot open
c:\docume~1\whiter~1\locals~1\temp\tmprd9lcc\archive.tar: Fun
ction not implemented
tar: Error is not recoverable: exiting now
E.
======================================================================
ERROR: test_make_tarball (__main__.ArchiveUtilTestCase)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "test_archive_util.py", line 35, in test_make_tarball
    make_tarball(base_name, '.')
  File "e:\python-dev\trunk\lib\distutils\archive_util.py", line 47, in
make_tar
ball
    spawn(cmd, dry_run=dry_run)
  File "e:\python-dev\trunk\lib\distutils\spawn.py", line 37, in spawn
    _spawn_nt(cmd, search_path, dry_run=dry_run)
  File "e:\python-dev\trunk\lib\distutils\spawn.py", line 86, in _spawn_nt
    "command '%s' failed with exit status %d" % (cmd[0], rc)
DistutilsExecError: command 'tar' failed with exit status 2

----------------------------------------------------------------------
Ran 4 tests in 0.591s

FAILED (errors=1)
[32258 refs]
msg88026 - (view) Author: Hirokazu Yamamoto (ocean-city) * (Python committer) Date: 2009-05-18 11:14
Here is workaround for second issue. If there is tar command for windows
which supports drive letter, I think I should use it instead of
workaround or fix, though.
msg88027 - (view) Author: Tarek Ziadé (tarek) * (Python committer) Date: 2009-05-18 11:17
I am currently working on the removal of 'tar' in favor of the usage of
tarinfo, so I'll get back to you in this issue when it's ready
msg88028 - (view) Author: Tarek Ziadé (tarek) * (Python committer) Date: 2009-05-18 11:18
(and also fix the test in 2.6 for this case)
msg88029 - (view) Author: Tarek Ziadé (tarek) * (Python committer) Date: 2009-05-18 12:31
ok done, thanks for the patch;
msg88049 - (view) Author: Martin v. Löwis (loewis) * (Python committer) Date: 2009-05-18 20:16
> 2. I got tar error. This happens because tar command I'm using cannot
> recognize path with drive letter. For example, "tar -cf r:/foo ." fails
> with error. I'm using http://gnuwin32.sourceforge.net/packages/gtar.htm

I don't think this is a bug in distutils, but rather in the tar command
that you are using.
History
Date User Action Args
2009-05-18 20:16:39loewissetnosy: + loewis
messages: + msg88049
2009-05-18 12:31:51tareksetstatus: open -> closed

messages: + msg88029
2009-05-18 11:18:24tareksetmessages: + msg88028
2009-05-18 11:17:25tareksetmessages: + msg88027
2009-05-18 11:15:04ocean-citysetfiles: + fix_distutils_ensure_relative.patch
2009-05-18 11:14:06ocean-citysetfiles: + workaround_tar_problem.patch
keywords: + patch
messages: + msg88026
2009-05-18 11:07:50ocean-citycreate