docs/main/Development.rst | 2 normal-reqs.txt | 72 +++++++++++++++++++++++++++++++ pip.py | 104 ++++++++++++++++++++------------------------- production/stable-reqs.txt | 48 ++++++++++++-------- stable-reqs.txt | 72 ------------------------------- start-moksha | 2 6 files changed, 150 insertions(+), 150 deletions(-)
New commits: commit 48af10090b7ca795cd16a972a643bb82a61d93b7 Merge: f9044b0... e715ad9... Author: Luke Macken lmacken@redhat.com Date: Tue Mar 17 19:55:07 2009 -0400
Merge branch 'master' of git+ssh://git.fedorahosted.org/git/moksha
commit f9044b0352212af2e03132a48fc48c47b94a2570 Author: Luke Macken lmacken@redhat.com Date: Tue Mar 17 19:54:58 2009 -0400
Update the requirements freezing command
diff --git a/docs/main/Development.rst b/docs/main/Development.rst index cf44b36..f91ae91 100644 --- a/docs/main/Development.rst +++ b/docs/main/Development.rst @@ -43,7 +43,7 @@ Freezing requirements
.. code-block:: bash
- $ ./pip.py -E tg2env freeze production/stable-reqs.txt + $ ./pip.py freeze -E tg2env -r normal-reqs.txt production/stable-reqs.txt
Profiling the WSGI stack ------------------------
commit 0ea63c394e863368c76cc114ec9cf01e2a175812 Author: Luke Macken lmacken@redhat.com Date: Tue Mar 17 19:54:05 2009 -0400
Bring our stable-reqs.txt up to date
diff --git a/production/stable-reqs.txt b/production/stable-reqs.txt index b411195..cc6a39f 100644 --- a/production/stable-reqs.txt +++ b/production/stable-reqs.txt @@ -1,72 +1,80 @@ AddOns==0.6 Beaker==1.2.3 -BytecodeAssembler==0.3 +BytecodeAssembler==0.5.1 DecoratorTools==1.7 Extremes==1.1.1 -FormEncode==1.2.1 +FormEncode==1.2.2 Genshi==0.5.1 Jinja==1.2 Mako==0.2.4 ## FIXME: could not find svn URL in dependency_links for this package: +## FIXME: could not find svn URL in dependency_links for this package: PEAK-Rules==0.5a1.dev-r2582 Paste==1.7.2 PasteDeploy==1.3.3 PasteScript==1.7.3 -Paver==1.0a4 +Paver==1.0b1 Pygments==1.0 Pylons==0.9.7 Routes==1.10.3 SQLAlchemy==0.5.2 -Sphinx==0.5.1 +Sphinx==0.6b1 SymbolType==1.0 -Tempita==0.2 +Tempita==0.3 +## FIXME: could not find svn URL in dependency_links for this package: ## FIXME: could not find svn URL in dependency_links for this package: ToscaWidgets==0.9.5dev-20081026 TurboGears2==2.0b7 -TurboJson==1.2 +TurboJson==1.2.1 Twisted==8.2.0 WebError==0.10.1 -WebFlash==0.1a8dev1 +WebFlash==0.1a9 WebHelpers==0.6.4 WebOb==0.9.6.1 WebTest==1.1 -#WidgetBrowser==0.1 +## FIXME: could not find svn URL in dependency_links for this package: +#WidgetBrowser boto==1.6b -decorator==3.0.0 +decorator==3.0.1 demjson==1.4 docutils==0.5 feedcache==1.3 feedparser==4.1 lxml==2.2beta4 meld3==0.6.5 -#-e git+git+ssh://git.fedorahosted.org/git/moksha@03438a82c9b26b700834e9e17d31ab8c6ace8d1a#egg=moksha-0.1dev-py2.5-dev +#-e git+git+ssh://git.fedorahosted.org/git/moksha#egg=moksha-0.1dev-py2.5-dev morbid==0.8.4 nose==0.10.4 orbited==0.7.7 +psycopg2==2.0.9 pyprof2calltree==1.1.0 repoze.profile==0.8 repoze.squeeze==0.3 -repoze.tm2==1.0a3 -repoze.what==1.0.5 -repoze.what-pylons==1.0rc3 +repoze.tm2==1.0a4 +repoze.what==1.0.8 +repoze.what-pylons==1.0rc4 repoze.what-quickstart==1.0 repoze.what.plugins.sql==1.0rc1 repoze.who==1.0.10 repoze.who-friendlyform==1.0b3 -repoze.who-testutil==1.0b2 -repoze.who.plugins.sa==1.0rc1 +repoze.who-testutil==1.0rc1 +## FIXME: could not find svn URL in dependency_links for this package: +repoze.who.plugins.sa==1.0rc2-r3742 shove==0.1.5 -simplejson==2.0.8 +simplejson==2.0.9 ## FIXME: could not find svn URL in dependency_links for this package: -sqlalchemy-migrate==0.5.1.dev-r479 +sqlalchemy-migrate==0.5.2 stomper==0.2.2 tg.devtools==2.0b7 transaction==1.0a1 tw.forms==0.9.2 tw.jquery==0.9.4.2 uuid==1.30 -zope.interface==3.5.0 +zope.interface==3.5.1 zope.sqlalchemy==0.4 -pysqlite==2.4.1 +## The following requirements were added by pip --freeze: +Jinja2==2.1.1 +#WidgetBrowser==0.1 +#-e git+git+ssh://git.fedorahosted.org/git/moksha@999ac3b5e39ef22d9407c4faf006aaa316ce6bec#egg=moksha-0.1dev-py2.5-dev +prioritized-methods==0.2.1 pyOpenSSL==0.8 -
commit 999ac3b5e39ef22d9407c4faf006aaa316ce6bec Author: Luke Macken lmacken@redhat.com Date: Tue Mar 17 19:50:30 2009 -0400
Build our virtualenv from a version-less normal-reqs.txt for development
diff --git a/normal-reqs.txt b/normal-reqs.txt new file mode 100644 index 0000000..c959c08 --- /dev/null +++ b/normal-reqs.txt @@ -0,0 +1,72 @@ +AddOns +Beaker +BytecodeAssembler +DecoratorTools +Extremes +FormEncode +Genshi +Jinja +Mako +## FIXME: could not find svn URL in dependency_links for this package: +PEAK-Rules +Paste +PasteDeploy +PasteScript +Paver +Pygments +Pylons +Routes +SQLAlchemy +Sphinx +SymbolType +Tempita +## FIXME: could not find svn URL in dependency_links for this package: +ToscaWidgets +TurboGears2 +TurboJson +Twisted +WebError +WebFlash +WebHelpers +WebOb +WebTest +## FIXME: could not find svn URL in dependency_links for this package: +#WidgetBrowser +boto +decorator +demjson +docutils +feedcache +feedparser +lxml +meld3 +#-e git+git+ssh://git.fedorahosted.org/git/moksha#egg=moksha-0.1dev-py2.5-dev +morbid +nose +orbited +psycopg2 +PyOpenSSL +pyprof2calltree +repoze.profile +repoze.squeeze +repoze.tm2 +repoze.what +repoze.what-pylons +repoze.what-quickstart +repoze.what.plugins.sql +repoze.who +repoze.who-friendlyform +repoze.who-testutil +repoze.who.plugins.sa +shove +simplejson +## FIXME: could not find svn URL in dependency_links for this package: +sqlalchemy-migrate +stomper +tg.devtools +transaction +tw.forms +tw.jquery +uuid +zope.interface +zope.sqlalchemy diff --git a/stable-reqs.txt b/stable-reqs.txt deleted file mode 100644 index b411195..0000000 --- a/stable-reqs.txt +++ /dev/null @@ -1,72 +0,0 @@ -AddOns==0.6 -Beaker==1.2.3 -BytecodeAssembler==0.3 -DecoratorTools==1.7 -Extremes==1.1.1 -FormEncode==1.2.1 -Genshi==0.5.1 -Jinja==1.2 -Mako==0.2.4 -## FIXME: could not find svn URL in dependency_links for this package: -PEAK-Rules==0.5a1.dev-r2582 -Paste==1.7.2 -PasteDeploy==1.3.3 -PasteScript==1.7.3 -Paver==1.0a4 -Pygments==1.0 -Pylons==0.9.7 -Routes==1.10.3 -SQLAlchemy==0.5.2 -Sphinx==0.5.1 -SymbolType==1.0 -Tempita==0.2 -## FIXME: could not find svn URL in dependency_links for this package: -ToscaWidgets==0.9.5dev-20081026 -TurboGears2==2.0b7 -TurboJson==1.2 -Twisted==8.2.0 -WebError==0.10.1 -WebFlash==0.1a8dev1 -WebHelpers==0.6.4 -WebOb==0.9.6.1 -WebTest==1.1 -#WidgetBrowser==0.1 -boto==1.6b -decorator==3.0.0 -demjson==1.4 -docutils==0.5 -feedcache==1.3 -feedparser==4.1 -lxml==2.2beta4 -meld3==0.6.5 -#-e git+git+ssh://git.fedorahosted.org/git/moksha@03438a82c9b26b700834e9e17d31ab8c6ace8d1a#egg=moksha-0.1dev-py2.5-dev -morbid==0.8.4 -nose==0.10.4 -orbited==0.7.7 -pyprof2calltree==1.1.0 -repoze.profile==0.8 -repoze.squeeze==0.3 -repoze.tm2==1.0a3 -repoze.what==1.0.5 -repoze.what-pylons==1.0rc3 -repoze.what-quickstart==1.0 -repoze.what.plugins.sql==1.0rc1 -repoze.who==1.0.10 -repoze.who-friendlyform==1.0b3 -repoze.who-testutil==1.0b2 -repoze.who.plugins.sa==1.0rc1 -shove==0.1.5 -simplejson==2.0.8 -## FIXME: could not find svn URL in dependency_links for this package: -sqlalchemy-migrate==0.5.1.dev-r479 -stomper==0.2.2 -tg.devtools==2.0b7 -transaction==1.0a1 -tw.forms==0.9.2 -tw.jquery==0.9.4.2 -uuid==1.30 -zope.interface==3.5.0 -zope.sqlalchemy==0.4 -pysqlite==2.4.1 -pyOpenSSL==0.8 - diff --git a/start-moksha b/start-moksha index e1e7e1c..48606be 100755 --- a/start-moksha +++ b/start-moksha @@ -6,7 +6,7 @@ if [ ! $VIRTUAL_ENV ]; then echo "Initializing a TurboGears2 virtual environment" virtualenv --no-site-packages tg2env source tg2env/bin/activate - ./pip.py install -E tg2env -r stable-reqs.txt --extra-index-url=http://www.turbogears.org/2.0/downloads/current/index + ./pip.py install -E tg2env -r normal-reqs.txt --extra-index-url=http://www.turbogears.org/2.0/downloads/current/index pushd moksha/widgetbrowser; python setup.py develop; popd else source tg2env/bin/activate
commit f94ce46fd808edac9b729c8e475fa7c181910715 Author: Luke Macken lmacken@redhat.com Date: Tue Mar 17 19:49:49 2009 -0400
Bring pip up to speed with some new fixes
diff --git a/pip.py b/pip.py index f331140..356435b 100755 --- a/pip.py +++ b/pip.py @@ -76,12 +76,12 @@ except pkg_resources.DistributionNotFound: version=None
def rmtree_errorhandler(func, path, exc_info): - typ, val, tb = exc_info - if issubclass(typ, OSError) and val.errno == errno.EACCES: - os.chmod(path, stat.S_IWRITE) - func(path) - else: - raise typ, val, tb + typ, val, tb = exc_info + if issubclass(typ, OSError) and val.errno == errno.EACCES: + os.chmod(path, stat.S_IWRITE) + func(path) + else: + raise typ, val, tb
class VcsSupport(object): _registry = {} @@ -1012,9 +1012,9 @@ class PackageFinder(object): url_name = self._find_url_name(Link(self.index_urls[0]), url_name, req) or req.url_name def mkurl_pypi_url(url): loc = posixpath.join(url, url_name) - # For maximum compatibility with easy_install, ensure the path - # ends in a trailing slash. Although this isn't in the spec - # (and PyPI can handle it without the slash) some other index + # For maximum compatibility with easy_install, ensure the path + # ends in a trailing slash. Although this isn't in the spec + # (and PyPI can handle it without the slash) some other index # implementations might break if they relied on easy_install's behavior. if not loc.endswith('/'): loc = loc + '/' @@ -1262,9 +1262,6 @@ class InstallRequirement(object): s = self.url if self.satisfied_by is not None: s += ' in %s' % display_path(self.satisfied_by.location) - if self.editable: - if self.req: - s += ' checkout from %s' % self.url if self.comes_from: if isinstance(self.comes_from, basestring): comes_from = self.comes_from @@ -1641,7 +1638,7 @@ execfile(__file__) fp = open(vcs_bundle_file) content = fp.read() fp.close() - url, rev = vcs_backend().parse_checkout_text(content) + url, rev = vcs_backend().parse_vcs_bundle_file(content) break if url: url = '%s+%s@%s' % (vc_type, url, rev) @@ -1749,7 +1746,7 @@ class RequirementSet(object): if req_to_install.satisfied_by is not None and not self.upgrade: logger.notify('Requirement already satisfied: %s' % req_to_install) elif req_to_install.editable: - logger.notify('Checking out %s' % req_to_install) + logger.notify('Obtaining %s' % req_to_install) else: if req_to_install.url and req_to_install.url.lower().startswith('file:'): logger.notify('Unpacking %s' % display_path(url_to_filename(req_to_install.url))) @@ -2464,14 +2461,25 @@ class VersionControl(object): """ url = self.url.split('+', 1)[1] scheme, netloc, path, query, frag = urlparse.urlsplit(url) + rev = None if '@' in path: - path, rev = path.split('@', 1) - else: - rev = None + path, rev = path.rsplit('@', 1) url = urlparse.urlunsplit((scheme, netloc, path, query, '')) return url, rev
+ def parse_vcs_bundle_file(self, content): + """ + Takes the contents of the bundled text file that explains how to revert + the stripped off version control data of the given package and returns + the URL and revision of it. + """ + raise NotImplementedError + def obtain(self, dest): + """ + Called when installing or updating an editable package, takes the + source path of the checkout. + """ raise NotImplementedError
def unpack(self, location): @@ -2511,8 +2519,8 @@ class Subversion(VersionControl): return url, 'unknown' return url, match.group(1)
- def parse_checkout_text(self, text): - for line in text.splitlines(): + def parse_vcs_bundle_file(self, content): + for line in content.splitlines(): if not line.strip() or line.strip().startswith('#'): continue match = re.search(r'^-r\s*([^ ])?', line) @@ -2750,9 +2758,9 @@ class Git(VersionControl): assert not location.rstrip('/').endswith('.git'), 'Bad directory: %s' % location return self.get_url(location), self.get_revision(location)
- def parse_clone_text(self, text): + def parse_vcs_bundle_file(self, content): url = rev = None - for line in text.splitlines(): + for line in content.splitlines(): if not line.strip() or line.strip().startswith('#'): continue url_match = re.search(r'git\s*remote\s*add\s*origin(.*)\s*-f', line) @@ -2765,18 +2773,6 @@ class Git(VersionControl): return url, rev return None, None
- def parse_checkout_text(self, text): - url = None - rev = None - for line in text.splitlines(): - if not line.strip() or line.strip().startswith('#'): - continue - if line.startswith('git remote'): - url = line.split()[-2] - elif line.startswith('git checkout'): - rev = line.split()[-1] - return url, rev - def unpack(self, location): """Clone the Git repository at the url to the destination location""" url, rev = self.get_url_rev() @@ -2838,8 +2834,6 @@ class Git(VersionControl): clone = True if clone: logger.notify('Cloning %s%s to %s' % (url, rev_display, display_path(dest))) - print "url = %r" % url - print "rev_display %r" % rev_display call_subprocess( [GIT_CMD, 'clone', '-q', url, dest]) call_subprocess( @@ -2916,25 +2910,23 @@ class Git(VersionControl): # Don't know what it is logger.warn('Git URL does not fit normal structure: %s' % repo) return '%s@%s#egg=%s-dev' % (repo, current_rev, egg_project_name) + def get_url_rev(self): """ - Returns the correct repository URL and revision by parsing the given - repository URL + Prefixes stub URLs like 'user@hostname:user/repo.git' with 'ssh://'. + That's required because although they use SSH they sometimes doesn't + work with a ssh:// scheme (e.g. Github). But we need a scheme for + parsing. Hence we remove it again afterwards and return it as a stub. """ - print "get_url_rev()" - print "self.url = %r" % self.url - url = self.url.split('+', 1)[1] - rev = url.split('@')[1].split('#')[0] - url = url.split('@')[0] - scheme, netloc, path, query, frag = urlparse.urlsplit(url) - url = urlparse.urlunsplit((scheme, netloc, path, query, '')) - print "returning (%r, %r)" % (url, rev) - return url, rev - + if not '://' in self.url: + self.url = self.url.replace('git+', 'git+ssh://') + url, rev = super(Git, self).get_url_rev() + url = url.replace('ssh://', '') + return url, rev + return super(Git, self).get_url_rev()
vcs.register(Git)
- class Mercurial(VersionControl): name = 'hg' dirname = '.hg' @@ -2948,9 +2940,9 @@ class Mercurial(VersionControl): assert not location.rstrip('/').endswith('.hg'), 'Bad directory: %s' % location return self.get_url(location), self.get_revision(location)
- def parse_clone_text(self, text): + def parse_vcs_bundle_file(self, content): url = rev = None - for line in text.splitlines(): + for line in content.splitlines(): if not line.strip() or line.strip().startswith('#'): continue url_match = re.search(r'hg\s*pull\s*(.*)\s*', line) @@ -3131,9 +3123,9 @@ class Bazaar(VersionControl): assert not location.rstrip('/').endswith('.bzr'), 'Bad directory: %s' % location return self.get_url(location), self.get_revision(location)
- def parse_clone_text(self, text): + def parse_vcs_bundle_file(self, content): url = rev = None - for line in text.splitlines(): + for line in content.splitlines(): if not line.strip() or line.strip().startswith('#'): continue match = re.search(r'^bzr\s*branch\s*-r\s*(\d*)', line) @@ -3287,7 +3279,7 @@ def get_src_requirement(dist, location, find_tags): ## Requirement files
_scheme_re = re.compile(r'^(http|https|file):', re.I) -_drive_re = re.compile(r'/*([a-z])|', re.I) +_url_slash_drive_re = re.compile(r'/*([a-z])|', re.I) def get_file_content(url, comes_from=None): """Gets the content of a file; it may be a filename, file: URL, or http: URL. Returns (location, content)""" @@ -3302,7 +3294,7 @@ def get_file_content(url, comes_from=None): if scheme == 'file': path = url.split(':', 1)[1] path = path.replace('\', '/') - match = _drive_re.match(path) + match = _url_slash_drive_re.match(path) if match: path = match.group(1) + ':' + path.split('|', 1)[1] path = urllib.unquote(path) @@ -3796,9 +3788,9 @@ def filename_to_url(filename): Convert a path to a file: URL. The path will be made absolute. """ filename = os.path.normcase(os.path.abspath(filename)) + if _drive_re.match(filename): + filename = filename[0] + '|' + filename[2:] url = urllib.quote(filename) - if _drive_re.match(url): - url = url[0] + '|' + url[2:] url = url.replace(os.path.sep, '/') url = url.lstrip('/') return 'file:///' + url
moksha-commits@lists.fedorahosted.org