Permalink
Browse files

remove dependencies like yaml, jinja from pksetup

  • Loading branch information...
robnagler committed Jun 18, 2015
1 parent 99fe624 commit 1bbb24c1da53f6cc0d0d711f6594d5673a5f5b38
View
@@ -1,6 +1,6 @@
.eggs/
MANIFEST.in
pykern_setup.yml
pytest.ini
tox.ini
.python-version
.#*
@@ -1,7 +1,11 @@
# -*- coding: utf-8 -*-
#
# {{ name }} documentation build configuration file, created by
# pykern.pksetup on Mon May 11 18:17:53 2015.
# OVERWRITTEN by pykern.pksetup every "python setup.py" build (egg, bdist)
#
# NOTE: If you add variables, make sure they are in triple-quoted strings so
# they escape any single or double quotes in description and author.
#
# {name} documentation build configuration file.
#
# This file is execfile()d with the current directory set to its
# containing dir.
@@ -36,7 +40,7 @@ extensions = [
'sphinx.ext.mathjax',
'sphinx.ext.ifconfig',
'sphinx.ext.viewcode',
'sphinxcontrib.napoleon',
'sphinx.ext.napoleon',
]
# Add any paths that contain templates here, relative to this directory.
@@ -54,19 +58,19 @@ source_suffix = '.rst'
master_doc = 'index'
# General information about the project.
project = '{{ name }}'
project = '''{name}'''
copyright = '{{ year }}, {{ author }}'
author = '{{ author }}'
copyright = '''{year}, {author}'''
author = '''{author}'''
# The version info for the project you're documenting, acts as replacement for
# |version| and |release|, also used in various other places throughout the
# built documents.
#
# The short X.Y version.
version = '{{ version }}'
version = '''{version}'''
# The full version, including alpha/beta/rc tags.
release = '{{ version }}'
release = '''{version}'''
# The language for content autogenerated by Sphinx. Refer to documentation
# for a list of supported languages.
@@ -122,7 +126,7 @@ html_theme = 'alabaster'
# Theme options are theme-specific and customize the look and feel of a theme
# further. For a list of options available for each theme, see the
# documentation.
#html_theme_options = {}
#html_theme_options = {{}}
# Add any paths that contain custom themes here, relative to this directory.
#html_theme_path = []
@@ -162,11 +166,11 @@ html_static_path = ['_static']
#html_use_smartypants = True
# Custom sidebar templates, maps document names to template names.
#html_sidebars = {}
#html_sidebars = {{}}
# Additional templates that should be rendered to pages, maps page names to
# template names.
#html_additional_pages = {}
#html_additional_pages = {{}}
# If false, no module index is generated.
#html_domain_indices = True
@@ -202,18 +206,18 @@ html_static_path = ['_static']
# A dictionary with options for the search language support, empty by default.
# Now only 'ja' uses this config value
#html_search_options = {'type': 'default'}
#html_search_options = {{'type': 'default'}}
# The name of a javascript file (relative to the configuration directory) that
# implements a search results scorer. If empty, the default will be used.
#html_search_scorer = 'scorer.js'
# Output file base name for HTML help builder.
htmlhelp_basename = '{{ name }}doc'
htmlhelp_basename = '''{name}doc'''
# -- Options for LaTeX output ---------------------------------------------
latex_elements = {
latex_elements = {{
# The paper size ('letterpaper' or 'a4paper').
#'papersize': 'letterpaper',
@@ -225,14 +229,14 @@ latex_elements = {
# Latex figure (float) alignment
#'figure_align': 'htbp',
}
}}
# Grouping the document tree into LaTeX files. List of tuples
# (source start file, target name, title,
# author, documentclass [howto, manual, or own class]).
latex_documents = [
(master_doc, '{{ name }}.tex', '{{ name }} Documentation',
'{{ author }}', 'manual'),
(master_doc, '''{name}.tex''', '''{name} Documentation''',
'''{author}''', 'manual'),
]
# The name of an image file (relative to this directory) to place at the top of
@@ -261,7 +265,7 @@ latex_documents = [
# One entry per manual page. List of tuples
# (source start file, name, description, authors, manual section).
man_pages = [
(master_doc, '{{ name }}', '{{ name }} Documentation',
(master_doc, '''{name}''', '''{name} Documentation''',
[author], 1)
]
@@ -275,8 +279,8 @@ man_pages = [
# (source start file, target name, title, author,
# dir menu entry, description, category)
texinfo_documents = [
(master_doc, '{{ name }}', '{{ name }} Documentation',
author, '{{ name }}', '{{ description }}',
(master_doc, '''{name}''', '''{name} Documentation''',
author, '''{name}''', '''{description}''',
'Miscellaneous'),
]
@@ -294,4 +298,4 @@ texinfo_documents = [
# Example configuration for intersphinx: refer to the Python standard library.
intersphinx_mapping = {'https://docs.python.org/': None}
intersphinx_mapping = {{'https://docs.python.org/': None}}
@@ -1 +1 @@
*_work/
*_work
View
@@ -8,10 +8,10 @@
from __future__ import absolute_import, division, print_function, unicode_literals
from io import open
# Root module: Import only builtin packages so avoid dependency issues
import inspect
import sys
from pykern.pkdebug import pkdc, pkdi, pkdp
def caller_module():
"""Which module is calling the caller of this function.
View
@@ -7,16 +7,16 @@
from __future__ import absolute_import, division, print_function, unicode_literals
from io import open
# Root module: Import only builtin packages so avoid dependency issues
import errno
import inspect
import os.path
import pkg_resources
import re
from pykern import pkinspect
from pykern import pksetup
#: The subdirectory in the top-level Python where to put resources
PACKAGE_DATA = 'package_data'
def filename(relative_filename, caller_context=None):
"""Return the filename to the resource
@@ -30,7 +30,7 @@ def filename(relative_filename, caller_context=None):
"""
pkg = pkinspect.root_package(
caller_context if caller_context else pkinspect.caller_module())
fn = os.path.join(PACKAGE_DATA, relative_filename)
fn = os.path.join(pksetup.PACKAGE_DATA, relative_filename)
res = pkg_resources.resource_filename(pkg, fn)
if not os.path.exists(res):
raise IOError((errno.ENOENT, 'resource does not exist', res))
Oops, something went wrong.

0 comments on commit 1bbb24c

Please sign in to comment.