File: setup.py

package info (click to toggle)
python3-precis-i18n 1.0.0-1
  • links: PTS, VCS
  • area: main
  • in suites: bullseye, sid
  • size: 680 kB
  • sloc: python: 1,716; makefile: 3
file content (65 lines) | stat: -rw-r--r-- 2,059 bytes parent folder | download | duplicates (2)
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
"""A setuptools based setup module for precis_i18n.
See:
https://packaging.python.org/en/latest/distributing.html
https://github.com/pypa/sampleproject
"""

# Always prefer setuptools over distutils
from setuptools import setup
# To use a consistent encoding
from codecs import open
from os import path
import re

here = path.abspath(path.dirname(__file__))
description_path = path.join(here, 'README.rst')
version_path = path.join(here, 'precis_i18n', '__init__.py')

# Read README.rst.
with open(description_path, encoding='utf-8') as f:
    long_description = f.read()

# Extract version number.
with open(version_path, encoding='utf-8') as f:
    version_regex = re.compile(r"(?m)__version__\s*=\s*'(\d+\.\d+\.\d+)'")
    version = version_regex.search(f.read()).group(1)

# Running `python setup.py test` should run unit tests (see `test_suite`).
def all_tests():
    import unittest
    test_loader = unittest.TestLoader()
    return test_loader.discover('test')


setup(
    name='precis_i18n',
    packages=['precis_i18n'],
    version=version,
    license='MIT',

    description='PRECIS-i18n: Internationalized Usernames and Passwords',
    long_description=long_description,
    keywords='precis codec username password',

    # The project's main homepage and author.
    url='https://github.com/byllyfish/precis_i18n',
    author='William W. Fisher',
    author_email='william.w.fisher@gmail.com',

    # See https://pypi.python.org/pypi?%3Aaction=list_classifiers
    classifiers=[
        'Development Status :: 5 - Production/Stable',
        'Intended Audience :: Developers',
        'License :: OSI Approved :: MIT License',
        'Operating System :: OS Independent',
        'Programming Language :: Python :: 3',
        'Programming Language :: Python :: 3.3',
        'Programming Language :: Python :: 3.4',
        'Programming Language :: Python :: 3.5',
        'Programming Language :: Python :: 3.6',
        'Topic :: Software Development :: Internationalization'
    ],

    zip_safe=True,
    test_suite="setup.all_tests"
)