Hi,
I'm trying to understand the Elisa plugin mechanism using the weather
plugin tutorial.
I follow the tutorial and I add a weather icon in the main menu but I
don't know how configure the resource providers. Because I read in the
tutorial how to set the configuration file "elisa_weather.conf", but I
use the last version and I read that, in Elisa 0.5.15 and after, the
*_providers keys have been removed from the configuration and the
discovery of the providers is done using the plugins entry points.

So I tried to put the line in the setup.py file in this way:

import os
from setuptools import setup
from elisa.core.utils.dist import find_packages, TrialTest, Clean

packages, package_dir = find_packages(os.path.dirname(__file__))
cmdclass = dict(test=TrialTest, clean=Clean)

setup(name='elisa-plugin-weather',
    version='0.1',
    description='Weather plugin',
    license='GPL3',
    author='Elisa Developers',
    author_email='[email protected]',
    keywords='',
    install_requires=['pymetar>=0.12'],
    namespace_packages=['elisa', 'elisa.plugins'],
    packages=packages,
    package_dir=package_dir,
    package_data={'': ['*.png', '*.mo', '*.po']},
    
resource_providers=['elisa.plugins.weather.report_provider:WeatherReportProvider'],
    controller_mappings=[('/elisa/weather',
            'elisa.plugins.weather.weather_controller:WeatherController')],
    decorator_mappings=[('/poblesec/sections_menu',
'elisa.plugins.weather.weatherDecorator:weather_decorator')],
    cmdclass=cmdclass)

but doesn't work.

What I have to do?

Thanks in advance,
cheers Luca

Reply via email to