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
| #!/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 |
| # 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 | |
| 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 |
| 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 |
| """ | |
| 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._ |