]> git.phdru.name Git - m_librarian.git/blob - setup.py
cfe8db3186a5da97164cca822a6915da072f6952
[m_librarian.git] / setup.py
1 #!/usr/bin/env python
2
3 from os.path import abspath, dirname, join
4 from setuptools import setup
5 import sys
6
7 versionpath = join(abspath(dirname(__file__)), 'm_librarian', '__version__.py')
8 m_librarian_version = {}
9
10 if sys.version_info[:2] == (2, 7):
11     execfile(versionpath, m_librarian_version)  # noqa: F821 'execfile' Py3
12
13 elif sys.version_info >= (3, 4):
14     exec(open(versionpath, 'rU').read(), m_librarian_version)
15
16 else:
17     raise ImportError("m_librarian requires Python 2.7 or 3.4+")
18
19 setup(
20     name='m_librarian',
21     version=m_librarian_version['__version__'],
22     description='m_Librarian for LibRusEc/Flibusta libraries',
23     long_description=open('README.rst', 'rU').read(),
24     long_description_content_type="text/x-rst",
25     author='Oleg Broytman',
26     author_email='phd@phdru.name',
27     url='https://phdru.name/Software/Python/m_librarian/',
28     project_urls={
29         'Homepage': 'https://phdru.name/Software/Python/m_librarian/',
30         'Download': 'https://pypi.org/project/m_librarian/%s/'
31         % m_librarian_version['__version__'],
32         'Documentation':
33             'https://phdru.name/Software/Python/m_librarian/docs/',
34         'Russian docs':
35             'https://phdru.name/Software/Python/m_librarian/docs/ru/',
36         'Git repo': 'https://git.phdru.name/m_librarian.git/',
37         'Github repo': 'https://github.com/phdru/m_librarian',
38         'Issue tracker': 'https://github.com/phdru/m_librarian/issues',
39     },
40     license='GPL',
41     keywords=['books', 'library', 'Flibusta', 'LibRusEc', 'lib.rus.ec'],
42     platforms="Any",
43     classifiers=[
44         'Development Status :: 2 - Pre-Alpha',
45         'Environment :: Console',
46         'Intended Audience :: End Users/Desktop',
47         'License :: OSI Approved :: GNU General Public License (GPL)',
48         'Natural Language :: English',
49         'Natural Language :: Russian',
50         'Operating System :: POSIX',
51         'Programming Language :: Python :: 2',
52         'Programming Language :: Python :: 2.7',
53         'Programming Language :: Python :: 3',
54         'Programming Language :: Python :: 3.4',
55         'Programming Language :: Python :: 3.5',
56         'Programming Language :: Python :: 3.6',
57         'Programming Language :: Python :: 3.7',
58     ],
59     packages=['m_librarian', 'm_librarian.web'],
60     package_data={'m_librarian': [
61         'glst/*.txt', 'glst/genres_*.glst',
62         'translations/*.mo', 'translations/*.po',
63         'web/static/style.css', 'web/views/*.py', 'web/views/*.tmpl',
64         ]
65     },
66     scripts=['scripts/ml-import.py', 'scripts/ml-initdb.py',
67              'scripts/ml-search.py', 'scripts/ml-web.py'],
68     python_requires='>=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*',
69     install_requires=[
70         'SQLObject>=2.2.1; python_version=="2.7"',
71         'SQLObject>=3.0.0; python_version>="3.4"',
72         'm_lib.defenc>=1.0',
73     ],
74     extras_require={
75         'pbar': ['m_lib>=3.1'],
76         'web': ['bottle', 'Cheetah3'],
77     },
78 )