Skip to content
Snippets Groups Projects
setup.py 1.78 KiB
Newer Older
me5na7qbjqbrp's avatar
me5na7qbjqbrp committed
from setuptools import setup
me5na7qbjqbrp's avatar
me5na7qbjqbrp committed
from os import getenv, path
from subprocess import call

# Enable the user to install cpasswords
# with another command and config path
command_name = getenv("COMMAND_NAME", "cranspasswords")
me5na7qbjqbrp's avatar
me5na7qbjqbrp committed

def compile_messages():
    """
    Compile gettext translations
    For now, only compile french
    """
    mo_files = []
    locales = ['cpasswords/locale/fr/LC_MESSAGES/messages.po']
    for po_file in locales:
        filename, _ = path.splitext(po_file)
        mo_file = filename + '.mo'
        call("msgfmt %s -o %s" % (po_file, mo_file), shell=True)
        mo_files.append(mo_file)
    return [('locale', mo_files), ]


setup(
    name="cpasswords",
    version="0.2.0",
    description="Group password manager based on GPG",
    long_description=open('README.rst').read(),
    maintainer="CRANS <roots@crans.org>",
    license='GPLv3',
    keywords=['crans', 'passwords', 'gpg', 'ssh', 'group'],
    url="https://gitlab.crans.org/nounous/cranspasswords",
    classifiers=[
me5na7qbjqbrp's avatar
me5na7qbjqbrp committed
        'Development Status :: 5 - Production/Stable',
        'Environment :: Console',
        'Intended Audience :: Developers',
        'Intended Audience :: Information Technology',
        'Intended Audience :: System Administrators',
        'License :: OSI Approved :: GNU General Public License v3 or later (GPLv3+)',
        'Operating System :: POSIX',
        "Programming Language :: Python :: 3",
me5na7qbjqbrp's avatar
me5na7qbjqbrp committed
        'Topic :: Utilities',
    ],
    packages=['cpasswords'],
me5na7qbjqbrp's avatar
me5na7qbjqbrp committed
    data_files=compile_messages(),
    include_package_data=True,
    install_requires=[
        'paramiko>=2.2',
        'pyperclip>=1.7.0'
    entry_points={
        "console_scripts": [
            command_name + " = cpasswords.client:main",
            command_name + "-server = cpasswords.server:main",
        ]
    }