If you need to install fabric on a windows machine without a compiler . This gist may help (We are assuming your are using python27 , search for corresponding packages if you are not )
Install some dependence using pre-compiled package
| """ | |
| This fabric file makes setting up and deploying a django application much | |
| easier, but it does make a few assumptions. Namely that you're using Git, | |
| Apache and mod_wsgi and your using Debian or Ubuntu. Also you should have | |
| Django installed on your local machine and SSH installed on both the local | |
| machine and any servers you want to deploy to. | |
| _note that I've used the name project_name throughout this example. Replace | |
| this with whatever your project is called._ |
| def cn_cut(status, length): | |
| l = 0 | |
| end = len(status) | |
| for i,c in enumerate(status): | |
| if ord(c) <= 0xff: | |
| l += 1 | |
| else: | |
| l += 2 | |
| if l > length * 2: | |
| end = i |
| #!/bin/sh | |
| mkdir ~/down/ | |
| cd ~/down/ | |
| sudo apt-get install build-essential | |
| wget http://www.python.org/ftp/python/2.7.2/Python-2.7.2.tgz | |
| tar -xzf Python-2.7.2.tgz | |
| cd Python-2.7.2 | |
| sudo apt-get install libsqlite3-dev zlib1g-dev libncurses5-dev | |
| sudo apt-get install libgdbm-dev libbz2-dev libreadline5-dev | |
| sudo apt-get install libssl-dev libdb-dev |
| # python ep2011_video.py | tee ep2011_video.txt | |
| import httplib2 | |
| import urlparse | |
| from BeautifulSoup import BeautifulSoup | |
| BASE_URL = 'http://ep2011.europython.eu/' | |
| SCHEDULE_URL = 'http://ep2011.europython.eu/p3/schedule/ep2011/' | |
| headers = { |
| #!/bin/sh | |
| wget https://github.com/rg3/youtube-dl/zipball/master -O youtube-dl.zip | |
| unzip youtube-dl.zip | |
| cd rg3-youtube-dl-ceba827/ | |
| python youtube-dl --batch-file ../pycon2012_video_urls.txt |
| f: {{ f|floatformat:9}} | |
| <br/> | |
| f2: {{ f2|floatformat:9}} | |
| <br/> | |
| d: {{ d|floatformat:9}} | |
| <br/> | |
| s: {{ s|floatformat:9}} | |
| cat path/to/pub.key | ssh your.remote.server 'sh -c "mkdir -p ~/.ssh/; cat - >>~/.ssh/authorized_keys"' | |
| <!DOCTYPE html> | |
| <html> | |
| <head> | |
| <meta charset="utf-8"> | |
| <style> | |
| #result{ | |
| width:900px; | |
| line-height:25px; |
| ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQC23tUdjQbKxLj0xeNgseWTwFy08C7rtWRSgbA1sTy1HzL25D+4Bl5+t0VQxdHyll29io9rbBafiBg3epBHMY3ziPdXT6Bk6PNteA6bLQwB/eKaxdyW8s4ZE8wh+WiXv4FAhyBB3GlVm6S1mb69JFe3d87M3E5mNIpxjm/Q4XmPtTO20TTA90D3Uw1H5XnPCkrOQD3xgDlN0IvsHq817eLC8QtStR4FY9apmB1xU0f9uCcqPh57hV9qZgguvx18L3KdJXjldpbYYZBL5jkyhR26TQBzRov4z4aPk9g45ETNf8u/3EhGPwmeNCHwz9rm3Kp5uJPrPvB5SgBr6ch9p223 vagrant@preci |