# HG changeset patch # User Thierry Florac # Date 1524817404 -7200 # Node ID 0c3173d06f3f75a2c7a795917755c37afc1bb960 # Parent 47b6b7d92f4aa4a31d215a3ded3a1cfd2f4c7ec5 Version 0.1.3 diff -r 47b6b7d92f4a -r 0c3173d06f3f .installed.cfg --- a/.installed.cfg Tue Apr 10 15:13:32 2018 +0200 +++ b/.installed.cfg Fri Apr 27 10:23:24 2018 +0200 @@ -6,57 +6,24 @@ /home/tflorac/Dropbox/src/PyAMS/pyams_viewlet/develop-eggs/pyams-pagelet.egg-link /home/tflorac/Dropbox/src/PyAMS/pyams_viewlet/develop-eggs/pyams-viewlet.egg-link /home/tflorac/Dropbox/src/PyAMS/pyams_viewlet/develop-eggs/pyams-i18n.egg-link + /home/tflorac/Dropbox/src/PyAMS/pyams_viewlet/develop-eggs/tmp9ss7xpo0build /home/tflorac/Dropbox/src/PyAMS/pyams_viewlet/develop-eggs/pyams-zmi.egg-link - /home/tflorac/Dropbox/src/PyAMS/pyams_viewlet/develop-eggs/tmpbjhiq6vybuild /home/tflorac/Dropbox/src/PyAMS/pyams_viewlet/develop-eggs/pyams-catalog.egg-link /home/tflorac/Dropbox/src/PyAMS/pyams_viewlet/develop-eggs/pyams-form.egg-link /home/tflorac/Dropbox/src/PyAMS/pyams_viewlet/develop-eggs/pyams-utils.egg-link -parts = pyflakes test package i18n - -[pyflakes] -__buildout_installed__ = /home/tflorac/Dropbox/src/PyAMS/pyams_viewlet/bin/pyflakes - /home/tflorac/Dropbox/src/PyAMS/pyams_viewlet/bin/pyflakes -__buildout_signature__ = zc.recipe.egg-2.0.3-py3.5.egg setuptools-33.1.1-py3.5.egg zc.buildout-2.9.3-py3.5.egg -_b = /home/tflorac/Dropbox/src/PyAMS/pyams_viewlet/bin -_d = /home/tflorac/Dropbox/src/PyAMS/pyams_viewlet/develop-eggs -_e = /var/local/env/pyams/eggs -bin-directory = /home/tflorac/Dropbox/src/PyAMS/pyams_viewlet/bin -develop-eggs-directory = /home/tflorac/Dropbox/src/PyAMS/pyams_viewlet/develop-eggs -eggs = pyflakes -eggs-directory = /var/local/env/pyams/eggs -entry-points = pyflakes=pyflakes.scripts.pyflakes:main -find-links = http://download.ztfy.org/eggs -initialization = if not sys.argv[1:]: sys.argv[1:] = ["src"] -recipe = zc.recipe.egg -scripts = pyflakes - -[test] -__buildout_installed__ = /home/tflorac/Dropbox/src/PyAMS/pyams_viewlet/parts/test - /home/tflorac/Dropbox/src/PyAMS/pyams_viewlet/bin/test -__buildout_signature__ = zc.recipe.testrunner-2.0.0-py3.5.egg zc.recipe.egg-2.0.3-py3.5.egg setuptools-33.1.1-py3.5.egg zope.testrunner-4.7.0-py3.5.egg zc.buildout-2.9.3-py3.5.egg zope.interface-4.4.1-py3.5-linux-x86_64.egg zope.exceptions-4.1.0-py3.5.egg six-e7e58fc36ac96295dcff9979007c0533 -_b = /home/tflorac/Dropbox/src/PyAMS/pyams_viewlet/bin -_d = /home/tflorac/Dropbox/src/PyAMS/pyams_viewlet/develop-eggs -_e = /var/local/env/pyams/eggs -bin-directory = /home/tflorac/Dropbox/src/PyAMS/pyams_viewlet/bin -develop-eggs-directory = /home/tflorac/Dropbox/src/PyAMS/pyams_viewlet/develop-eggs -eggs = pyams_viewlet [test] -eggs-directory = /var/local/env/pyams/eggs -find-links = http://download.ztfy.org/eggs -location = /home/tflorac/Dropbox/src/PyAMS/pyams_viewlet/parts/test -recipe = zc.recipe.testrunner -script = /home/tflorac/Dropbox/src/PyAMS/pyams_viewlet/bin/test +parts = package i18n pyflakes test [package] __buildout_installed__ = /home/tflorac/Dropbox/src/PyAMS/pyams_viewlet/bin/pyams_upgrade - /home/tflorac/Dropbox/src/PyAMS/pyams_viewlet/bin/ptweens - /home/tflorac/Dropbox/src/PyAMS/pyams_viewlet/bin/proutes /home/tflorac/Dropbox/src/PyAMS/pyams_viewlet/bin/pdistreport - /home/tflorac/Dropbox/src/PyAMS/pyams_viewlet/bin/pshell /home/tflorac/Dropbox/src/PyAMS/pyams_viewlet/bin/pviews /home/tflorac/Dropbox/src/PyAMS/pyams_viewlet/bin/prequest /home/tflorac/Dropbox/src/PyAMS/pyams_viewlet/bin/pcreate + /home/tflorac/Dropbox/src/PyAMS/pyams_viewlet/bin/pshell + /home/tflorac/Dropbox/src/PyAMS/pyams_viewlet/bin/ptweens + /home/tflorac/Dropbox/src/PyAMS/pyams_viewlet/bin/proutes /home/tflorac/Dropbox/src/PyAMS/pyams_viewlet/bin/pserve -__buildout_signature__ = zc.recipe.egg-2.0.3-py3.5.egg setuptools-33.1.1-py3.5.egg zc.buildout-2.9.3-py3.5.egg +__buildout_signature__ = zc.recipe.egg-ed6891d89ed5dd1fe727e5a7c98200a1 zc.buildout-ed6891d89ed5dd1fe727e5a7c98200a1 setuptools-ed6891d89ed5dd1fe727e5a7c98200a1 _b = /home/tflorac/Dropbox/src/PyAMS/pyams_viewlet/bin _d = /home/tflorac/Dropbox/src/PyAMS/pyams_viewlet/develop-eggs _e = /var/local/env/pyams/eggs @@ -80,7 +47,7 @@ __buildout_installed__ = /home/tflorac/Dropbox/src/PyAMS/pyams_viewlet/bin/pybabel /home/tflorac/Dropbox/src/PyAMS/pyams_viewlet/bin/polint /home/tflorac/Dropbox/src/PyAMS/pyams_viewlet/bin/pot-create -__buildout_signature__ = zc.recipe.egg-2.0.3-py3.5.egg setuptools-33.1.1-py3.5.egg zc.buildout-2.9.3-py3.5.egg +__buildout_signature__ = zc.recipe.egg-ed6891d89ed5dd1fe727e5a7c98200a1 zc.buildout-ed6891d89ed5dd1fe727e5a7c98200a1 setuptools-ed6891d89ed5dd1fe727e5a7c98200a1 _b = /home/tflorac/Dropbox/src/PyAMS/pyams_viewlet/bin _d = /home/tflorac/Dropbox/src/PyAMS/pyams_viewlet/develop-eggs _e = /var/local/env/pyams/eggs @@ -92,8 +59,35 @@ find-links = http://download.ztfy.org/eggs recipe = zc.recipe.egg -[buildout] -parts = test package i18n pyflakes +[pyflakes] +__buildout_installed__ = /home/tflorac/Dropbox/src/PyAMS/pyams_viewlet/bin/pyflakes + /home/tflorac/Dropbox/src/PyAMS/pyams_viewlet/bin/pyflakes +__buildout_signature__ = zc.recipe.egg-ed6891d89ed5dd1fe727e5a7c98200a1 zc.buildout-ed6891d89ed5dd1fe727e5a7c98200a1 setuptools-ed6891d89ed5dd1fe727e5a7c98200a1 +_b = /home/tflorac/Dropbox/src/PyAMS/pyams_viewlet/bin +_d = /home/tflorac/Dropbox/src/PyAMS/pyams_viewlet/develop-eggs +_e = /var/local/env/pyams/eggs +bin-directory = /home/tflorac/Dropbox/src/PyAMS/pyams_viewlet/bin +develop-eggs-directory = /home/tflorac/Dropbox/src/PyAMS/pyams_viewlet/develop-eggs +eggs = pyflakes +eggs-directory = /var/local/env/pyams/eggs +entry-points = pyflakes=pyflakes.scripts.pyflakes:main +find-links = http://download.ztfy.org/eggs +initialization = if not sys.argv[1:]: sys.argv[1:] = ["src"] +recipe = zc.recipe.egg +scripts = pyflakes -[buildout] -parts = package i18n pyflakes test +[test] +__buildout_installed__ = /home/tflorac/Dropbox/src/PyAMS/pyams_viewlet/parts/test + /home/tflorac/Dropbox/src/PyAMS/pyams_viewlet/bin/test +__buildout_signature__ = six-ed6891d89ed5dd1fe727e5a7c98200a1 zc.recipe.testrunner-ed6891d89ed5dd1fe727e5a7c98200a1 zc.recipe.egg-ed6891d89ed5dd1fe727e5a7c98200a1 zc.buildout-ed6891d89ed5dd1fe727e5a7c98200a1 zope.exceptions-ed6891d89ed5dd1fe727e5a7c98200a1 zope.interface-ed6891d89ed5dd1fe727e5a7c98200a1 zope.testrunner-ed6891d89ed5dd1fe727e5a7c98200a1 setuptools-ed6891d89ed5dd1fe727e5a7c98200a1 +_b = /home/tflorac/Dropbox/src/PyAMS/pyams_viewlet/bin +_d = /home/tflorac/Dropbox/src/PyAMS/pyams_viewlet/develop-eggs +_e = /var/local/env/pyams/eggs +bin-directory = /home/tflorac/Dropbox/src/PyAMS/pyams_viewlet/bin +develop-eggs-directory = /home/tflorac/Dropbox/src/PyAMS/pyams_viewlet/develop-eggs +eggs = pyams_viewlet [test] +eggs-directory = /var/local/env/pyams/eggs +find-links = http://download.ztfy.org/eggs +location = /home/tflorac/Dropbox/src/PyAMS/pyams_viewlet/parts/test +recipe = zc.recipe.testrunner +script = /home/tflorac/Dropbox/src/PyAMS/pyams_viewlet/bin/test diff -r 47b6b7d92f4a -r 0c3173d06f3f bootstrap.py --- a/bootstrap.py Tue Apr 10 15:13:32 2018 +0200 +++ b/bootstrap.py Fri Apr 27 10:23:24 2018 +0200 @@ -25,7 +25,10 @@ from optparse import OptionParser -tmpeggs = tempfile.mkdtemp() +__version__ = '2015-07-01' +# See zc.buildout's changelog if this version is up to date. + +tmpeggs = tempfile.mkdtemp(prefix='bootstrap-') usage = '''\ [DESIRED PYTHON FOR BUILDOUT] bootstrap.py [options] @@ -35,18 +38,19 @@ Simply run this script in a directory containing a buildout.cfg, using the Python that you want bin/buildout to use. -Note that by using --find-links to point to local resources, you can keep +Note that by using --find-links to point to local resources, you can keep this script from going over the network. ''' parser = OptionParser(usage=usage) -parser.add_option("-v", "--version", help="use a specific zc.buildout version") - +parser.add_option("--version", + action="store_true", default=False, + help=("Return bootstrap.py version.")) parser.add_option("-t", "--accept-buildout-test-releases", dest='accept_buildout_test_releases', action="store_true", default=False, - help=("Normally, if you do not specify a --version, the " - "bootstrap script and buildout gets the newest " + help=("Normally, if you do not specify a --buildout-version, " + "the bootstrap script and buildout gets the newest " "*final* versions of zc.buildout and its recipes and " "extensions for you. If you use this flag, " "bootstrap and buildout will get the newest releases " @@ -59,36 +63,57 @@ parser.add_option("--allow-site-packages", action="store_true", default=False, help=("Let bootstrap.py use existing site packages")) - +parser.add_option("--buildout-version", + help="Use a specific zc.buildout version") +parser.add_option("--setuptools-version", + help="Use a specific setuptools version") +parser.add_option("--setuptools-to-dir", + help=("Allow for re-use of existing directory of " + "setuptools versions")) options, args = parser.parse_args() +if options.version: + print("bootstrap.py version %s" % __version__) + sys.exit(0) + ###################################################################### # load/install setuptools try: - if options.allow_site_packages: - import setuptools - import pkg_resources from urllib.request import urlopen except ImportError: from urllib2 import urlopen ez = {} -exec(urlopen('https://bootstrap.pypa.io/ez_setup.py').read(), ez) +if os.path.exists('ez_setup.py'): + exec(open('ez_setup.py').read(), ez) +else: + exec(urlopen('https://bootstrap.pypa.io/ez_setup.py').read(), ez) if not options.allow_site_packages: # ez_setup imports site, which adds site packages - # this will remove them from the path to ensure that incompatible versions + # this will remove them from the path to ensure that incompatible versions # of setuptools are not in the path import site - # inside a virtualenv, there is no 'getsitepackages'. + # inside a virtualenv, there is no 'getsitepackages'. # We can't remove these reliably if hasattr(site, 'getsitepackages'): for sitepackage_path in site.getsitepackages(): - sys.path[:] = [x for x in sys.path if sitepackage_path not in x] + # Strip all site-packages directories from sys.path that + # are not sys.prefix; this is because on Windows + # sys.prefix is a site-package directory. + if sitepackage_path != sys.prefix: + sys.path[:] = [x for x in sys.path + if sitepackage_path not in x] setup_args = dict(to_dir=tmpeggs, download_delay=0) + +if options.setuptools_version is not None: + setup_args['version'] = options.setuptools_version +if options.setuptools_to_dir is not None: + setup_args['to_dir'] = options.setuptools_to_dir + ez['use_setuptools'](**setup_args) import setuptools import pkg_resources @@ -104,7 +129,12 @@ ws = pkg_resources.working_set +setuptools_path = ws.find( + pkg_resources.Requirement.parse('setuptools')).location + +# Fix sys.path here as easy_install.pth added before PYTHONPATH cmd = [sys.executable, '-c', + 'import sys; sys.path[0:0] = [%r]; ' % setuptools_path + 'from setuptools.command.easy_install import main; main()', '-mZqNxd', tmpeggs] @@ -117,21 +147,23 @@ if find_links: cmd.extend(['-f', find_links]) -setuptools_path = ws.find( - pkg_resources.Requirement.parse('setuptools')).location - requirement = 'zc.buildout' -version = options.version +version = options.buildout_version if version is None and not options.accept_buildout_test_releases: # Figure out the most recent final version of zc.buildout. import setuptools.package_index _final_parts = '*final-', '*final' def _final_version(parsed_version): - for part in parsed_version: - if (part[:1] == '*') and (part not in _final_parts): - return False - return True + try: + return not parsed_version.is_prerelease + except AttributeError: + # Older setuptools + for part in parsed_version: + if (part[:1] == '*') and (part not in _final_parts): + return False + return True + index = setuptools.package_index.PackageIndex( search_path=[setuptools_path]) if find_links: @@ -156,7 +188,7 @@ cmd.append(requirement) import subprocess -if subprocess.call(cmd, env=dict(os.environ, PYTHONPATH=setuptools_path)) != 0: +if subprocess.call(cmd) != 0: raise Exception( "Failed to execute command:\n%s" % repr(cmd)[1:-1]) diff -r 47b6b7d92f4a -r 0c3173d06f3f docs/HISTORY.txt --- a/docs/HISTORY.txt Tue Apr 10 15:13:32 2018 +0200 +++ b/docs/HISTORY.txt Fri Apr 27 10:23:24 2018 +0200 @@ -1,6 +1,11 @@ Changelog ========= +0.1.3 +----- + - in weight ordered viewlets managers, sort viewlets with same weight by labels + - added "empty" viewlet and content provider (rendering an empty string) as base classes + 0.1.2 ----- - splitted content provider class between BaseContentProvider and ViewContentProvider diff -r 47b6b7d92f4a -r 0c3173d06f3f src/pyams_viewlet.egg-info/PKG-INFO --- a/src/pyams_viewlet.egg-info/PKG-INFO Tue Apr 10 15:13:32 2018 +0200 +++ b/src/pyams_viewlet.egg-info/PKG-INFO Fri Apr 27 10:23:24 2018 +0200 @@ -1,6 +1,6 @@ Metadata-Version: 1.1 Name: pyams-viewlet -Version: 0.1.2 +Version: 0.1.3 Summary: PyAMS base viewlet interfaces and classes; z3c.viewlet package adapted to Pyramid Home-page: http://hg.ztfy.org/pyams/pyams_viewlet Author: Thierry Florac @@ -12,6 +12,11 @@ Changelog ========= + 0.1.3 + ----- + - in weight ordered viewlets managers, sort viewlets with same weight by labels + - added "empty" viewlet and content provider (rendering an empty string) as base classes + 0.1.2 ----- - splitted content provider class between BaseContentProvider and ViewContentProvider