View Single Post
Old 03-11-2014, 02:48 PM   #7
Jellby
frumious Bandersnatch
Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.
 
Jellby's Avatar
 
Posts: 7,516
Karma: 18512745
Join Date: Jan 2008
Location: Spaniard in Sweden
Device: Cybook Orizon, Kobo Aura
That works for __copyright__, which is defined outside the class, but not for version, which is inside:

Code:
from __future__ import (unicode_literals, division, absolute_import, print_function)

__license__   = 'GPL v3'
__copyright__ = '2014, Jellby <jellby@yahoo.com>'
__docformat__ = 'restructuredtext en'

from calibre.customize import InterfaceActionBase

load_translations()

class PrincePDFPlugin(InterfaceActionBase):
    name                    = _('Prince PDF')
    description             = _('Converts to PDF using the Prince software (third-party)')
    supported_platforms     = ['linux', 'windows']
    author                  = 'Jellby'
    version                 = (1, 1, 3)
    minimum_calibre_version = (1, 16, 0)
    actual_plugin           = 'calibre_plugins.prince_pdf.ui:InterfacePlugin'

...
(ImportError: cannot import name version)

I must be doing something wrong.

Last edited by Jellby; 03-11-2014 at 02:51 PM.
Jellby is offline   Reply With Quote