Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

distutils error on windows #50303

Closed
ocean-city mannequin opened this issue May 18, 2009 · 6 comments
Closed

distutils error on windows #50303

ocean-city mannequin opened this issue May 18, 2009 · 6 comments
Assignees
Labels
stdlib Python modules in the Lib dir

Comments

@ocean-city
Copy link
Mannequin

ocean-city mannequin commented May 18, 2009

BPO 6053
Nosy @loewis, @tarekziade
Files
  • workaround_tar_problem.patch
  • fix_distutils_ensure_relative.patch
  • Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.

    Show more details

    GitHub fields:

    assignee = 'https://github.com/tarekziade'
    closed_at = <Date 2009-05-18.12:31:51.766>
    created_at = <Date 2009-05-18.11:07:50.338>
    labels = ['library']
    title = 'distutils error on windows'
    updated_at = <Date 2009-05-18.20:16:39.639>
    user = 'https://bugs.python.org/ocean-city'

    bugs.python.org fields:

    activity = <Date 2009-05-18.20:16:39.639>
    actor = 'loewis'
    assignee = 'tarek'
    closed = True
    closed_date = <Date 2009-05-18.12:31:51.766>
    closer = 'tarek'
    components = ['Distutils']
    creation = <Date 2009-05-18.11:07:50.338>
    creator = 'ocean-city'
    dependencies = []
    files = ['14007', '14008']
    hgrepos = []
    issue_num = 6053
    keywords = ['patch']
    message_count = 6.0
    messages = ['88025', '88026', '88027', '88028', '88029', '88049']
    nosy_count = 3.0
    nosy_names = ['loewis', 'ocean-city', 'tarek']
    pr_nums = []
    priority = 'normal'
    resolution = None
    stage = None
    status = 'closed'
    superseder = None
    type = None
    url = 'https://bugs.python.org/issue6053'
    versions = ['Python 2.7']

    @ocean-city
    Copy link
    Mannequin Author

    ocean-city mannequin commented May 18, 2009

    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]

    @ocean-city ocean-city mannequin assigned tarekziade May 18, 2009
    @ocean-city ocean-city mannequin added the stdlib Python modules in the Lib dir label May 18, 2009
    @ocean-city
    Copy link
    Mannequin Author

    ocean-city mannequin commented May 18, 2009

    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.

    @tarekziade
    Copy link
    Mannequin

    tarekziade mannequin commented May 18, 2009

    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

    @tarekziade
    Copy link
    Mannequin

    tarekziade mannequin commented May 18, 2009

    (and also fix the test in 2.6 for this case)

    @tarekziade
    Copy link
    Mannequin

    tarekziade mannequin commented May 18, 2009

    ok done, thanks for the patch;

    @tarekziade tarekziade mannequin closed this as completed May 18, 2009
    @loewis
    Copy link
    Mannequin

    loewis mannequin commented May 18, 2009

    1. 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.

    @ezio-melotti ezio-melotti transferred this issue from another repository Apr 10, 2022
    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
    Labels
    stdlib Python modules in the Lib dir
    Projects
    None yet
    Development

    No branches or pull requests

    0 participants