Generate AUTHORS using git log #1594

Merged
merged 2 commits into from Feb 26, 2014

3 participants

@dstufft
Python Packaging Authority member

This is a work in progress for creating the ability to easily generate an AUTHORS file using the output of git log.

TODO

  • Complete and Verify the .mailmap to ensure we are accurately capturing all the names
  • Audit the diff to ensure that we've not lost any names
  • Figure out what to do with "Aziz Köksal" who is the creator of the tests/lib/path.py file but never actually contributed directly to pip but allowed the file to be relicensed.
  • Figure out what to do with "unknown <hakaton@Anam-mbl.(none)>" who authored 8ebc7a3.
@qwcode qwcode commented on the diff Feb 26, 2014
tasks/generate.py
@@ -0,0 +1,20 @@
+import io
+
+import invoke
@qwcode
qwcode added a note Feb 26, 2014

ok, so just install invoke locally so you can run these tasks?
and at some point, maybe we'll add more tasks for the whole release process?

@dstufft
Python Packaging Authority member
dstufft added a note Feb 26, 2014

Yes, that's the long term goal, that we can cut a release of pip with just inv release or maybe inv release <version> or something like that.

@jezdez
jezdez added a note Feb 26, 2014

\o/

@dstufft
Python Packaging Authority member
dstufft added a note Feb 26, 2014

For the record, you can run this as inv(oke) generate.authors.

@pfmoore
Python Packaging Authority member
pfmoore added a note Feb 26, 2014

From the PyPI entry, invoke doesn't mention being Windows compatible, and the docs don't say anything one way or the other. I've never done a release, so it doesn't really matter at the moment, but are we committing to a release process that won't run on Windows here? (We may already have a release process that won't run on Windows, of course, I don't know for certain).

@pfmoore
Python Packaging Authority member
pfmoore added a note Feb 26, 2014

It's not Windows compatible - uses pexpect and pty.

@dstufft
Python Packaging Authority member
dstufft added a note Feb 26, 2014

Ah yea invoke doesn't work on Windows. Not sure if it ever will. Let me ask @bitprophet if that is ever planned.

I'd rather not (poorly) reinvent the Wheel by writing our own invoke, and the alternatives are all either worse or don't work on Windows either afaik. Given that Linux and *nix os's are generally free and worst case scenario can be put on a VM at no cost inside a Windows machine I'm less worried about that. I don't want to sound like I'm discounting Windows though- Are you aware of anything like Invoke that works well that works on Windows?

@pfmoore
Python Packaging Authority member
pfmoore added a note Feb 26, 2014

To be honest, I didn't do more than glance at the invoke docs, because the discussion here got me curious. I know doit is somewhat similar and does work on Windows, but its API is a bit quirky, so I'm not recommending it. As I say, I don't really mind one way or the other - I doubt I'll be doing a release in the foreseeable future, so it's certainly not something to block this change on.

From what I see here, I'm not 100% sure I see the gain from invoke over just a Python script using subprocess.check_call. But maybe it's more about flexibility for the future.

Regardless, not something to worry about unduly.

@dstufft
Python Packaging Authority member
dstufft added a note Feb 26, 2014

Yea, the basic reason for not just using a python script is that I want to consolidate them :) We have a couple of python scripts laying around and I'd like everything to be available and discoverable from within invoke. It's also just the first step. Ideally we'll end up with a number of tasks that automate the various processes we have around pip, including releasing, and have it all done in one central location.

I talked to @bitprophet and he said that he's not planning on doing any Windows support himself, and he's not willing to seriously hamstring the invoke code base to support Windows, but that patches are welcome. He recognizes that Windows is a sizable minority but is unable to do the work himself. So if it becomes a problem in the future where we need Windows support we have a path forward where we can contribute patches to invoke.

By the way, I know it's less than ideal but we also have 2k a month worth of free servers too. If you want a persistent Linux box for dealing with pip on *nix I can spin one up for you. (They also support Windows servers, i've used them from time to time to test stuff on Windows).

@pfmoore
Python Packaging Authority member
pfmoore added a note Feb 26, 2014

Thanks. I'll probably look into what's involved in Windows support for invoke (task-runner tools are something I'm interested in anyway, I just hadn't seen invoke before, that's why I got curious in the first place). After all, I have so much free time :-)

A Unix box isn't a big problem - my PC is plenty big enough to run a VM locally. I just tend not to end up using a Unix environment day to day, so it gets stale & out of date. It's just as easy tbh to run one up from scratch when I need one.

@Ivoz
Python Packaging Authority member
Ivoz added a note Feb 27, 2014

Where do you see that invoke uses pexpect and pty?

edit: ahh, vendored.

I know of fabricate.py which is a little more self-contained (it's a simple module you can drop in anywhere) and advertises working on Windows.

I can't see anywhere that invoke says it doesn't work on Windows though :S

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
@qwcode

+1

@Ivoz
Python Packaging Authority member

Do we want "unknown" in the authors file? IMO just filter it.

@dstufft
Python Packaging Authority member

Well that unknown is a person who owns a copyright. Their full name is "unknown <hakaton@Anam-mbl.(none)>". Maybe I should see if their code even exists anymore.

@dstufft dstufft merged commit 48a16e2 into pypa:develop Feb 26, 2014

1 check passed

Details default The Travis CI build passed
@dstufft dstufft deleted the dstufft:authors-automation branch Feb 26, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment