Changeset View
Changeset View
Standalone View
Standalone View
setup.py
| #!/usr/bin/env python | #!/usr/bin/env python | ||||
| """Setup file for testing, not for packaging/distribution.""" | """Setup file for testing, not for packaging/distribution.""" | ||||
| import setuptools | import setuptools | ||||
| from setuptools.command.develop import develop | |||||
| from setuptools.command.install import install | |||||
| def translations_compile(): | |||||
| """Compile any existent translation. | |||||
| """ | |||||
sybren: Use `super().run()` instead. | |||||
| 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( | setuptools.setup( | ||||
| name='pillar', | name='pillar', | ||||
| version='2.0', | version='2.0', | ||||
| packages=setuptools.find_packages('.', exclude=['test']), | packages=setuptools.find_packages('.', exclude=['test']), | ||||
| install_requires=[ | install_requires=[ | ||||
| 'Flask>=0.12', | 'Flask>=0.12', | ||||
| 'Eve>=0.7.3', | 'Eve>=0.7.3', | ||||
| Show All 17 Lines | install_requires=[ | ||||
| 'pillarsdk', | 'pillarsdk', | ||||
| ], | ], | ||||
| tests_require=[ | tests_require=[ | ||||
| 'pytest>=2.9.1', | 'pytest>=2.9.1', | ||||
| 'responses>=0.5.1', | 'responses>=0.5.1', | ||||
| 'pytest-cov>=2.2.1', | 'pytest-cov>=2.2.1', | ||||
| 'mock>=2.0.0', | 'mock>=2.0.0', | ||||
| ], | ], | ||||
| entry_points = {'console_scripts': [ | |||||
| 'translations = pillar.cli.translations:main', | |||||
| ]}, | |||||
| cmdclass={ | |||||
| 'install': PostInstallCommand, | |||||
| 'develop': PostDevelopCommand, | |||||
| }, | |||||
| zip_safe=False, | zip_safe=False, | ||||
| ) | ) | ||||
Use super().run() instead.