diff --git a/.gitignore b/.gitignore index 0086859..7bbd4f7 100644 --- a/.gitignore +++ b/.gitignore @@ -88,3 +88,6 @@ src .coverage *.tar.gz + +# hyde plugins +node_modules diff --git a/README.rst b/README.rst index 67066d6..c2f60e4 100644 --- a/README.rst +++ b/README.rst @@ -1,4 +1,4 @@ -Version 0.8.8 +Version 0.8.9a .. image:: https://travis-ci.org/hyde/hyde.svg?branch=master diff --git a/hyde/ext/plugins/images.py b/hyde/ext/plugins/images.py index dee25cd..ee24ade 100644 --- a/hyde/ext/plugins/images.py +++ b/hyde/ext/plugins/images.py @@ -381,8 +381,9 @@ class ImageThumbnailsPlugin(PILPlugin): preserve_orientation = True dim1, dim2 = larger, smaller - match_includes = lambda s: any( - [glob.fnmatch.fnmatch(s, inc) for inc in include]) + def match_includes(s): + return any([glob.fnmatch.fnmatch(s, inc) + for inc in include]) for resource in node.resources: if match_includes(resource.path): diff --git a/hyde/template.py b/hyde/template.py index 0a490b5..e369fc8 100644 --- a/hyde/template.py +++ b/hyde/template.py @@ -11,6 +11,7 @@ from commando.util import getLoggerWithNullHandler, load_python_object DEFAULT_TEMPLATE = 'hyde.ext.templates.jinja.Jinja2Template' + class HtmlWrap(object): """ diff --git a/hyde/tests/sites/test_grouper/site.yaml b/hyde/tests/sites/test_grouper/site.yaml index 03c4c9e..e6d94d1 100644 --- a/hyde/tests/sites/test_grouper/site.yaml +++ b/hyde/tests/sites/test_grouper/site.yaml @@ -1,6 +1,6 @@ mode: development media_root:: media # Relative path from site root (the directory where this file exists) media_url: /media -template: hyde.ext.jinja2 +template: hyde.ext.templates.jinja.Jinja2Template meta: - nodemeta: meta.yaml \ No newline at end of file + nodemeta: meta.yaml diff --git a/hyde/tests/sites/test_jinja/site.yaml b/hyde/tests/sites/test_jinja/site.yaml index 8fc9c9d..f8f9dab 100644 --- a/hyde/tests/sites/test_jinja/site.yaml +++ b/hyde/tests/sites/test_jinja/site.yaml @@ -1,4 +1,4 @@ mode: development media_root:: media # Relative path from site root (the directory where this file exists) media_url: /media -template: hyde.ext.jinja2 \ No newline at end of file +template: hyde.ext.templates.jinja.Jinja2Template diff --git a/hyde/tests/test_model.py b/hyde/tests/test_model.py index f05ae53..00b4bd6 100644 --- a/hyde/tests/test_model.py +++ b/hyde/tests/test_model.py @@ -72,7 +72,8 @@ def test_expando_to_dict_with_update(): TEST_SITE = File(__file__).parent.child_folder('_test') -import yaml + +import yaml # NOQA class TestConfig(object): diff --git a/hyde/version.py b/hyde/version.py index de38a2f..036fe51 100644 --- a/hyde/version.py +++ b/hyde/version.py @@ -2,4 +2,4 @@ """ Handles hyde version. """ -__version__ = '0.8.8' +__version__ = '0.8.9a' diff --git a/setup.py b/setup.py index ded38ab..6fca6f7 100644 --- a/setup.py +++ b/setup.py @@ -13,7 +13,7 @@ try: except IOError: long_description = '' -################################################################################ +############################################################################## # find_package_data is an Ian Bicking creation. # Provided as an attribute, so you can append to these instead @@ -22,12 +22,13 @@ standard_exclude = ('*.py', '*.pyc', '*~', '.*', '*.bak', '*.swp*') standard_exclude_directories = ('.*', 'CVS', '_darcs', './build', './dist', 'EGG-INFO', '*.egg-info') + def find_package_data( - where='.', package='', - exclude=standard_exclude, - exclude_directories=standard_exclude_directories, - only_in_packages=True, - show_ignored=False): + where='.', package='', + exclude=standard_exclude, + exclude_directories=standard_exclude_directories, + only_in_packages=True, + show_ignored=False): """ Return a dictionary suitable for use in ``package_data`` in a distutils ``setup.py`` file. @@ -66,8 +67,9 @@ def find_package_data( if os.path.isdir(fn): bad_name = False for pattern in exclude_directories: - if (fnmatchcase(name, pattern) - or fn.lower() == pattern.lower()): + if fnmatchcase(name, pattern) or \ + fn.lower() == pattern.lower(): + bad_name = True if show_ignored: print >> sys.stderr, ( @@ -83,13 +85,15 @@ def find_package_data( new_package = package + '.' + name stack.append((fn, '', new_package, False)) else: - stack.append((fn, prefix + name + '/', package, only_in_packages)) + stack.append((fn, prefix + name + '/', package, + only_in_packages)) elif package or not only_in_packages: # is a file bad_name = False for pattern in exclude: - if (fnmatchcase(name, pattern) - or fn.lower() == pattern.lower()): + if fnmatchcase(name, pattern) \ + or fn.lower() == pattern.lower(): + bad_name = True if show_ignored: print >> sys.stderr, ( @@ -100,12 +104,13 @@ def find_package_data( continue out.setdefault(package, []).append(prefix+name) return out -################################################################################ + +############################################################################## setup(name=PROJECT, version=__version__, description='hyde is a static website generator', - long_description = long_description, + long_description=long_description, author='Lakshmi Vyas', author_email='lakshmi.vyas@gmail.com', url='http://hyde.github.com', @@ -132,14 +137,14 @@ setup(name=PROJECT, 'flake8==2.4.1' ), test_suite='nose.collector', - include_package_data = True, + include_package_data=True, # Scan the input for package information # to grab any data files (text, images, etc.) # associated with sub-packages. - package_data = find_package_data(PROJECT, + + package_data=find_package_data(PROJECT, package=PROJECT, - only_in_packages=False, - ), + only_in_packages=False,), entry_points={ 'console_scripts': [ 'hyde = hyde.main:main' @@ -164,5 +169,4 @@ setup(name=PROJECT, 'Topic :: Internet', 'Topic :: Internet :: WWW/HTTP :: Site Management', ], - zip_safe=False, -) + zip_safe=False,)