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

Don't mention Perl in Windows build output #65340

Closed
zware opened this issue Apr 3, 2014 · 9 comments
Closed

Don't mention Perl in Windows build output #65340

zware opened this issue Apr 3, 2014 · 9 comments
Assignees
Labels
build The build process and cross-build OS-windows type-feature A feature request or enhancement

Comments

@zware
Copy link
Member

zware commented Apr 3, 2014

BPO 21141
Nosy @loewis, @terryjreedy, @pitrou, @tjguk, @zware
Files
  • issue21141.diff
  • issue21141.v2.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/zware'
    closed_at = <Date 2014-05-09.14:12:11.735>
    created_at = <Date 2014-04-03.03:39:49.401>
    labels = ['type-feature', 'OS-windows', 'build']
    title = "Don't mention Perl in Windows build output"
    updated_at = <Date 2014-05-09.14:12:11.734>
    user = 'https://github.com/zware'

    bugs.python.org fields:

    activity = <Date 2014-05-09.14:12:11.734>
    actor = 'zach.ware'
    assignee = 'zach.ware'
    closed = True
    closed_date = <Date 2014-05-09.14:12:11.735>
    closer = 'zach.ware'
    components = ['Build', 'Windows']
    creation = <Date 2014-04-03.03:39:49.401>
    creator = 'zach.ware'
    dependencies = []
    files = ['34711', '34717']
    hgrepos = []
    issue_num = 21141
    keywords = ['patch']
    message_count = 9.0
    messages = ['215421', '215463', '215476', '215487', '218147', '218151', '218153', '218164', '218165']
    nosy_count = 6.0
    nosy_names = ['loewis', 'terry.reedy', 'pitrou', 'tim.golden', 'python-dev', 'zach.ware']
    pr_nums = []
    priority = 'normal'
    resolution = 'fixed'
    stage = 'resolved'
    status = 'closed'
    superseder = None
    type = 'enhancement'
    url = 'https://bugs.python.org/issue21141'
    versions = ['Python 3.5']

    @zware
    Copy link
    Member Author

    zware commented Apr 3, 2014

    Attached is a patch that prevents mentioning Perl in the Windows build output, thereby avoiding giving the indication that Perl is necessary to build Python.

    To make this work, the patch converts PCbuild/build_ssl.py into PCbuild/prepare_ssl.py and removes the actual building of OpenSSL from that script. Instead, prepare_ssl.py takes a directory name as an argument (which is assumed to be a directory containing OpenSSL sources) and does what it has always done to prepare the way for building, except now it does it for both platforms. PCbuild/build_ssl.bat is also updated to match.

    Meanwhile, the actual building is moved entirely within ssl.vcxproj, which now runs a short script that copies buildinf*.h and opensslconf*.h into place and calls nmake with the appropriate makefile (x64 builds also run the appropriate nasm command first). Since this is all done inside ssl.vcxproj, the dependency on python.vcxproj is dropped, allowing SSL to be built in parallel with pythoncore, tcl, tk, and tix when using the '/m' msbuild command line switch.

    As a part of converting build_ssl.py into prepare_ssl.py, the comments at the top of the file have been updated. Also, some dead code has been trimmed: the "-a" flag has been completely unused for a long time, and debug builds have been disabled as well; all code relating to either feature has been removed.

    I've tested this by successfully preparing (once) and building openssl-1.0.1f in both 32 and 64 bit builds.

    @zware zware added build The build process and cross-build OS-windows type-feature A feature request or enhancement labels Apr 3, 2014
    @zware
    Copy link
    Member Author

    zware commented Apr 3, 2014

    Here's a slightly revised patch, including documentation changes in PCbuild/readme.txt. Also, this patch doesn't rename build_ssl.(bat|py), so Rietveld should accept the patch as reviewable. I think the renames should actually happen, though.

    @loewis
    Copy link
    Mannequin

    loewis mannequin commented Apr 3, 2014

    Can you please explain what this has to do with dropping the mentioning of Perl?

    @zware
    Copy link
    Member Author

    zware commented Apr 4, 2014

    Sure; currently, the "ssl" project emits messages from build_ssl.py concerning the finding of Perl. On a machine with a usable Perl, it's just

    " Found a working perl at 'C:\Perl\bin\perl.exe'"

    On machines without Perl, its the more worrisome

    """
    Can not find a suitable PERL:
    NO perl interpreters were found on this machine at all!
    Please install ActivePerl and ensure it appears on your path
    No Perl installation was found. Existing Makefiles are used.
    """

    The last line of that message (and the fact that the ssl-related projects build ok anyway, if using source from svn.python.org) ought to make it clear that Perl really isn't necessary, but removing the messages entirely removes the possibility of misunderstanding. The messages are still useful if you actually need the preparation part of build_ssl.py, though, so I don't want to just remove them from the script. Divorcing the building from the preparation has other benefits as well, which IMO would stand on their own, but that wasn't my main goal here.

    As for the brief discussion of Perl that remains in readme.txt, I think it should stay as long as we include a mention of how to use non-svn.python.org sources, just so that anyone needing to do a non-standard build will have some warning. On the other hand, readme.txt could just give the script invocation, and leave it up to the script to recommend Perl if it's not available.

    @tjguk
    Copy link
    Member

    tjguk commented May 9, 2014

    I'm at least +0 on this, not because I've ever been that bothered by the Perl messages, but because it tidies things up a little smooths the way very slightly for people trying to build Python on Windows and I'm always ready to support that.

    @pitrou
    Copy link
    Member

    pitrou commented May 9, 2014

    +1 for this. The current messages are confusing, and I think I've already installed Perl because of them.

    @loewis
    Copy link
    Mannequin

    loewis mannequin commented May 9, 2014

    The patch looks fine to me, including the renaming. Please apply.

    @python-dev
    Copy link
    Mannequin

    python-dev mannequin commented May 9, 2014

    New changeset 9ef99fafaadd by Zachary Ware in branch 'default':
    Issue bpo-21141: The Windows build process no longer attempts to find Perl,
    http://hg.python.org/cpython/rev/9ef99fafaadd

    @zware
    Copy link
    Member Author

    zware commented May 9, 2014

    Committed. Thanks for the review, Martin, and for the votes of confidence Tim and Antoine!

    @zware zware closed this as completed May 9, 2014
    @zware zware self-assigned this May 9, 2014
    @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
    build The build process and cross-build OS-windows type-feature A feature request or enhancement
    Projects
    None yet
    Development

    No branches or pull requests

    3 participants