Skip to content
This repository has been archived by the owner on Feb 8, 2018. It is now read-only.

replace make {env,env/swaddle} with a bootstrap.py script #1134

Closed
wants to merge 6 commits into from

Conversation

chadwhitacre
Copy link
Contributor

This starts to move us away from a dependency on make towards a dependency on Python alone, helping with portability to Windows and clearing the way for the development of a gittip CLI to be the primary way that contributors interact with Gittip on their local system.

This uses virtualenv as a library(!) to create a new virtualenv and
tells the user a bit about how to use it. Now to deliver the gittip cli
we promise in our bootstrap welcome message.
I believe all make targets should continue to function as usual, but now
the functionality of make {env,env/swaddle} is provided by bootstrap.py
(which uses virtualenv as a library) instead of calling virtualenv as a
command. Ready for a pull request.
Travis CI starts us off in a virtualenv, but we want to own the
virtualenv. I think it's actually a better experience for users if we
don't let them run bootstrap.py in another virtualenv, because it gives
us a chance to communicate Gittip's worldview on the matter (we're using
virtualenv as a library, not a cli). Let's see if we can convince Travis
to go along with us here.
@chadwhitacre
Copy link
Contributor Author

Would love a code review here, if anyone's up for it. @pjz @igetgames @joeyespo et al.

@joeyespo
Copy link
Contributor

This looks great!

I pulled locally and tried it out. Everything works, except when I don't have Postgres installed. It gives me "Error: pg_config executable not found." then aborts the whole thing with "Failed to bootstrap Gittip. :(" Running bootstrap again fails because env already exists.

Should we handle this case? Or revert by deleting / sending it to the trash when it fails?

Looks good though. 👍 from me, and perhaps opening another issue for that pg case.

@chadwhitacre
Copy link
Contributor Author

Thanks for giving it a try, @joeyespo! That's not good to fail because env/ exists right after failing on postgres. Ubuntu users need to install the Postgres and Python dev packages as well, so I'm expecting that to be a common failure mode.

In general I'm feeling like this bootstrap.py does too much. Ideally it would just install a virtualenv with a Gittip CLI. Then the Gittip CLI would be used to actually build the web app. What if someone wants to work on the widget server instead? Or (eventually) on a mobile app or other product? I think it'd be a good developer experience to have a single tool to manage all of those different projects. Eh?

@joeyespo
Copy link
Contributor

That's not good to fail because env/ exists right after failing on postgres.

Agreed. Could we check for postgres first then, since that's a dependency that can't be installed by bootstrap?

Ideally it would just install a virtualenv with a Gittip CLI

Oh, I actually like this idea much more. For one, you could then add to the build, e.g. optimizing images, minifying, combining files.

@chadwhitacre
Copy link
Contributor Author

Closing old pull requests in order to manage queue size.

@chadwhitacre chadwhitacre deleted the gittip-cli branch September 17, 2013 19:14
@chadwhitacre chadwhitacre restored the gittip-cli branch September 19, 2013 23:33
@chadwhitacre
Copy link
Contributor Author

Interesting. We really can't reopen pull requests that were created by promoting issues.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants