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

wininst regression: errors when building on linux #53200

Closed
techtonik mannequin opened this issue Jun 9, 2010 · 24 comments
Closed

wininst regression: errors when building on linux #53200

techtonik mannequin opened this issue Jun 9, 2010 · 24 comments
Assignees
Labels
stdlib Python modules in the Lib dir type-bug An unexpected behavior, bug, or error

Comments

@techtonik
Copy link
Mannequin

techtonik mannequin commented Jun 9, 2010

BPO 8954
Nosy @mhammond, @birkenfeld, @tarekziade, @merwok, @briancurtin, @zooba
Dependencies
  • bpo-10945: bdist_wininst depends on MBCS codec, unavailable on non-Windows
  • Files
  • suffix.patch: fixed comments version
  • issue1774043_7001.diff
  • 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/merwok'
    closed_at = <Date 2021-02-03.18:37:38.872>
    created_at = <Date 2010-06-09.14:20:42.724>
    labels = ['type-bug', 'library']
    title = 'wininst regression: errors when building on linux'
    updated_at = <Date 2021-02-03.18:37:38.872>
    user = 'https://bugs.python.org/techtonik'

    bugs.python.org fields:

    activity = <Date 2021-02-03.18:37:38.872>
    actor = 'steve.dower'
    assignee = 'eric.araujo'
    closed = True
    closed_date = <Date 2021-02-03.18:37:38.872>
    closer = 'steve.dower'
    components = ['Distutils', 'Distutils2']
    creation = <Date 2010-06-09.14:20:42.724>
    creator = 'techtonik'
    dependencies = ['10945']
    files = ['20325', '20451']
    hgrepos = []
    issue_num = 8954
    keywords = ['patch']
    message_count = 24.0
    messages = ['107398', '107399', '107400', '107432', '107533', '107535', '107536', '108776', '109984', '110075', '110076', '110083', '110109', '118800', '119085', '125847', '126523', '126529', '135893', '135902', '155568', '155592', '161316', '386442']
    nosy_count = 11.0
    nosy_names = ['mhammond', 'georg.brandl', 'jafo', 'techtonik', 'tarek', 'eric.araujo', 'brian.curtin', 'alexis', 'runtux', 'Aaron.Staley', 'steve.dower']
    pr_nums = []
    priority = 'normal'
    resolution = 'out of date'
    stage = 'resolved'
    status = 'closed'
    superseder = None
    type = 'behavior'
    url = 'https://bugs.python.org/issue8954'
    versions = ['3rd party', 'Python 2.7', 'Python 3.2', 'Python 3.3']

    @techtonik
    Copy link
    Mannequin Author

    techtonik mannequin commented Jun 9, 2010

    2.5.1 version of distutils was able to correctly build wininst dists from linux. Right now there are errors which I'll describe in more details once I can get some Linux box.

    @techtonik techtonik mannequin assigned tarekziade Jun 9, 2010
    @techtonik techtonik mannequin added the stdlib Python modules in the Lib dir label Jun 9, 2010
    @techtonik
    Copy link
    Mannequin Author

    techtonik mannequin commented Jun 9, 2010

    At least is was reported that compiled binaries contains wrong platform name, i.e. 'linux' and there are errors about inability to look up some compiler options in windows registry while building.

    @briancurtin
    Copy link
    Member

    Where was that reported?

    @briancurtin briancurtin added the type-bug An unexpected behavior, bug, or error label Jun 9, 2010
    @techtonik
    Copy link
    Mannequin Author

    techtonik mannequin commented Jun 9, 2010

    @techtonik
    Copy link
    Mannequin Author

    techtonik mannequin commented Jun 11, 2010

    $ python setup.py build bdist_wininst
    running build
    running build_py
    running bdist_wininst
    installing to build/bdist.linux-i686/wininst
    running install_lib
    creating build/bdist.linux-i686/wininst
    creating build/bdist.linux-i686/wininst/PURELIB
    copying build/lib.linux-i686-2.6/wget.py -> build/bdist.linux-i686/wininst/PURELIB
    running install_egg_info
    Writing build/bdist.linux-i686/wininst/PURELIB/wget-0.6.egg-info
    creating '/tmp/tmpQQZI5O.zip' and adding '.' to it
    adding 'PURELIB/wget-0.6.egg-info'
    adding 'PURELIB/wget.py'
    creating dist
    Warning: Can't read registry to find the necessary compiler setting
    Make sure that Python modules _winreg, win32api or win32con are installed.
    removing 'build/bdist.linux-i686/wininst' (and everything under it)
    $ ls dist
    wget-0.6.linux-i686.exe

    @merwok
    Copy link
    Member

    merwok commented Jun 11, 2010

    The error comes from the msvccompiler module, which shouldn’t get used on non-Windows platforms unless I’m mistaken. Reading the module, I’m not sure at all this command was meant to be run on not-Windows OSes.

    @techtonik
    Copy link
    Mannequin Author

    techtonik mannequin commented Jun 11, 2010

    It did run ok on non-Windows OSes with previous Python versions.

    @birkenfeld
    Copy link
    Member

    It certainly should be possible to build these installers, and if I understand your output correctly, an installer *was* built. The warning is, after all, just a warning, and probably just the warning got added compared to 2.5, but the behavior is the same.

    The platform name is a regression though.

    @techtonik
    Copy link
    Mannequin Author

    techtonik mannequin commented Jul 11, 2010

    The regression is two-fold:

    1. platform name regression is caused by r62197 by Mark Hammond - Issue bpo-2513: enable 64bit cross compilation on windows

    2. when wininst stub selection started to depend on MSVC compiler version is yet to be investigated, but I am sure that wininst stub selection should only be affected by compatibility with operating system only

    More complete research notes are at https://wave.google.com/wave/waveref/googlewave.com/w+GnQ9tjc8A

    @techtonik
    Copy link
    Mannequin Author

    techtonik mannequin commented Jul 12, 2010

    @birkenfeld
    Copy link
    Member

    Did you test that patch? ISTM that it contains a syntax error:

    + if not self.distribution.has_ext_modules()
    + and not self.distribution.has_c_libraries():

    @techtonik
    Copy link
    Mannequin Author

    techtonik mannequin commented Jul 12, 2010

    reuploaded correct version to rietveld.

    @mhammond
    Copy link
    Contributor

    With the caveat that I haven't tested it (I'm currently traveling), the patch looks good to me.

    @birkenfeld
    Copy link
    Member

    Raising priority.

    @merwok
    Copy link
    Member

    merwok commented Oct 18, 2010

    I get an error trying to run the command because of the use of the mbcs codec.

    Ezio made some comments on Rietveld, I addressed them in a local clone.

    Question for Windows users/experts: Do the terms “binary extension” and “binary code” make sense? If not, I can change them to the clearer “extension modules” and “C code”.

    @merwok merwok assigned merwok and unassigned tarekziade Oct 18, 2010
    @techtonik
    Copy link
    Mannequin Author

    techtonik mannequin commented Jan 9, 2011

    Fixed Ezio comments at http://codereview.appspot.com/1774043

    Eric, if I understand you correctly, the mbcs issue you're experiencing is unrelated to the patch. What else do you need?

    @techtonik
    Copy link
    Mannequin Author

    techtonik mannequin commented Jan 19, 2011

    Is this issue really critical?
    Bump.

    @merwok
    Copy link
    Member

    merwok commented Jan 19, 2011

    I opened another bug for the MBCS problem which prevents me from testing Anatoly’s patch.

    @runtux
    Copy link
    Mannequin

    runtux mannequin commented May 13, 2011

    2.6 already produces a .linux-i686.exe package instead of .win32.exe when running bdist_wininst. I've now used python2.5 for producing a binary windows installer for roundup.

    @merwok
    Copy link
    Member

    merwok commented May 13, 2011

    2.6 only gets security fixes.

    @jafo
    Copy link
    Mannequin

    jafo mannequin commented Mar 13, 2012

    Éric: In http://bugs.python.org/issue8954#msg135902 are you saying:

    This issue needs to be re-targeted to a newer Python.
    Close -- won't fix.
    Something else?

    This issue seems to be stuck here, any ideas on what needs to be done to move this forward?

    @merwok
    Copy link
    Member

    merwok commented Mar 13, 2012

    Sean: In msg135902 I am merely explaining why I removed 2.6 from the list of versions. Only 2.7, 3.2 and 3.3 can get fixed.

    If you look at my previous message or the list of dependencies, you can see that bpo-10945 needs to be fixed first before I can review the patch provided for this issue.

    @AaronStaley
    Copy link
    Mannequin

    AaronStaley mannequin commented May 22, 2012

    I was looking over this patch (as it relates to my bug report: http://bugs.python.org/issue14877?@ok_message=msg%20161314%20created%3Cbr%3Eissue%2014877%20message_count%2C%20messages%20edited%20ok&@template=item) and noticed that this line:

    + if (not self.distribution.has_ext_modules() and
    + not self.distribution.has_c_libraries()):
    + basename = "%s.%s" % (fullname, "win32")

    I feel it may be better to insert plat_name there if it exists. That way, users can create installers targeted for win-amd64. Why is this needed for a pure python packages? This bug: http://bugs.python.org/issue6792

    @zooba
    Copy link
    Member

    zooba commented Feb 3, 2021

    Distutils is now deprecated (see PEP-632) and all tagged issues are being closed. From now until removal, only release blocking issues will be considered for distutils.

    If this issue does not relate to distutils, please remove the component and reopen it. If you believe it still requires a fix, most likely the issue should be re-reported at https://github.com/pypa/setuptools

    @zooba zooba closed this as completed Feb 3, 2021
    @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 type-bug An unexpected behavior, bug, or error
    Projects
    None yet
    Development

    No branches or pull requests

    5 participants