コード例 #1
0
    def test_find_resource_files(self):
        ret = tethys_app_installation.find_resource_files(self.root)
        main_js = False
        icon_gif = False
        main_css = False
        if any('/js/main.js' in s for s in ret):
            main_js = True
        if any('/images/icon.gif' in s for s in ret):
            icon_gif = True
        if any('/css/main.css' in s for s in ret):
            main_css = True

        self.assertTrue(main_js)
        self.assertTrue(icon_gif)
        self.assertTrue(main_css)
コード例 #2
0
import os
import sys
from setuptools import setup, find_packages
from tethys_apps.app_installation import find_resource_files

# -- Apps Definition -- #
app_package = 'flood_extent_app'
release_package = 'tethysapp-' + app_package
app_class = 'flood_extent_app.app:FloodExtentApp'
app_package_dir = os.path.join(os.path.dirname(os.path.abspath(__file__)), 'tethysapp', app_package)


# -- Get Resource File -- #
resource_files = find_resource_files('tethysapp/' + app_package + '/templates')
resource_files += find_resource_files('tethysapp/' + app_package + '/public')

setup(
    name=release_package,
    version='0.0.1',
    description='',
    long_description='',
    keywords='',
    author='',
    author_email='',
    url='',
    license='',
    packages=find_packages(exclude=['ez_setup', 'examples', 'tests']),
    package_data={'': resource_files},
    namespace_packages=['tethysapp', 'tethysapp.' + app_package],
    include_package_data=True,
    zip_safe=False,
コード例 #3
0
ファイル: setup.py プロジェクト: BroccoliRules/Vacationeer
from setuptools import setup, find_namespace_packages
from tethys_apps.app_installation import find_resource_files

# -- Apps Definition -- #
app_package = 'vacationeer'
release_package = 'tethysapp-' + app_package

# -- Python Dependencies -- #
dependencies = []

# -- Get Resource File -- #
resource_files = find_resource_files('tethysapp/' + app_package + '/templates',
                                     'tethysapp/' + app_package)
resource_files += find_resource_files('tethysapp/' + app_package + '/public',
                                      'tethysapp/' + app_package)
resource_files += find_resource_files(
    'tethysapp/' + app_package + '/workspaces', 'tethysapp/' + app_package)

setup(
    name=release_package,
    version='0.0.1',
    description=
    'This app will help find the right vacation spots in Costa Rica that match your interests.',
    long_description='',
    keywords='',
    author='',
    author_email='',
    url='',
    license='',
    packages=find_namespace_packages(),
    package_data={'': resource_files},
コード例 #4
0
import os
from setuptools import setup, find_packages
from tethys_apps.app_installation import find_resource_files

# -- Extension Definition -- #
ext_package = 'test_extension'
release_package = 'tethysext-' + ext_package
ext_class = 'test_extension.ext:TestExtension'
ext_package_dir = os.path.join(os.path.dirname(os.path.abspath(__file__)), 'tethysext', ext_package)

# -- Python Dependencies -- #
dependencies = []

# -- Get Resource File -- #
resource_files = find_resource_files('tethysext/' + ext_package + '/templates')
resource_files += find_resource_files('tethysext/' + ext_package + '/public')

setup(
    name=release_package,
    version='0.0.0',
    description='',
    long_description='',
    keywords='',
    author='',
    author_email='',
    url='',
    license='',
    packages=find_packages(
        exclude=['ez_setup', 'examples', 'tethysext/' + ext_package + '/tests', 'tethysext/' + ext_package + '/tests.*']
    ),
    package_data={'': resource_files},