mirror of
https://github.com/YunoHost/moulinette.git
synced 2024-09-03 20:06:31 +02:00
e027a188a9
We do this to make it easier to control this value during testing. We should not import these values at package setup time. Nor should we import them at package load time. This change introduces a new API for the Moulinette package. The moulinette.env accessor. This is a breaking change. However, I've searched around and can't seem to find any usage that relies directly on these properties being available. I've tried to maintain API backwards compatibility in all cases otherwise.
46 lines
1.1 KiB
Python
Executable file
46 lines
1.1 KiB
Python
Executable file
#!/usr/bin/env python
|
|
|
|
import os
|
|
import sys
|
|
from setuptools import setup, find_packages
|
|
from moulinette.globals import init_moulinette_env
|
|
|
|
|
|
LOCALES_DIR = init_moulinette_env()['LOCALES_DIR']
|
|
|
|
# Extend installation
|
|
locale_files = []
|
|
|
|
if "install" in sys.argv:
|
|
# Evaluate locale files
|
|
for f in os.listdir('locales'):
|
|
if f.endswith('.json'):
|
|
locale_files.append('locales/%s' % f)
|
|
|
|
|
|
setup(name='Moulinette',
|
|
version='2.0.0',
|
|
description='Prototype interfaces quickly and easily',
|
|
author='Yunohost Team',
|
|
author_email='yunohost@yunohost.org',
|
|
url='http://yunohost.org',
|
|
license='AGPL',
|
|
packages=find_packages(exclude=['test']),
|
|
data_files=[(LOCALES_DIR, locale_files)],
|
|
python_requires='==2.7.*',
|
|
install_requires=[
|
|
'argcomplete',
|
|
'psutil',
|
|
'pytz',
|
|
'pyyaml',
|
|
'toml',
|
|
],
|
|
tests_require=[
|
|
'pytest',
|
|
'pytest-cov',
|
|
'pytest-env',
|
|
'pytest-mock',
|
|
'requests',
|
|
'requests-mock',
|
|
],
|
|
)
|