Example #1
0
--- gazpacho/__init__.py.orig	2007-07-29 07:57:30 UTC
+++ gazpacho/__init__.py
@@ -16,19 +16,20 @@
 import os
 
 from kiwi.environ import Library
+from kiwi.environ import _KiwiProvider
 
 dirname = os.path.abspath(
     os.path.join(os.path.dirname(os.path.realpath(__file__)), '..'))
 
 lib = Library('gazpacho', root=dirname)
 if lib.uninstalled:
-    lib.add_global_resource('catalog', 'catalogs')
-    lib.add_global_resource('glade', 'glade')
-    lib.add_global_resource('resource', 'resources')
-    lib.add_global_resource('doc', '.')
-    lib.add_global_resource('pixmap', 'pixmaps')
-    lib.add_global_resource('pixmap', 'pixmaps/kiwi')
-    lib.add_global_resource('plugins', 'plugins')
+    _KiwiProvider.add_resource('catalog', os.path.join(dirname, 'catalog'))
+    _KiwiProvider.add_resource('glade', os.path.join(dirname, 'glade'))
+    _KiwiProvider.add_resource('resource', os.path.join(dirname, 'resources'))
+    _KiwiProvider.add_resource('doc', os.path.join(dirname, '.'))
+    _KiwiProvider.add_resource('pixmap', os.path.join(dirname, 'pixmaps'))
+    _KiwiProvider.add_resource('pixmap', os.path.join(dirname, 'pixmaps/kiwi'))
+    _KiwiProvider.add_resource('plugins', os.path.join(dirname, 'plugins'))
 lib.enable_translation()
 
 __version__ = "0.7.2"
Example #2
0
def _get_external_plugins_paths():
    import stoqlib
    # This is the dir containing stoq/kiwi/stoqdrivers/etc
    checkout = os.path.dirname(
        os.path.dirname(os.path.dirname(stoqlib.__file__)))

    # If there's n foobar plugin on the checkout, it will expand to find:
    #     CHECKOUT/<git_repository>/foobar/foobar.plugin
    for filename in glob.iglob(os.path.join(checkout, '*', '*', '*.plugin')):
        # In the example above, the path here is expected to be on
        # <git_repository>, not on <git_repository>/foobar/
        yield os.path.dirname(os.path.dirname(filename))


library = Library('stoq', root='..' + os.sep + '..')
if library.uninstalled:
    library.add_global_resource('csv', 'data/csv')
    library.add_global_resource('docs', '.')
    library.add_global_resource('glade', 'data/glade')
    library.add_global_resource('html', 'data/html')
    library.add_global_resource('misc', 'data/misc')
    library.add_global_resource('pixmaps', 'data/pixmaps')
    library.add_global_resource('sql', 'data/sql')
    library.add_global_resource('template', 'data/template')
    library.add_global_resource('uixml', 'data/uixml')
    library.add_resource('plugin', 'plugins')
    for dirname in _get_external_plugins_paths():
        library.add_resource('plugin', dirname)
    externals = os.path.join(library.get_root(), 'external')
else:
Example #3
0
## along with this program; if not, write to the Free Software
## Foundation, Inc., or visit: http://www.gnu.org/.
##
##
## Author(s): Stoq Team <*****@*****.**>
##
##

import os
import site

from kiwi.environ import Library

__all__ = ['library']

library = Library('stoq', root='..' + os.sep + '..')
if library.uninstalled:
    library.add_global_resource('config', 'data/config')
    library.add_global_resource('csv', 'data/csv')
    library.add_global_resource('docs', '.')
    library.add_global_resource('glade', 'data/glade')
    library.add_global_resource('html', 'data/html')
    library.add_global_resource('misc', 'data/misc')
    library.add_global_resource('pixmaps', 'data/pixmaps')
    library.add_global_resource('sql', 'data/sql')
    library.add_global_resource('template', 'data/template')
    library.add_global_resource('uixml', 'data/uixml')
    library.add_resource('plugin', 'plugins')
    externals = os.path.join(library.get_root(), 'external')
else:
    # root = $prefix/lib/pythonX.Y/site-packages
Example #4
0
# 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 the Free Software
# Foundation; either version 2 of the License, or (at your option) any later
# version.
#
# This program is distributed in the hope that it will be useful, but WITHOUT
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
# FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details
#
# You should have received a copy of the GNU General Public License along with
# this program; if not, write to the Free Software Foundation, Inc.,
# 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.

from kiwi.environ import Library, environ
import os

lib = Library("metanomon")
if lib.uninstalled:
    if os.path.exists("/usr/share/metanomon"):
        lib.add_global_resource('glade', '/usr/share/metanomon/glade')
        lib.add_global_resource('images', '/usr/share/metanomon/images')
    else:
        environ.add_resource('glade', 'glade')
        environ.add_resource('images', 'images')


Example #5
0
## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
## GNU Lesser General Public License for more details.
##
## You should have received a copy of the GNU Lesser General Public License
## along with this program; if not, write to the Free Software
## Foundation, Inc., or visit: http://www.gnu.org/.
##
##
## Author(s): Stoq Team <*****@*****.**>
##
##

import os
import site

from kiwi.environ import Library

__all__ = ["library"]


library = Library("stoq", root=".." + os.sep + "..")
if library.uninstalled:
    externals = os.path.join(library.get_root(), "external")
else:
    # root = $prefix/lib/pythonX.Y/site-packages
    # We want $prefix/lib/stoqlib, eg ../../stoqlib
    externals = os.path.join(library.prefix, "lib", "stoqlib")

site.addsitedir(externals)
library.enable_translation(domain="stoq", enable_global=True)
Example #6
0
## Copyright (C) 2005-2011 Async Open Source <http://www.async.com.br>
## All rights reserved
##
## 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
## the Free Software Foundation; either version 2 of the License, or
## (at your option) any later version.
##
## This program is distributed in the hope that it will be useful,
## but WITHOUT ANY WARRANTY; without even the implied warranty of
## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
## GNU General Public License for more details.
##
## You should have received a copy of the GNU General Public License
## along with this program; if not, write to the Free Software
## Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
## USA.
##
## Author(s):   Henrique Romano <*****@*****.**>
##              Johan Dahlin <*****@*****.**>
##

__version__ = (1, 2, 2)

from kiwi.environ import Library

__all__ = ["library"]

library = Library("stoqdrivers", root="..")
library.enable_translation()
Example #7
0
        raise SystemExit(
            "PyGTK 2.8 or PyGObject 2.9.0 or higher is required by kiwi\n"
            "Error was: %s" % e)

# if gobject.pygtk_version[:2] < (2, 8, 0):
#     raise ImportError("Your PyGTK/PyGObject version is too old, found %s, "
#                       "but 2.8.0 or higher is required by kiwi" % (
#         ('.'.join(map(str, gobject.pygtk_version))),))

from kiwi.__version__ import version as kiwi_version
from kiwi.environ import Library


assert kiwi_version # pyflakes

lib = Library('kiwi')
if lib.uninstalled:
    lib.add_global_resource('glade', 'glade')
    lib.add_global_resource('pixmap', 'pixmaps')
lib.enable_translation()

# Be careful to not export too much
del Library, lib, gobject

class ValueUnset:
    """To differentiate from places where None is a valid default. Used
    mainly in the Kiwi Proxy"""
    pass

__all__ = ['ValueUnset', 'kiwi_version']
Example #8
0
## Copyright (C) 2005-2011 Async Open Source <http://www.async.com.br>
## All rights reserved
##
## 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
## the Free Software Foundation; either version 2 of the License, or
## (at your option) any later version.
##
## This program is distributed in the hope that it will be useful,
## but WITHOUT ANY WARRANTY; without even the implied warranty of
## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
## GNU General Public License for more details.
##
## You should have received a copy of the GNU General Public License
## along with this program; if not, write to the Free Software
## Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
## USA.
##
## Author(s):   Henrique Romano <*****@*****.**>
##              Johan Dahlin <*****@*****.**>
##

__version__ = (1, 7, 2)

from kiwi.environ import Library

__all__ = ["library"]

library = Library("stoqdrivers", root="..")
library.enable_translation()
Example #9
0
from kiwi.environ import Library
lib = Library('package')
if lib.uninstalled:
    lib.add_global_resource('glade', 'glade')

Example #10
0
#    along with Foobar.  If not, see <http://www.gnu.org/licenses/>.
""" 
This is the basic package for the Crisk Application.
""" 

import sys
import os
import gtk.glade
from kiwi.environ import Library

#if os.name in ['win32', 'windows', 'nt']:
#    sys.stderr = sys.stdout

# Adicionando paths para achar os resources

lib = Library('crisk', '../../')

if lib.uninstalled:
    lib.add_global_resource('glade', 'glade')
    lib.add_global_resource('pixmaps', 'pixmaps')

lib.enable_translation('crisk')
lib.set_application_domain('crisk')



__author__ = 'José de Paula E. Júnior (coredump)'
__url__ = 'http://coredump.github.com/crisk/'
__version__ = '0.3'
__shortdescription__ = 'Simple Risk Management Tool'
__description__ = """
Example #11
0
Kiwi includes a Framework and a set of enhanced widgets

    - Authors:
      - Christian Reis <*****@*****.**>
      - Johan Dahlin <*****@*****.**>
    - Website: U{http://www.async.com.br/projects/kiwi/}
    - Organization: Async Open Source
"""

from kiwi.__version__ import version as kiwi_version
from kiwi.environ import Library

assert kiwi_version  # pyflakes

library = Library('kiwi')
library.enable_translation()

# Be careful to not export too much
del Library


class ValueUnset:
    """To differentiate from places where None is a valid default. Used
    mainly in the Kiwi Proxy"""
    pass


__all__ = ['ValueUnset', 'kiwi_version']

# by default locale uses the C locale but our date conversions use the user
Example #12
0
##
## Copyright (C) 2015 Async Open Source <http://www.async.com.br>
## All rights reserved
##
## This program is free software; you can redistribute it and/or
## modify it under the terms of the GNU Lesser General Public License
## as published by the Free Software Foundation; either version 2
## of the License, or (at your option) any later version.
##
## This program is distributed in the hope that it will be useful,
## but WITHOUT ANY WARRANTY; without even the implied warranty of
## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
## GNU Lesser General Public License for more details.
##
## You should have received a copy of the GNU Lesser General Public License
## along with this program; if not, write to the Free Software
## Foundation, Inc., or visit: http://www.gnu.org/.
##
## Author(s): Stoq Team <*****@*****.**>
##

from kiwi.environ import Library


__version__ = (0, 28, 0)
__all__ = ["library"]

library = Library("stoqserver", root="..")
library.enable_translation(domain='stoqserver', enable_global=True)
version_str = '.'.join(str(i) for i in __version__)
Example #13
0
# 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 the Free Software
# Foundation; either version 2 of the License, or (at your option) any later
# version.
#
# This program is distributed in the hope that it will be useful, but WITHOUT
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
# FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details
#
# You should have received a copy of the GNU General Public License along with
# this program; if not, write to the Free Software Foundation, Inc.,
# 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.

from kiwi.environ import Library, environ
import os

lib = Library("lintgtk")
if lib.uninstalled:
    if os.path.exists("/usr/share/lintgtk"):
        lib.add_global_resource('glade', '/usr/share/lintgtk/glade')
        lib.add_global_resource('images', '/usr/share/lintgtk/images')
    else:
        environ.add_resource('glade', 'glade')
        environ.add_resource('images', 'images')


Example #14
0
##
## Copyright (C) 2015 Async Open Source <http://www.async.com.br>
## All rights reserved
##
## This program is free software; you can redistribute it and/or
## modify it under the terms of the GNU Lesser General Public License
## as published by the Free Software Foundation; either version 2
## of the License, or (at your option) any later version.
##
## This program is distributed in the hope that it will be useful,
## but WITHOUT ANY WARRANTY; without even the implied warranty of
## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
## GNU Lesser General Public License for more details.
##
## You should have received a copy of the GNU Lesser General Public License
## along with this program; if not, write to the Free Software
## Foundation, Inc., or visit: http://www.gnu.org/.
##
## Author(s): Stoq Team <*****@*****.**>
##

from kiwi.environ import Library

__version__ = (0, 28, 0, "alpha1")
__all__ = ["library"]

library = Library("stoqserver", root="..")
library.enable_translation(domain='stoqserver', enable_global=True)
version_str = '.'.join(str(i) for i in __version__)
Example #15
0
##
## 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
## the Free Software Foundation; either version 2 of the License, or
## (at your option) any later version.
##
## This program is distributed in the hope that it will be useful,
## but WITHOUT ANY WARRANTY; without even the implied warranty of
## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
## GNU General Public License for more details.
##
## You should have received a copy of the GNU General Public License
## along with this program; if not, write to the Free Software
## Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
## USA.
##
## Author(s):   Henrique Romano <*****@*****.**>
##              Johan Dahlin <*****@*****.**>
##

__version__ = (0, 9, 17)

from kiwi.environ import Library

__all__ = ["library"]

library = Library("stoqdrivers", root="..")
if library.uninstalled:
    library.add_global_resource("conf", "stoqdrivers/conf")
library.enable_translation()
Example #16
0
## This program is distributed in the hope that it will be useful,
## but WITHOUT ANY WARRANTY; without even the implied warranty of
## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
## GNU Lesser General Public License for more details.
##
## You should have received a copy of the GNU Lesser General Public License
## along with this program; if not, write to the Free Software
## Foundation, Inc., or visit: http://www.gnu.org/.
##
##
## Author(s): Stoq Team <*****@*****.**>
##
##

import os

from kiwi.environ import Library

__all__ = ['library']


library = Library('stoq', root='..' + os.sep + '..')
if library.uninstalled:
    externals = os.path.join(library.get_root(), 'external')
else:
    # root = $prefix/lib/pythonX.Y/site-packages
    # We want $prefix/lib/stoqlib, eg ../../stoqlib
    externals = os.path.join(library.prefix, 'lib', 'stoqlib')

library.enable_translation(domain="stoq", enable_global=True)
Example #17
0
# vi:si:et:sw=4:sts=4:ts=4

##
## Copyright (C) 2015 Async Open Source <http://www.async.com.br>
## All rights reserved
##
## This program is free software; you can redistribute it and/or
## modify it under the terms of the GNU Lesser General Public License
## as published by the Free Software Foundation; either version 2
## of the License, or (at your option) any later version.
##
## This program is distributed in the hope that it will be useful,
## but WITHOUT ANY WARRANTY; without even the implied warranty of
## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
## GNU Lesser General Public License for more details.
##
## You should have received a copy of the GNU Lesser General Public License
## along with this program; if not, write to the Free Software
## Foundation, Inc., or visit: http://www.gnu.org/.
##
## Author(s): Stoq Team <*****@*****.**>
##

from kiwi.environ import Library

__version__ = (0, 12)
__all__ = ["library"]

library = Library("stoqserver", root="..")
version_str = '.'.join(str(i) for i in __version__)
Example #18
0
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU Lesser General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#
# This file contains code from Gazpacho
# Copyright (C) 2005 by Async Open Source

''' sacam module '''

import os

from kiwi.environ import Library

DIRNAME = os.path.abspath(
    os.path.join(os.path.dirname(os.path.realpath(__file__)), '..'))

LIB = Library('sacam', root=DIRNAME)
if LIB.uninstalled:
    LIB.add_global_resource('glade', 'glade')
    LIB.add_global_resource('doc', 'doc')
    LIB.add_global_resource('xml', 'xml')
LIB.enable_translation("sacam")
Example #19
0
#    along with Foobar.  If not, see <http://www.gnu.org/licenses/>.
""" 
This is the basic package for the Crisk Application.
"""

import sys
import os
import gtk.glade
from kiwi.environ import Library

#if os.name in ['win32', 'windows', 'nt']:
#    sys.stderr = sys.stdout

# Adicionando paths para achar os resources

lib = Library('crisk', '../../')

if lib.uninstalled:
    lib.add_global_resource('glade', 'glade')
    lib.add_global_resource('pixmaps', 'pixmaps')

lib.enable_translation('crisk')
lib.set_application_domain('crisk')

__author__ = 'José de Paula E. Júnior (coredump)'
__url__ = 'http://coredump.github.com/crisk/'
__version__ = '0.3'
__shortdescription__ = 'Simple Risk Management Tool'
__description__ = """
Crisk is a simple tool for Risk Management, aimed at security officers,
security consultants and risk professionals.
Example #20
0
# modify it under the terms of the GNU Lesser General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU Lesser General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#
# This file contains code from Gazpacho
# Copyright (C) 2005 by Async Open Source
''' sacam module '''

import os

from kiwi.environ import Library

DIRNAME = os.path.abspath(
    os.path.join(os.path.dirname(os.path.realpath(__file__)), '..'))

LIB = Library('sacam', root=DIRNAME)
if LIB.uninstalled:
    LIB.add_global_resource('glade', 'glade')
    LIB.add_global_resource('doc', 'doc')
    LIB.add_global_resource('xml', 'xml')
LIB.enable_translation("sacam")
Example #21
0
##
## 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
## the Free Software Foundation; either version 2 of the License, or
## (at your option) any later version.
##
## This program is distributed in the hope that it will be useful,
## but WITHOUT ANY WARRANTY; without even the implied warranty of
## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
## GNU General Public License for more details.
##
## You should have received a copy of the GNU General Public License
## along with this program; if not, write to the Free Software
## Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
## USA.
##
## Author(s):   Henrique Romano <*****@*****.**>
##              Johan Dahlin <*****@*****.**>
##

__version__ = (0, 9, 21)

from kiwi.environ import Library

__all__ = ["library"]

library = Library("stoqdrivers", root="..")
if library.uninstalled:
    library.add_global_resource("conf", "stoqdrivers/conf")
library.enable_translation()
Example #22
0
        raise SystemExit(
            "PyGTK 2.8 or PyGObject 2.9.0 or higher is required by kiwi\n"
            "Error was: %s" % e)

# if gobject.pygtk_version[:2] < (2, 8, 0):
#     raise ImportError("Your PyGTK/PyGObject version is too old, found %s, "
#                       "but 2.8.0 or higher is required by kiwi" % (
#         ('.'.join(map(str, gobject.pygtk_version))),))

from kiwi.__version__ import version as kiwi_version
from kiwi.environ import EnvironmentError, Library


assert kiwi_version # pyflakes

library = Library('kiwi')
if library.uninstalled:
    try:
        library.add_global_resource('glade', 'glade')
    except EnvironmentError:
        pass
library.enable_translation()

# Be careful to not export too much
del Library, gobject

class ValueUnset:
    """To differentiate from places where None is a valid default. Used
    mainly in the Kiwi Proxy"""
    pass
Example #23
0
    except:
        raise SystemExit(
            "PyGTK 2.8 or PyGObject 2.9.0 or higher is required by kiwi\n"
            "Error was: %s" % e)

# if gobject.pygtk_version[:2] < (2, 8, 0):
#     raise ImportError("Your PyGTK/PyGObject version is too old, found %s, "
#                       "but 2.8.0 or higher is required by kiwi" % (
#         ('.'.join(map(str, gobject.pygtk_version))),))

from kiwi.__version__ import version as kiwi_version
from kiwi.environ import Library

assert kiwi_version  # pyflakes

library = Library('kiwi')
if library.uninstalled:
    library.add_global_resource('glade', 'glade')
    library.add_global_resource('pixmap', 'pixmaps')
library.enable_translation()

# Be careful to not export too much
del Library, gobject


class ValueUnset:
    """To differentiate from places where None is a valid default. Used
    mainly in the Kiwi Proxy"""
    pass