2 # -*- coding: utf-8 -*-
4 # This file is part of Librarian, licensed under GNU Affero GPLv3 or later.
5 # Copyright © Fundacja Nowoczesna Polska. See NOTICE for more information.
9 from distutils.core import setup
11 def whole_tree(prefix, path):
13 for f in (f for f in os.listdir(os.path.join(prefix, path)) if not f[0]=='.'):
14 new_path = os.path.join(path, f)
15 if os.path.isdir(os.path.join(prefix, new_path)):
16 files.extend(whole_tree(prefix, new_path))
18 files.append(new_path)
25 description='Converter from WolneLektury.pl XML-based language to XHTML, TXT and other formats',
26 author="Marek Stępniowski",
27 author_email='marek@stepniowski.com',
28 maintainer='Radek Czajka',
29 maintainer_email='radoslaw.czajka@nowoczesnapolska.org.pl',
30 url='http://github.com/fnp/librarian',
34 'librarian.styles.wolnelektury',
35 'librarian.styles.wolnelektury.partners',
37 package_data={'librarian': ['xslt/*.xslt', 'epub/*', 'mobi/*', 'pdf/*', 'fb2/*', 'fonts/*'] +
38 whole_tree(os.path.join(os.path.dirname(__file__), 'librarian'), 'font-optimizer') +
39 whole_tree(os.path.join(os.path.dirname(__file__), 'librarian'), 'res')},
40 include_package_data=True,
41 install_requires=['lxml>=2.2'],
42 scripts=['scripts/book2html',
48 'scripts/book2partner',
50 'scripts/bookfragments',
52 tests_require=['nose>=0.11', 'coverage>=3.0.1'],