Added shortcodes 2.5.0 as dependency; Earlier versions corrupted non-ASCII characters, see https://github.com/dmulholland/shortcodes/issues/6 The rendered elements have a `shortcode` CSS class. The YouTube shortcode supports various ways to refer to a video: - `{youtube VideoID}` - `{youtube youtube.com or youtu.be URL}` URLs containing an '=' should be quoted, or otherwise the shortcodes library will parse it as "key=value" pair. The IFrame shortcode supports the `cap` and `nocap` attributes. `cap` indicates the required capability the user should have in order to render the tag. If `nocap` is given, its contents are shown as a message to users who do not have this tag; without it, the iframe is silently hidden. `{iframe src='https://source' cap='subscriber' nocap='Subscribe to view'}` Merged test code + added HTML class for shortcode iframes
78 lines
1.9 KiB
Python
78 lines
1.9 KiB
Python
#!/usr/bin/env python
|
|
|
|
"""Setup file for testing, not for packaging/distribution."""
|
|
|
|
import setuptools
|
|
from setuptools.command.develop import develop
|
|
from setuptools.command.install import install
|
|
|
|
|
|
def translations_compile():
|
|
"""Compile any existent translation.
|
|
"""
|
|
from pillar import cli
|
|
cli.translations.compile()
|
|
|
|
|
|
class PostDevelopCommand(develop):
|
|
"""Post-installation for develop mode."""
|
|
def run(self):
|
|
super().run()
|
|
translations_compile()
|
|
|
|
|
|
class PostInstallCommand(install):
|
|
"""Post-installation for installation mode."""
|
|
def run(self):
|
|
super().run()
|
|
translations_compile()
|
|
|
|
|
|
setuptools.setup(
|
|
name='pillar',
|
|
version='2.0',
|
|
packages=setuptools.find_packages('.', exclude=['test']),
|
|
install_requires=[
|
|
'Flask>=0.12',
|
|
'Eve>=0.7.3',
|
|
'Flask-Cache>=0.13.1',
|
|
'Flask-Script>=2.0.5',
|
|
'Flask-Login>=0.3.2',
|
|
'Flask-OAuthlib>=0.9.3',
|
|
'Flask-WTF>=0.14.2',
|
|
'algoliasearch>=1.12.0',
|
|
|
|
# Limit the major version to the major version of ElasticSearch we're using.
|
|
'elasticsearch>=6.0.0,<7.0.0',
|
|
'elasticsearch_dsl>=6.0.0,<7.0.0',
|
|
|
|
'attrs>=16.2.0',
|
|
'bugsnag>=2.3.1',
|
|
'gcloud>=0.12.0',
|
|
'google-apitools>=0.4.11',
|
|
'MarkupSafe>=0.23',
|
|
'Pillow>=2.8.1',
|
|
'requests>=2.9.1',
|
|
'rsa>=3.3',
|
|
'shortcodes>=2.5', # 2.4.0 and earlier corrupted unicode
|
|
'zencoder>=0.6.5',
|
|
'bcrypt>=2.0.0',
|
|
'blinker>=1.4',
|
|
'pillarsdk',
|
|
],
|
|
tests_require=[
|
|
'pytest>=2.9.1',
|
|
'responses>=0.5.1',
|
|
'pytest-cov>=2.2.1',
|
|
'mock>=2.0.0',
|
|
],
|
|
entry_points = {'console_scripts': [
|
|
'translations = pillar.cli.translations:main',
|
|
]},
|
|
cmdclass={
|
|
'install': PostInstallCommand,
|
|
'develop': PostDevelopCommand,
|
|
},
|
|
zip_safe=False,
|
|
)
|