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

Python support #19

Closed
josegonzalez opened this issue Oct 5, 2013 · 19 comments
Closed

Python support #19

josegonzalez opened this issue Oct 5, 2013 · 19 comments

Comments

@josegonzalez
Copy link

Ditto on what I said in PHP. Could be good to have multiple versions of both.

@fgrehm
Copy link
Owner

fgrehm commented Oct 5, 2013

Ditto what I said in PHP but with the difference that I've never done any "real world python" before :)

@josegonzalez
Copy link
Author

I believe python 2.7 comes out of the box on Ubuntu, but they will be moving to 3.3 in the future.

http://askubuntu.com/questions/244544/how-to-install-python-3-3

I'm more familiar with how buildpacks work, so if python is supported out of the box with ventriloquist, then fuck yeah.

@fgrehm
Copy link
Owner

fgrehm commented Oct 7, 2013

Same question I have for PHP: is there something like rvm for python?

Going a bit off topic, I'd love to make use of buildpacks from within ventriloquist and it is actually listed as one of the ideas for improvement on the README:

Use a Docker container as the dev environment within the Vagrant VM, maybe using Buildstep or something like it to configure it.

I haven't given much thought to it but if you are up for discussing feel free to open a new issue :)

@josegonzalez
Copy link
Author

https://github.com/yyuu/pyenv

Pyenv is likely what you want.

On Mon, Oct 7, 2013 at 12:11 PM, Fabio Rehm notifications@github.comwrote:

Same question I have for PHP: is there something like rvmhttps://rvm.io/for python?

Going a bit off topic, I'd love to make use of buildpacks from within
ventriloquist and it is actually listed as one of the ideas for
improvementhttps://github.com/fgrehm/ventriloquist#ideas-for-improvementson the README:

Use a Docker container as the dev environment within the Vagrant VM, maybe
using Buildstep https://github.com/progrium/buildstep or something like
it to configure it.

I haven't given much thought to it but if you are up for discussing feel
free to open a new issue :)


Reply to this email directly or view it on GitHubhttps://github.com//issues/19#issuecomment-25821917
.

@fgrehm
Copy link
Owner

fgrehm commented Oct 7, 2013

Thanks! I'll have a look at it

@josegonzalez
Copy link
Author

Any luck with this? I'd help but I have no idea what I'm doing :(

@fgrehm
Copy link
Owner

fgrehm commented Oct 12, 2013

Unfortunately not yet :( hoping to do some work on it over the weekend

Fábio Rehm
Sent on the run
On Oct 11, 2013 10:14 PM, "Jose Diaz-Gonzalez" notifications@github.com
wrote:

Any luck with this? I'd help but I have no idea what I'm doing :(


Reply to this email directly or view it on GitHubhttps://github.com//issues/19#issuecomment-26187110
.

@fgrehm
Copy link
Owner

fgrehm commented Oct 12, 2013

Some notes of on manually setting this up:

sudo apt-get install -y git build-essential libreadline-dev libssl-dev libsqlite3-dev libbz2-dev
git clone git://github.com/yyuu/pyenv.git $HOME/.pyenv
echo 'export PYENV_ROOT="$HOME/.pyenv"' >> ~/.profile
echo 'export PATH="$PYENV_ROOT/bin:$PATH"' >> ~/.profile
echo 'eval "$(pyenv init -)"' >> ~/.profile
pyenv install 3.3.2
pyenv global 3.3.2

python --version
Python 3.3.2

pip --version
pip 1.4.1 from /home/vagrant/....

How can I validate that we have everything in place for a "seamlessly python experience"? Is there a open source medium sized python app that I can try setting up to validate the setup?

@josegonzalez
Copy link
Author

Django?
On Oct 12, 2013 1:26 PM, "Fabio Rehm" notifications@github.com wrote:

Some notes of on manually setting this up:

sudo apt-get install -y git build-essential libreadline-dev libssl-dev libsqlite3-dev libbz2-dev
git clone git://github.com/yyuu/pyenv.git $HOME/.pyenv
echo 'export PYENV_ROOT="$HOME/.pyenv"' >> ~/.profile
echo 'export PATH="$PYENV_ROOT/bin:$PATH"' >> ~/.profile
echo 'eval "$(pyenv init -)"' >> ~/.profile
pyenv install 3.3.2
pyenv global 3.3.2

python --version
Python 3.3.2

pip --version
pip 1.4.1 from /home/vagrant/....

How can I validate that we have everything in place for a "seamlessly
python experience"? Is there a open source medium sized python app that I
can try setting up to validate the setup?


Reply to this email directly or view it on GitHubhttps://github.com//issues/19#issuecomment-26201901
.

@fgrehm
Copy link
Owner

fgrehm commented Oct 12, 2013

Django is just the framework, I want to try a full blown app to find out if things are glued together properly, something like Discourse or any other app that I can just do the equivalent of a bundle install && rake db:migrate && rails server but built with Django :)
I just found this django-sample-app and I'll give it a go now

@fgrehm
Copy link
Owner

fgrehm commented Oct 12, 2013

BTW, they talk about virtualenv / virtualenvwrapper, should we include that by default?

@fgrehm
Copy link
Owner

fgrehm commented Oct 12, 2013

Ok, so I ended up using https://github.com/ridethepony/django-fiber-example and it seems that things are working fine. I just had trouble using python 3.3 with it and had to downgrade to 2.7

I think I have enough info to implement this, will get to it as soon as I have a chance (probably over the week). Please ping me in case I forget to report back :P

@josegonzalez
Copy link
Author

Yeah, I think including virtualenv/virtualenvwrapper is fine, though since the entire app is in a docker instance, we don't really need to do that. virtualenv is like gem bundles.

@fgrehm
Copy link
Owner

fgrehm commented Oct 13, 2013

Just to be clear, the apps are not inside a docker instance but actually inside a Vagrant machine that gets configured with services that run within Docker containers. My plan is to eventually switch to using a Docker instance to run the apps but I'm still thinking about how that would look like.

Regarding virtualenv, I think we can leave it out for now. Whether the app is on a Docker container or a Vagrant VM I believe it already gives us enough isolation :)

@josegonzalez
Copy link
Author

ah gotcha. twerks for me

@fgrehm
Copy link
Owner

fgrehm commented Oct 15, 2013

@josegonzalez So I did some work on this that is available at the 19-python-support branch, if you are feeling adventurous and want to try it out:

git clone https://github.com/fgrehm/ventriloquist.git
cd ventriloquist
git checkout 19-python-support
bundle install
rake build
vagrant plugin install pkg/ventriloquist-0.2.2.dev.gem

@fgrehm
Copy link
Owner

fgrehm commented Oct 15, 2013

Oh, and to use it:

Vagrant.configure("2") do |config|
  config.vm.box = "your-box"
  config.vm.provision :ventriloquist do |env|
    env.platforms << 'python'
  end
end

@josegonzalez
Copy link
Author

I might try it tomorrow.

@fgrehm
Copy link
Owner

fgrehm commented Oct 24, 2013

Done on GH-26

@fgrehm fgrehm closed this as completed Oct 24, 2013
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants