Skip to content

Commit

Permalink
Added Plone theme package structure
Browse files Browse the repository at this point in the history
  • Loading branch information
macagua committed May 11, 2018
1 parent 9af94e6 commit 1d21832
Show file tree
Hide file tree
Showing 34 changed files with 611 additions and 0 deletions.
23 changes: 23 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
*~
*.mo
*.egg-info
*.egg
*.EGG
*.EGG-INFO
.eggs
bin
build
develop-eggs
downloads
eggs
fake-eggs
parts
dist
.installed.cfg
.mr.developer.cfg
.hg
.bzr
.svn
*.pyc
*.pyo
*.tmp*
File renamed without changes.
6 changes: 6 additions & 0 deletions beyondskins/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# See http://peak.telecommunity.com/DevCenter/setuptools#namespace-packages
try:
__import__('pkg_resources').declare_namespace(__name__)
except ImportError:
from pkgutil import extend_path
__path__ = extend_path(__path__, __name__)
6 changes: 6 additions & 0 deletions beyondskins/pb9/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# See http://peak.telecommunity.com/DevCenter/setuptools#namespace-packages
try:
__import__('pkg_resources').declare_namespace(__name__)
except ImportError:
from pkgutil import extend_path
__path__ = extend_path(__path__, __name__)
3 changes: 3 additions & 0 deletions beyondskins/pb9/site/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@

def initialize(context):
"""Initializer called when used as a Zope 2 product."""
32 changes: 32 additions & 0 deletions beyondskins/pb9/site/configure.zcml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
<configure
xmlns="http://namespaces.zope.org/zope"
xmlns:five="http://namespaces.zope.org/five"
xmlns:i18n="http://namespaces.zope.org/i18n"
xmlns:genericsetup="http://namespaces.zope.org/genericsetup"
xmlns:plone="http://namespaces.plone.org/plone"
i18n_domain="beyondskins.pb9.site">

<five:registerPackage package="." initialize=".initialize" />

<genericsetup:registerProfile
name="default"
title="beyondskins.pb9.site"
directory="profiles/default"
description="Installs the beyondskins.pb9.site package"
provides="Products.GenericSetup.interfaces.EXTENSION"
/>

<genericsetup:registerProfile
name="uninstall"
title="beyondskins.pb9.site: Uninstall profile for Plone 4 Diazo Theme"
directory="profiles/uninstall"
description="Uninstalls the beyondskins.pb9.site package"
provides="Products.GenericSetup.interfaces.EXTENSION"
/>

<!-- -*- extra stuff goes here -*- -->

<include package="plone.resource" file="meta.zcml"/>
<plone:static directory="static" type="theme" name="beyondskins.pb9.site" />

</configure>
7 changes: 7 additions & 0 deletions beyondskins/pb9/site/profiles/default/metadata.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
<?xml version="1.0"?>
<metadata>
<version>1000</version>
<dependencies>
<dependency>profile-plone.app.theming:default</dependency>
</dependencies>
</metadata>
4 changes: 4 additions & 0 deletions beyondskins/pb9/site/profiles/default/theme.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
<theme>
<name>beyondskins.pb9.site</name>
<enabled>true</enabled>
</theme>
4 changes: 4 additions & 0 deletions beyondskins/pb9/site/profiles/uninstall/metadata.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
<?xml version="1.0"?>
<metadata>
<version>1000</version>
</metadata>
4 changes: 4 additions & 0 deletions beyondskins/pb9/site/profiles/uninstall/theme.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
<theme>
<name>beyondskins.pb9.site</name>
<enabled>false</enabled>
</theme>
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes.
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes.
File renamed without changes
54 changes: 54 additions & 0 deletions beyondskins/pb9/site/tests.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
import unittest

from zope.testing import doctestunit
from zope.component import testing
from Testing import ZopeTestCase as ztc

from Products.Five import zcml
from Products.Five import fiveconfigure
from Products.PloneTestCase import PloneTestCase as ptc
from Products.PloneTestCase.layer import PloneSite
ptc.setupPloneSite()

import beyondskins.pb9.site

class TestCase(ptc.PloneTestCase):
class layer(PloneSite):
@classmethod
def setUp(cls):
fiveconfigure.debug_mode = True
zcml.load_config('configure.zcml',
beyondskins.pb9.site)
fiveconfigure.debug_mode = False

@classmethod
def tearDown(cls):
pass


def test_suite():
return unittest.TestSuite([

# Unit tests
#doctestunit.DocFileSuite(
# 'README.rst', package='beyondskins.pb9.site',
# setUp=testing.setUp, tearDown=testing.tearDown),

#doctestunit.DocTestSuite(
# module='beyondskins.pb9.site.mymodule',
# setUp=testing.setUp, tearDown=testing.tearDown),


# Integration tests that use PloneTestCase
#ztc.ZopeDocFileSuite(
# 'README.rst', package='beyondskins.pb9.site',
# test_class=TestCase),

#ztc.FunctionalDocFileSuite(
# 'browser.txt', package='beyondskins.pb9.site',
# test_class=TestCase),

])

if __name__ == '__main__':
unittest.main(defaultTest='test_suite')
1 change: 1 addition & 0 deletions beyondskins/pb9/site/version.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
0.1
11 changes: 11 additions & 0 deletions docs/HISTORY.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
Changelog
=========

0.1dev (unreleased)
-------------------

- Initial upload [André Nogueira]

- Initial commit [André Nogueira]

- Initial release
47 changes: 47 additions & 0 deletions docs/INSTALL.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
beyondskins.pb9.site Installation
=======================

* When you're reading this you have probably already run
``easy_install beyondskins.pb9.site``. Find out how to install setuptools
(and EasyInstall) here:
http://peak.telecommunity.com/DevCenter/EasyInstall

* Get `pythonproducts`_ and install it via::

python setup.py install --home /path/to/instance

into your Zope instance.

* Create a file called ``beyondskins.pb9.site-configure.zcml`` in the
``/path/to/instance/etc/package-includes`` directory. The file
should only contain this::

<include package="beyondskins.pb9.site" />

.. _pythonproducts: http://plone.org/products/pythonproducts

Alternatively, if you are using zc.buildout and the plone.recipe.zope2instance
recipe to manage your project, you can do this:

* Add ``beyondskins.pb9.site`` to the list of eggs to install, e.g.:

[buildout]
...
eggs =
...
beyondskins.pb9.site

* Tell the plone.recipe.zope2instance recipe to install a ZCML slug:

[instance]
recipe = plone.recipe.zope2instance
...
zcml =
beyondskins.pb9.site

* Re-run buildout, e.g. with:

$ ./bin/buildout

You can skip the ZCML slug if you are going to explicitly include the package
from another package's configure.zcml file.
Loading

0 comments on commit 1d21832

Please sign in to comment.