make ZTK-compatible package that is installable as a Python egg

This commit is contained in:
Helmut Merz 2017-01-02 16:06:14 +01:00
parent e51ebdb28c
commit 421c21cdec
6 changed files with 48 additions and 13 deletions

11
MANIFEST.in Normal file
View file

@ -0,0 +1,11 @@
global-include *.cfg
global-include *.css *.js
global-include *.gif *.jpg *.png
global-include *.dmp
global-include *.md *.txt
global-include *.mo *.po *.pot
global-include *.pdf
global-include *.pt
global-include *.zcml
graft loops/integrator/testdata

7
README.md Normal file
View file

@ -0,0 +1,7 @@
# Introduction
This is the main part of the code of the semantic
web application platform *loops*, based on
Zope 3 / bluebream.
More information: see https://www.cyberconcepts.org.

View file

@ -1,5 +1,5 @@
# #
# Copyright (c) 2016 Helmut Merz helmutm@cy55.de # Copyright (c) 2017 Helmut Merz helmutm@cy55.de
# #
# This program is free software; you can redistribute it and/or modify # This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by # it under the terms of the GNU General Public License as published by
@ -82,8 +82,7 @@ class NodeView(BaseView):
super(NodeView, self).__init__(context, request) super(NodeView, self).__init__(context, request)
self.viewAnnotations.setdefault('nodeView', self) self.viewAnnotations.setdefault('nodeView', self)
self.viewAnnotations.setdefault('node', self.context) self.viewAnnotations.setdefault('node', self.context)
viewConfig = getViewConfiguration(context, request) self.setSkin(self.viewConfig.get('skinName'))
self.setSkin(viewConfig.get('skinName'))
def __call__(self, *args, **kw): def __call__(self, *args, **kw):
tv = self.viewAnnotations.get('targetView') tv = self.viewAnnotations.get('targetView')
@ -94,6 +93,26 @@ class NodeView(BaseView):
self.controller.setMainPage() self.controller.setMainPage()
return super(NodeView, self).__call__(*args, **kw) return super(NodeView, self).__call__(*args, **kw)
@Lazy
def viewConfig(self):
return getViewConfiguration(self.context, self.request)
@Lazy
def viewConfigOptions(self):
result = {}
for opt in self.viewConfig['options']:
if ':' in opt:
k, v = opt.split(':', 1)
result[k] = v.split(',')
else:
result[opt] = True
return result
#@Lazy
def copyright(self):
cr = self.viewConfigOptions.get('copyright')
return cr and cr[0] or 'cyberconcepts.org team'
@Lazy @Lazy
def macro(self): def macro(self):
return self.template.macros['content'] return self.template.macros['content']

View file

@ -1,6 +1,4 @@
""" # package loops.browser.skin
$Id$
"""
from cybertools.browser.liquid import Liquid from cybertools.browser.liquid import Liquid
from cybertools.browser.blue import Blue from cybertools.browser.blue import Blue

View file

@ -61,9 +61,9 @@
metal:define-macro="footer"> metal:define-macro="footer">
<metal:footer define-slot="footer"> <metal:footer define-slot="footer">
&copy; Copyright <span tal:replace="view/currentYear" />, &copy; Copyright <span tal:replace="view/currentYear" />,
cyberconcepts IT-Consulting Dr. Helmut Merz <span tal:replace="view/topMenu/copyright" />
(<a href="#" (<a i18n:translate=""
tal:attributes="href string:${view/topMenu/url}/impressum">Impressum</a>) tal:attributes="href string:${view/topMenu/url}/impressum">Impressum</a>)
<br /> <br />
Powered by Powered by
<b><a href="http://www.wissen-statt-suchen.de">loops</a></b> &middot; <b><a href="http://www.wissen-statt-suchen.de">loops</a></b> &middot;

View file

@ -1,7 +1,7 @@
from setuptools import setup, find_packages from setuptools import setup, find_packages
import sys, os import sys, os
version = '2.0' version = '2.2.1'
setup(name='loops', setup(name='loops',
version=version, version=version,
@ -10,9 +10,9 @@ setup(name='loops',
linked objects for organizational process services""", linked objects for organizational process services""",
classifiers=[], # Get strings from http://pypi.python.org/pypi?%3Aaction=list_classifiers classifiers=[], # Get strings from http://pypi.python.org/pypi?%3Aaction=list_classifiers
keywords='', keywords='',
author='Helmut Merz', author='cyberconcepts.org team',
author_email='helmutm@cy55.de', author_email='team@cyberconcepts.org',
url='', url='https://www.cyberconcepts.org',
license='GPL', license='GPL',
packages=find_packages(exclude=['ez_setup', 'examples', 'tests']), packages=find_packages(exclude=['ez_setup', 'examples', 'tests']),
include_package_data=True, include_package_data=True,