Mercurial > libervia-templates
comparison setup.py @ 146:7dc00829c32f
Instal sat_templates the python's way
You can just call 'pip install .' to install sat_templates.
author | Xavier Maillard <xavier@maillard.im> |
---|---|
date | Sat, 30 Dec 2017 14:13:09 +0100 |
parents | |
children | 33c7ce833d3f |
comparison
equal
deleted
inserted
replaced
145:013cfb6e6650 | 146:7dc00829c32f |
---|---|
1 #!/usr/bin/env python2 | |
2 # -*- coding: utf-8 -*- | |
3 | |
4 # SàT templates: collection of templates | |
5 # Copyright (C) 2017 Xavier Maillard (xavier@maillard.im) | |
6 | |
7 # This program is free software: you can redistribute it and/or modify | |
8 # it under the terms of the GNU Affero General Public License as published by | |
9 # the Free Software Foundation, either version 3 of the License, or | |
10 # (at your option) any later version. | |
11 | |
12 # This program is distributed in the hope that it will be useful, | |
13 # but WITHOUT ANY WARRANTY; without even the implied warranty of | |
14 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
15 # GNU Affero General Public License for more details. | |
16 | |
17 # You should have received a copy of the GNU Affero General Public License | |
18 # along with this program. If not, see <http://www.gnu.org/licenses/>. | |
19 | |
20 import os | |
21 import sys | |
22 from setuptools import setup, find_packages | |
23 | |
24 base = None | |
25 NAME = 'sat_templates' | |
26 is_wheel = 'bdist_wheel' in sys.argv | |
27 | |
28 # https://stackoverflow.com/a/36693250 | |
29 | |
30 def get_data_templates_files(directory): | |
31 paths = [] | |
32 for (path, directories, filenames) in os.walk(directory): | |
33 for filename in filenames: | |
34 paths.append(os.path.join('..', path, filename)) | |
35 return paths | |
36 | |
37 data_templates_files = get_data_templates_files('default') | |
38 | |
39 setup_info = dict( | |
40 name=NAME, | |
41 version= '0.7D', | |
42 author='Association « Salut à Toi »', | |
43 author_email='contact@salut-a-toi.org', | |
44 url='https://salut-a-toi.org', | |
45 classifiers=['Development Status :: 3 - Alpha', | |
46 'License :: OSI Approved :: GNU Affero General Public License v3 or later (AGPLv3+)', | |
47 'Operating System :: POSIX :: Linux', | |
48 'Topic :: Communications :: Chat'], | |
49 install_requires=[], | |
50 packages=['sat_templates'], | |
51 package_dir={'sat_templates':'default'}, | |
52 package_data={'': data_templates_files }, | |
53 data_files=[(os.path.join(sys.prefix, 'share/locale/fr/LC_MESSAGES'), ['i18n/fr/LC_MESSAGES/sat.mo']), | |
54 ('share/doc/%s' % NAME, ['COPYING']), | |
55 ], | |
56 zip_safe=True, | |
57 ) | |
58 | |
59 setup(**setup_info) |