diff options
author | Takeshi KOMIYA <i.tkomiya@gmail.com> | 2016-07-03 17:16:28 +0900 |
---|---|---|
committer | Takeshi KOMIYA <i.tkomiya@gmail.com> | 2016-07-07 00:10:26 +0900 |
commit | f8955b16d6c5b03b95d2a5ee85b739a1de307d2e (patch) | |
tree | b7f9b0bdb5fb96a749d2f41d1603da0ed9d2623d /sphinx/builders/applehelp.py | |
parent | 02dbf860c2cf530adf85bd7a6325a90e9b3e3ca4 (diff) | |
download | sphinx-git-f8955b16d6c5b03b95d2a5ee85b739a1de307d2e.tar.gz |
Replace all copy_static_entry() with copy_asset()
At same time, copy_static_entry() is now deprecataed
Diffstat (limited to 'sphinx/builders/applehelp.py')
-rw-r--r-- | sphinx/builders/applehelp.py | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/sphinx/builders/applehelp.py b/sphinx/builders/applehelp.py index 095457b80..e8a476f60 100644 --- a/sphinx/builders/applehelp.py +++ b/sphinx/builders/applehelp.py @@ -18,11 +18,11 @@ import shlex from sphinx.builders.html import StandaloneHTMLBuilder from sphinx.config import string_classes -from sphinx.util import copy_static_entry from sphinx.util.osutil import copyfile, ensuredir, make_filename from sphinx.util.console import bold +from sphinx.util.fileutil import copy_asset from sphinx.util.pycompat import htmlescape -from sphinx.util.matching import compile_matchers +from sphinx.util.matching import Matcher from sphinx.errors import SphinxError import plistlib @@ -107,17 +107,15 @@ class AppleHelpBuilder(StandaloneHTMLBuilder): self.finish_tasks.add_task(self.build_helpbook) def copy_localized_files(self): - source_dir = path.join(self.confdir, - self.config.applehelp_locale + '.lproj') + source_dir = path.join(self.confdir, self.config.applehelp_locale + '.lproj') target_dir = self.outdir if path.isdir(source_dir): self.info(bold('copying localized files... '), nonl=True) - ctx = self.globalcontext.copy() - matchers = compile_matchers(self.config.exclude_patterns) - copy_static_entry(source_dir, target_dir, self, ctx, - exclude_matchers=matchers) + excluded = Matcher(self.config.exclude_patterns + ['**/.*']) + copy_asset(source_dir, target_dir, excluded, + context=self.globalcontext, renderer=self.templates) self.info('done') |