File: setup.py

package info (click to toggle)
wajig 4.0.3
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 408 kB
  • sloc: python: 2,462; makefile: 145; sh: 111
file content (77 lines) | stat: -rw-r--r-- 2,500 bytes parent folder | download
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
"""A setuptools based setup module.

See:
https://packaging.python.org/en/latest/distributing.html
https://github.com/pypa/sampleproject
"""

# Always prefer setuptools over distutils.

from setuptools import setup, find_packages

# To use a consistent encoding:

from codecs import open

from os import path, environ

here = path.abspath(path.dirname(__file__))

# Get the long description from the README file.

with open(path.join(here, 'docs/README.md'), encoding='utf-8') as f:
    long_description = f.read()

setup(
    name='wajig',
    version='4.0.3',  # DO NOT MODIFY. Managed from Makefile.
    description='Ubunut admin managemetn tool',
    long_description=long_description,
    long_description_content_type='text/markdown',
    author='Graham Williams',
    author_email='wajig@togaware.com',
    url='https://wajig.togaware.com',
    classifiers=[
        'Development Status :: 5 - Production/Stable',
        'Environment :: Console',
        'Intended Audience :: End Users/Desktop',
        'License :: OSI Approved :: GNU General Public License v3 (GPLv3)',
        'Programming Language :: Python :: 3',
    ],
    keywords='debian ubuntu admin',
    packages=find_packages(exclude=['contrib', 'docs', 'tests']),
    package_data={
        '.': ['LICENSE'],
        'wajig': [
            'bash_completion.d/wajig.bash'],
    },
    entry_points={'console_scripts': ['wajig=wajig:main']},
    install_requires=[
        'distro',
        # 20211026 Debian does not have rapidfuzz. Checking for
        # DEB_BUILD_ARCH in the environ may be robust for checking if
        # this is a Debian build. If it's Debian, use the debian
        # packaged fuzzywuzzy, else use the quicker rapidfuzz. Note
        # that wajig/util.py tries rapidfuzz first, and utilises it if
        # installed, otherwise falls back to fuzzywuzzy.
        'fuzzywuzzy' if 'DEB_BUILD_ARCH' in environ else 'rapidfuzz',
        'python-Levenshtein',
    ],
    include_package_data=True,
)

# How to effect this:
#
# cp ~/.local/lib/python3.8/site-packages/wajig/bash_completion.d/wajig.bash \
#    ~/.local/share/bash-completion/completions/wajig
#
# Maybe something like the following assuming this is run from \
#    lib/python3.8/site-packages
#
# cp wajig/bash_completion.d/wajig.bash \
#    ../../../share/bash-completion/completions/wajig
#
# os.system("cp wajig/bash_completion.d/wajig.bash \
#   ../../../share/bash-completion/completions/wajig")
#
# Need to make sure directory path exists.