doc: now doc generation is working.

This commit is contained in:
Mathieu Virbel 2010-12-17 00:02:30 +01:00
parent 992a56e7a3
commit d5e5281d22
5 changed files with 28 additions and 19 deletions

View File

@ -125,8 +125,8 @@ for package in packages:
summary = 'NO DOCUMENTATION (package %s)' % package
t = template.replace('$SUMMARY', summary)
t = t.replace('$PACKAGE', package)
t = t.replace('$EXAMPLES', '')
t = t.replace('$EXAMPLES_REF', '')
t = t.replace('$EXAMPLES', '')
# search packages
for subpackage in packages:

View File

@ -146,7 +146,7 @@ if not 'KIVY_DOC_INCLUDE' in os.environ:
'''
# configuration
from kivy.config import *
from kivy.config import Config
# Set level of logger
level = LOG_LEVELS.get(Config.get('kivy', 'log_level'))

View File

@ -1,7 +1,8 @@
'''
Cache Manager: cache object and delete them automaticly
Cache Manager: cache object and delete them automatically
How to use the cache ::
# register a new Cache
Cache.register('mycache', limit=10, timeout=5)
@ -19,6 +20,7 @@ not used the label since 5 seconds, and you've reach the limit.
__all__ = ('Cache', )
from os import environ
from kivy.logger import Logger
from kivy.clock import Clock
@ -218,5 +220,6 @@ class Cache(object):
str(Cache._categories[category]['timeout'])
)
# install the schedule clock for purging
Clock.schedule_interval(Cache._purge_by_timeout, 1)
if 'KIVY_DOC_INCLUDE' not in environ:
# install the schedule clock for purging
Clock.schedule_interval(Cache._purge_by_timeout, 1)

View File

@ -15,8 +15,9 @@ You can add new event like this ::
If the callback return False, the schedule will be removed.
'''
__all__ = ('Clock', )
__all__ = ('Clock', 'ClockBase')
from os import environ
from time import time, sleep
from kivy.weakmethod import WeakMethod
from kivy.config import Config
@ -164,6 +165,9 @@ class ClockBase(object):
self._events.remove(event)
#: Instance of the ClockBase, available for everybody
Clock = ClockBase()
if 'KIVY_DOC_INCLUDE' in environ:
#: Instance of the ClockBase, available for everybody
Clock = None
else:
Clock = ClockBase()

View File

@ -3,22 +3,24 @@ GL: Select which library will be used for providing OpenGL support
'''
# Right now, only PyOpenGL
from os import environ
from kivy.config import Config
from kivy.logger import Logger
import OpenGL
from OpenGL.GL import *
from OpenGL.GLU import *
# Disable pyOpenGL auto GL Error Check?
gl_check = Config.get('kivy', 'gl_error_check')
if gl_check.lower() in ['0', 'false', 'no']:
import OpenGL
OpenGL.ERROR_CHECKING = False
if 'KIVY_DOC_INCLUDE' not in environ:
# Disable pyOpenGL auto GL Error Check?
gl_check = Config.get('kivy', 'gl_error_check')
if gl_check.lower() in ['0', 'false', 'no']:
OpenGL.ERROR_CHECKING = False
# To be able to use our GL provider, we must have a window
# Automaticly import window auto to ensure the default window creation
import kivy.core.window
# To be able to use our GL provider, we must have a window
# Automaticly import window auto to ensure the default window creation
import kivy.core.window
def print_gl_version():
version = glGetString(GL_VERSION)
Logger.info('GL: OpenGL version <%s>' % str(version))
def print_gl_version():
version = glGetString(GL_VERSION)
Logger.info('GL: OpenGL version <%s>' % str(version))