nowa -> 2017
[librarian.git] / setup.py
1 #!/usr/bin/env python
2 # -*- coding: utf-8 -*-
3 #
4 # This file is part of Librarian, licensed under GNU Affero GPLv3 or later.
5 # Copyright © Fundacja Nowoczesna Polska. See NOTICE for more information.
6 #
7 import os
8 import os.path
9 from distutils.core import setup
10
11
12 def whole_tree(prefix, path):
13     files = []
14     for f in (f for f in os.listdir(os.path.join(prefix, path)) if not f[0] == '.'):
15         new_path = os.path.join(path, f)
16         if os.path.isdir(os.path.join(prefix, new_path)):
17             files.extend(whole_tree(prefix, new_path))
18         else:
19             files.append(new_path)
20     return files
21
22
23 setup(
24     name='librarian',
25     version='1.5.1',
26     description='Converter from WolneLektury.pl XML-based language to XHTML, TXT and other formats',
27     author="Marek Stępniowski",
28     author_email='marek@stepniowski.com',
29     maintainer='Radek Czajka',
30     maintainer_email='radoslaw.czajka@nowoczesnapolska.org.pl',
31     url='http://github.com/fnp/librarian',
32     packages=[
33         'librarian',
34         'librarian.styles',
35         'librarian.styles.wolnelektury',
36         'librarian.styles.wolnelektury.partners',
37     ],
38     package_data={
39         'librarian': (
40             ['xslt/*.xslt', 'epub/*', 'mobi/*', 'pdf/*', 'fb2/*', 'fonts/*'] +
41             whole_tree(os.path.join(os.path.dirname(__file__), 'librarian'), 'font-optimizer') +
42             whole_tree(os.path.join(os.path.dirname(__file__), 'librarian'), 'res'))
43     },
44     include_package_data=True,
45     install_requires=['lxml>=2.2'],
46     scripts=['scripts/book2html',
47              'scripts/book2txt',
48              'scripts/book2epub',
49              'scripts/book2mobi',
50              'scripts/book2pdf',
51              'scripts/book2fb2',
52              'scripts/book2partner',
53              'scripts/book2cover',
54              'scripts/bookfragments',
55              'scripts/genslugs'],
56     tests_require=['nose>=0.11', 'coverage>=3.0.1'],
57 )