Skip to content

bdist_wininst no longer works on non-Windows platforms #49981

Closed

Description

@pfmoore
BPO 5731
Nosy @mhammond, @pfmoore, @tarekziade, @merwok
Files
  • bdist_wininst.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-04-09.22:52:15.749>
    created_at = <Date 2009-04-09.20:51:23.057>
    labels = ['type-bug', 'library']
    title = 'bdist_wininst no longer works on non-Windows platforms'
    updated_at = <Date 2010-10-18.20:44:51.421>
    user = 'https://github.com/pfmoore'

    bugs.python.org fields:

    activity = <Date 2010-10-18.20:44:51.421>
    actor = 'eric.araujo'
    assignee = 'tarek'
    closed = True
    closed_date = <Date 2009-04-09.22:52:15.749>
    closer = 'tarek'
    components = ['Distutils']
    creation = <Date 2009-04-09.20:51:23.057>
    creator = 'paul.moore'
    dependencies = []
    files = ['13666']
    hgrepos = []
    issue_num = 5731
    keywords = ['patch']
    message_count = 5.0
    messages = ['85825', '85829', '85830', '85833', '119078']
    nosy_count = 4.0
    nosy_names = ['mhammond', 'paul.moore', 'tarek', 'eric.araujo']
    pr_nums = []
    priority = 'normal'
    resolution = None
    stage = None
    status = 'closed'
    superseder = None
    type = 'behavior'
    url = 'https://bugs.python.org/issue5731'
    versions = ['Python 2.6', 'Python 3.0', 'Python 3.1', 'Python 2.7']

    Activity

    1. pfmoore commented on Apr 9, 2009

      @pfmoore
      MemberAuthor

      In revision 62197, Mon Apr 7 01:53:39 2008 UTC, Mark Hammond added code
      to Lib/distutils/command/bdist_wininst.py which was intended to select
      an architecture-specific installer executable.

      In doing so, the code appears to have broken the ability to build
      installers on non-Windows platforms.

      The current code is

      if self.plat_name == 'win32':
          sfix = ''
      else:
          sfix = self.plat_name[3:] # strip 'win' - leaves eg '-amd64'
      filename = os.path.join(directory, "wininst-%.1f%s.exe" % (bv, sfix))
      return open(filename, "rb").read()

      This says "strip 'win'", but in practice strips the first 3 characters
      from any plat_name other than win32.

      I've attached an untested patch to fix this, by setting sfix to '' if
      self.plat_name doesn't start with 'win'.

    2. added
      stdlibStandard Library Python modules in the Lib/ directory
      type-bugAn unexpected behavior, bug, or error
      on Apr 9, 2009
    3. mhammond commented on Apr 9, 2009

      @mhammond
      Contributor

      +1 on the idea - it's not the first time I've forgotten that works on
      platforms other than Windows. It appears the patch you attached is
      reversed though (or its just way too early for me...)

    4. tarekziade commented on Apr 9, 2009

      tarekziademannequin
      Mannequin

      Mark, I have just applied the patch in r71413 because it was obvious.

      If it's fine with you I'll backport it to 2.6 so it makes it to 2.6.2 final

    5. tarekziade commented on Apr 9, 2009

      tarekziademannequin
      Mannequin

      fixed in r71413 and r71415.

      Thanks for the patch !

    6. merwok commented on Oct 18, 2010

      @merwok
      Member

      Follow-up in bpo-8954

    7. transferred this issue fromon Apr 10, 2022
    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

    Metadata

    Metadata

    Assignees

    Labels

    stdlibStandard Library Python modules in the Lib/ directorytype-bugAn unexpected behavior, bug, or error

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions