Join GitHub today
GitHub is home to over 20 million developers working together to host and review code, manage projects, and build software together.
Consolidate builder into an Invoke Task #1596
added a commit
this pull request
Feb 27, 2014
Feb 27, 2014
1 check passed
This does bother me somewhat more than making the authors generation an invoke task, as I do on occasion run build-installer manually (for testing, making a dev copy, etc).
Can we not preserve the ability to run build-installer without needing invoke (for Windows users)? Does it have to be an all-or-nothing change?
While I don't want to get into a "competing task runners" debate, can I ask for some clarification on how invoke is impacting this code? From what I see:
It seems to me that invoke has a pretty minimal footprint, and it wouldn't be hard to make the code compatible with running outside of invoke:
Wrap the use of invoke in a try..except (or move the driver functions - see below - into a separate file.
Have the functions and the tasks separate:
Then people without invoke could call authors_impl direct from a driver script.
I have no idea what invoke.run gains over subprocess.check_output (given that we don't use the pty support) but if it's important to not use the latter when running via invoke, we could factor out the subprocess runner to use.
I'm willing to make these changes (someone should justify the use of invoke.run or I'll probably just replace it with subprocess) but only if there's agreement that future additions will follow the same pattern. If we don't want to go down this route, can we just factor out the installer task so it remains usable without invoke?
(I'm still looking into doit as an alternative to invoke for task running. If someone can list the key benefits to pip of invoke, that'll help me know what's important to replicate).
Sorry if maybe I got a little overzealous :) Mostly I'm trying to centralize stuff and get a single entry for this stuff that can be a little more standardized.
Besides pty support I think the only thing
As far as invoke vs something else, I admit that I didn't really bother to look around. Invoke is what I use for other projects and I'm friends with the maintainer/creator so I just reached for my standard tool. I would not be entirely opposed to switching as I think the benefit of getting all of these into one central location with one central method of calling them is still there but if Windows support can be added to invoke I'd prefer that over switching. I'm also OK with providing a
I don't know how big of a deal adding Windows support to invoke would be (to be honest I'm not sure of the differences that would affect something like that at all) and I don't want to "volunteer" or invent busy work for you @pfmoore. What do you think is the best path forward here?
I'm happy to help with porting invoke to Windows. (BTW, @Ivoz I don't think we need envoy - the only use of pexpect and pty in invoke is when the pty=True flag is set and I'd be perfectly happy just to raise an error in that case).
My main issue with invoke is that when I went and looked at the github project (which is annoyingly hard to find from the PyPI page, btw!) there's a month-old patch to provide Windows support. I know a month isn't long, and it's a self-described "quick and dirty" job, but it's about where I'd have started (the poster picked up a few points I'd not spotted). But other than a ping and a "me, too" message, there's no comment from anyone. I've added a comment saying I'm willing to help with Windows support, but I'm concerned whether Windows patches will get attention (let alone whether they'll get applied!)
@dstufft if you know the maintainer, maybe you could point him at pyinvoke/invoke#113? I'd be happy to have a discussion with him under that issue about how best to add Windows support while still keeping in line with how he wants the project to go. I can appreciate that if he's not a Windows user he's taking patches somewhat on trust, let's work out how we can make that OK for him. (Heck, if he wants, I can be the "annoying Windows guy" on invoke just as easily as I currently am for pip :-))