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

Tools/freeze/winmakemakefile.py clean target should use 'del' instead of 'rm' #71753

Closed
DavidD mannequin opened this issue Jul 18, 2016 · 6 comments
Closed

Tools/freeze/winmakemakefile.py clean target should use 'del' instead of 'rm' #71753

DavidD mannequin opened this issue Jul 18, 2016 · 6 comments
Labels
easy OS-windows type-bug An unexpected behavior, bug, or error

Comments

@DavidD
Copy link
Mannequin

DavidD mannequin commented Jul 18, 2016

BPO 27566
Nosy @pfmoore, @tjguk, @zware, @zooba, @lisroach
Files
  • rm_to_del.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 = None
    closed_at = <Date 2016-09-10.01:42:47.474>
    created_at = <Date 2016-07-18.19:50:39.930>
    labels = ['easy', 'type-bug', 'OS-windows']
    title = "Tools/freeze/winmakemakefile.py clean target should use 'del' instead of 'rm'"
    updated_at = <Date 2016-09-10.01:42:47.473>
    user = 'https://bugs.python.org/DavidD'

    bugs.python.org fields:

    activity = <Date 2016-09-10.01:42:47.473>
    actor = 'steve.dower'
    assignee = 'none'
    closed = True
    closed_date = <Date 2016-09-10.01:42:47.474>
    closer = 'steve.dower'
    components = ['Demos and Tools', 'Windows']
    creation = <Date 2016-07-18.19:50:39.930>
    creator = 'David D'
    dependencies = []
    files = ['43999']
    hgrepos = []
    issue_num = 27566
    keywords = ['patch', 'easy']
    message_count = 6.0
    messages = ['270787', '271938', '271988', '271992', '275533', '275534']
    nosy_count = 7.0
    nosy_names = ['paul.moore', 'tim.golden', 'python-dev', 'zach.ware', 'steve.dower', 'lisroach', 'David D']
    pr_nums = []
    priority = 'normal'
    resolution = 'fixed'
    stage = 'resolved'
    status = 'closed'
    superseder = None
    type = 'behavior'
    url = 'https://bugs.python.org/issue27566'
    versions = ['Python 2.7', 'Python 3.5', 'Python 3.6']

    @DavidD
    Copy link
    Mannequin Author

    DavidD mannequin commented Jul 18, 2016

    The command for the clean target in the Windows makefile is the same as the one in the Linux one: using rm -f.

    Should be changed to del /f or erase /f.

    @DavidD DavidD mannequin added OS-windows type-bug An unexpected behavior, bug, or error labels Jul 18, 2016
    @zware zware added the easy label Jul 18, 2016
    @zware zware changed the title Freeze: winmakemakefile.py: clean: Linux instead of Windows command Tools/freeze/winmakemakefile.py clean target should use 'del' instead of 'rm' Jul 18, 2016
    @lisroach
    Copy link
    Contributor

    lisroach commented Aug 4, 2016

    I think this patch makes the proper fix, changed the lines:

        print("\t-rm -f *.obj")
        print("\t-rm -f $(target).exe")

    to

        print("\t-del /f *.obj")
        print("\t-del /f $(target).exe")

    @zooba
    Copy link
    Member

    zooba commented Aug 4, 2016

    I suspect it will also need the /Q option, at least on the one with the wildcard, otherwise there will be a prompt. Though I'm not entirely clear on where this is run (nmake?) so maybe it's already suppressed.

    The fact that I'm not familiar with this makefile suggests it isn't needed for normal Windows builds though, and if this is only meant for Cygwin/MinGW builds then I think assuming rf availability is fine.

    @zware
    Copy link
    Member

    zware commented Aug 4, 2016

    It is run by nmake.

    This isn't Cygwin-related, it's for 'freezing' a program a la py2exe or cx_Freeze; see Tools/freeze/README. I have yet to try it without py2exe or cx_Freeze, but it's theoretically possible :)

    @python-dev
    Copy link
    Mannequin

    python-dev mannequin commented Sep 10, 2016

    New changeset e96eb2bd0d5e by Steve Dower in branch '2.7':
    Issue bpo-27566: Fix clean target in freeze makefile (patch by Lisa Roach)
    https://hg.python.org/cpython/rev/e96eb2bd0d5e

    New changeset 3ffff303df95 by Steve Dower in branch '3.5':
    Issue bpo-27566: Fix clean target in freeze makefile (patch by Lisa Roach)
    https://hg.python.org/cpython/rev/3ffff303df95

    New changeset 6a2d95630a7c by Steve Dower in branch 'default':
    Issue bpo-27566: Fix clean target in freeze makefile (patch by Lisa Roach)
    https://hg.python.org/cpython/rev/6a2d95630a7c

    @zooba
    Copy link
    Member

    zooba commented Sep 10, 2016

    Committed the patch as-is. I suspect make will have a way to suppress UI anyway, but if not then we can do another patch!

    @zooba zooba closed this as completed Sep 10, 2016
    @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
    easy OS-windows type-bug An unexpected behavior, bug, or error
    Projects
    None yet
    Development

    No branches or pull requests

    3 participants