Skip to content

Instantly share code, notes, and snippets.

@lowks
Created December 28, 2012 03:05
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save lowks/4394147 to your computer and use it in GitHub Desktop.
Save lowks/4394147 to your computer and use it in GitHub Desktop.
Distcmd dep
from cot.lib.distcmd import *
from urlparse import urlparse
class dep(MyCommand):
user_options = [
('index-url=', 'i', 'Url to the Python Package Index'),
('follow-links', None, 'Search for indirect dependencies in the '
'additional links specified in dependencies'),
]
defaults = {
'index_url': 'http://hydra.lcalink.com/inupypi/cot_dependencies/',
'follow_links': False,
}
def run(self):
# 4Suite-XML is problematic, install it separately
self.sh('easy_install -i %s 4Suite-XML' % self.index_url)
if self.follow_links:
mask = '"*"'
else:
mask = urlparse(self.index_url)[1]
self.sh('python setup.py develop -i %s -H %s' % (self.index_url,
mask))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment