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

'make clinic' does not work for out of tree builds / clinic.py is not in the devguide #74677

Closed
gpshead opened this issue May 27, 2017 · 8 comments
Labels
3.7 (EOL) end of life build The build process and cross-build docs Documentation in the Doc dir topic-argument-clinic

Comments

@gpshead
Copy link
Member

gpshead commented May 27, 2017

BPO 30492
Nosy @nascheme, @gpshead, @vstinner, @larryhastings, @zware, @iritkatriel
PRs
  • bpo-30492: Allow make clinic to work out of tree. #1836
  • 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 2022-01-17.23:03:31.981>
    created_at = <Date 2017-05-27.18:28:09.959>
    labels = ['build', '3.7', 'expert-argument-clinic', 'docs']
    title = "'make clinic' does not work for out of tree builds / clinic.py is not in the devguide"
    updated_at = <Date 2022-01-17.23:03:31.980>
    user = 'https://github.com/gpshead'

    bugs.python.org fields:

    activity = <Date 2022-01-17.23:03:31.980>
    actor = 'iritkatriel'
    assignee = 'docs@python'
    closed = True
    closed_date = <Date 2022-01-17.23:03:31.981>
    closer = 'iritkatriel'
    components = ['Documentation', 'Argument Clinic']
    creation = <Date 2017-05-27.18:28:09.959>
    creator = 'gregory.p.smith'
    dependencies = []
    files = []
    hgrepos = []
    issue_num = 30492
    keywords = []
    message_count = 8.0
    messages = ['294604', '294605', '294606', '294607', '294617', '308795', '308799', '410830']
    nosy_count = 7.0
    nosy_names = ['nascheme', 'gregory.p.smith', 'vstinner', 'larry', 'docs@python', 'zach.ware', 'iritkatriel']
    pr_nums = ['1836']
    priority = 'normal'
    resolution = 'fixed'
    stage = 'resolved'
    status = 'closed'
    superseder = None
    type = 'compile error'
    url = 'https://bugs.python.org/issue30492'
    versions = ['Python 3.7']

    @gpshead
    Copy link
    Member Author

    gpshead commented May 27, 2017

    I never do in-tree builds anymore because they make me feel dirty and leave build artifacts cluttering up my source tree.

    make clinic does not work for out of tree builds.

    To reproduce:

    ~$ git clone ...cpython repo...
    ~$ mkdir build && cd build
    ~/build$ ../cpython/configure --with-pydebug
    ~/build$ make clinic
    ./python -E ./Tools/clinic/clinic.py --make
    ./python: can't open file './Tools/clinic/clinic.py': [Errno 2] No such file or directory
    Makefile:545: recipe for target 'clinic' failed
    make: *** [clinic] Error 2

    Per https://docs.python.org/3/howto/clinic.html it looks like I can just manually run clinic.py on the files I have modified. Ideally the build system would take care of that for me. But all I really want is a single command that keeps me up to date.

    python3 Tools/clinic/clinic.py appears to be that command. Even if it isn't fixed for out of tree builds, use of clinic needs to be in the devguide.

    @gpshead gpshead added the 3.7 (EOL) end of life label May 27, 2017
    @gpshead gpshead added docs Documentation in the Doc dir topic-argument-clinic build The build process and cross-build labels May 27, 2017
    @larryhastings
    Copy link
    Contributor

    I don't know how to fix it. "make clinic" needs to be run in-tree anyway as it's modifying the C source code in place.

    Can you suggest a patch?

    @gpshead
    Copy link
    Member Author

    gpshead commented May 27, 2017

    The Makefile knows where the source tree is, I think we can make it tell clinic.py. Let me whip something up.

    @gpshead
    Copy link
    Member Author

    gpshead commented May 27, 2017

    My PR doesn't address the potential issue of needing to have done a make all before doing a make clinic. I'll leave that for something else, there could be bootstrapping issues in that situation depending on what the developer is doing.

    In that less common case, running clinic.py oneself under a stable python3 interpreter is probably advisable.

    The devguide docs still need to mention 'make clinic' and point to the argument clinic docs in some section talking about the Modules/ tree.

    @gpshead
    Copy link
    Member Author

    gpshead commented May 27, 2017

    New changeset 178418a by Gregory P. Smith in branch 'master':
    bpo-30492: Allow make clinic to work out of tree. (bpo-1836)
    178418a

    @nascheme
    Copy link
    Member

    Thanks for fixing this. I always do my builds in subfolders as well. It is handy to have multiple builds (debug, opt, profiled) that all use a single source tree.

    I don't like to hijack this issue but could we get some of the build bots to do their builds in a subfolder? I don't know who would be able to make that change. It would be good to smoke out these kinds of problems early. Otherwise wierdo's like gps and I don't notice them until later.

    If we don't keep this working, we should just rip the ability to do builds outside of the source tree out of the Makefile. There is no point to maintaining the extra complication if it doesn't actually work. With git shallow clones, I could live with that. However, it seems a shame to lose it when it basically currently works fine.

    @zware
    Copy link
    Member

    zware commented Dec 20, 2017

    I don't like to hijack this issue but could we get some of the build bots to do their builds in a subfolder?

    The buildmaster config is at https://github.com/python/buildmaster-config, feel free to submit a pull request that sets the ware-gentoo bot building out-of-tree. Victor or I can merge and deploy, but I don't have the bandwidth to make the change myself currently.

    @iritkatriel
    Copy link
    Member

    I'm closing because the original issue was fixed and testing out of tree build issue is the subject of bpo-45695.

    @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
    3.7 (EOL) end of life build The build process and cross-build docs Documentation in the Doc dir topic-argument-clinic
    Projects
    None yet
    Development

    No branches or pull requests

    5 participants