summaryrefslogtreecommitdiff
path: root/setup.py
blob: e168f0937c22b03e8decfce88ff9ba354676ea37 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
import subprocess
import sys

from setuptools import Command, setup

try:
    from babel import __version__
except SyntaxError as exc:
    sys.stderr.write(f"Unable to import Babel ({exc}). Are you running a supported version of Python?\n")
    sys.exit(1)


class import_cldr(Command):
    description = 'imports and converts the CLDR data'
    user_options = []

    def initialize_options(self):
        pass

    def finalize_options(self):
        pass

    def run(self):
        subprocess.check_call([sys.executable, 'scripts/download_import_cldr.py'])


setup(
    name='Babel',
    version=__version__,
    description='Internationalization utilities',
    long_description='A collection of tools for internationalizing Python applications.',
    author='Armin Ronacher',
    author_email='armin.ronacher@active-4.com',
    maintainer='Aarni Koskela',
    maintainer_email='akx@iki.fi',
    license='BSD',
    url='https://babel.pocoo.org/',
    project_urls={
        'Source': 'https://github.com/python-babel/babel',
    },
    classifiers=[
        'Development Status :: 5 - Production/Stable',
        'Environment :: Web Environment',
        'Intended Audience :: Developers',
        'License :: OSI Approved :: BSD License',
        'Operating System :: OS Independent',
        'Programming Language :: Python',
        'Programming Language :: Python :: 3',
        'Programming Language :: Python :: 3 :: Only',
        'Programming Language :: Python :: 3.7',
        'Programming Language :: Python :: 3.8',
        'Programming Language :: Python :: 3.9',
        'Programming Language :: Python :: 3.10',
        'Programming Language :: Python :: 3.11',
        'Programming Language :: Python :: Implementation :: CPython',
        'Programming Language :: Python :: Implementation :: PyPy',
        'Topic :: Software Development :: Libraries :: Python Modules',
    ],
    python_requires='>=3.7',
    packages=['babel', 'babel.messages', 'babel.localtime'],
    package_data={"babel": ["py.typed"]},
    include_package_data=True,
    install_requires=[
        # This version identifier is currently necessary as
        # pytz otherwise does not install on pip 1.4 or
        # higher.
        # Python 3.9 and later include zoneinfo which replaces pytz
        'pytz>=2015.7; python_version<"3.9"',
    ],
    extras_require={
        'dev': [
            'pytest>=6.0',
            'pytest-cov',
            'freezegun~=1.0',
        ],
    },
    cmdclass={'import_cldr': import_cldr},
    zip_safe=False,
    # Note when adding extractors: builtin extractors we also want to
    # work if packages are not installed to simplify testing.  If you
    # add an extractor here also manually add it to the "extract"
    # function in babel.messages.extract.
    entry_points="""
    [console_scripts]
    pybabel = babel.messages.frontend:main

    [distutils.commands]
    compile_catalog = babel.messages.frontend:compile_catalog
    extract_messages = babel.messages.frontend:extract_messages
    init_catalog = babel.messages.frontend:init_catalog
    update_catalog = babel.messages.frontend:update_catalog

    [distutils.setup_keywords]
    message_extractors = babel.messages.frontend:check_message_extractors

    [babel.checkers]
    num_plurals = babel.messages.checkers:num_plurals
    python_format = babel.messages.checkers:python_format

    [babel.extractors]
    ignore = babel.messages.extract:extract_nothing
    python = babel.messages.extract:extract_python
    javascript = babel.messages.extract:extract_javascript
    """
)