setup.py 2.74 KB
Newer Older
1
#!/usr/bin/env python3
2 3 4 5 6
try:
    from setuptools import setup, Extension
except ImportError:
    from distutils.core import setup, Extension

mathieui's avatar
mathieui committed
7
import os
louiz’'s avatar
louiz’ committed
8

mathieui's avatar
mathieui committed
9
module_poopt = Extension('poezio.poopt',
mathieui's avatar
mathieui committed
10
                    extra_compile_args=['-Wno-declaration-after-statement'],
mathieui's avatar
mathieui committed
11
                    sources = ['src/pooptmodule.c'])
louiz’'s avatar
louiz’ committed
12

13 14 15 16 17 18 19 20

current_dir = os.path.dirname(__file__)

# Create a link to the config file (for packaging purposes)
if not os.path.exists(os.path.join(current_dir, 'src', 'default_config.cfg')):
    os.link(os.path.join(current_dir, 'data', 'default_config.cfg'),
            os.path.join(current_dir, 'src',  'default_config.cfg'))

mathieui's avatar
mathieui committed
21
setup(name="poezio",
mathieui's avatar
mathieui committed
22
       version="0.8.3-dev",
mathieui's avatar
mathieui committed
23 24
       description="A console XMPP client",
       long_description=
25 26 27 28 29 30
       "Poezio is a Free chat client aiming to reproduce the ease of use of most "
       "IRC clients (e.g. weechat, irssi) while using the XMPP network."
       "\n"
       "Documentation is available at http://doc.poez.io/0.8.",


louiz’'s avatar
louiz’ committed
31
       ext_modules = [module_poopt],
32
       url = 'http://poez.io/',
mathieui's avatar
mathieui committed
33
       license = 'zlib',
34
       download_url = 'https://dev.louiz.org/projects/poezio/files',
mathieui's avatar
mathieui committed
35

louiz’'s avatar
louiz’ committed
36 37
       author = 'Florent Le Coz',
       author_email = 'louiz@louiz.org',
mathieui's avatar
mathieui committed
38 39 40 41

       maintainer = 'Mathieu Pasquet',
       maintainer_email = 'mathieui@mathieui.net',

mathieui's avatar
mathieui committed
42
       classifiers = ['Development Status :: 2 - Pre-Alpha',
43
                       'Topic :: Communications :: Chat',
mathieui's avatar
mathieui committed
44 45 46 47 48
                       'Environment :: Console :: Curses',
                       'Intended Audience :: End Users/Desktop',
                       'License :: OSI Approved :: zlib/libpng License',
                       'Natural Language :: English',
                       'Operating System :: Unix',
49
                       'Programming Language :: Python :: 3'
mathieui's avatar
mathieui committed
50
                    ],
51
       keywords = ['jabber', 'xmpp', 'client', 'chat', 'im', 'console'],
52 53
       packages = ['poezio', 'poezio.core', 'poezio.tabs', 'poezio.windows',
                   'poezio_plugins', 'poezio_plugins.gpg', 'poezio_themes'],
54
       package_dir = {'poezio': 'src', 'poezio_plugins': 'plugins', 'poezio_themes': 'data/themes'},
55
       package_data = {'poezio': ['default_config.cfg']},
56 57
       scripts = ['scripts/poezio_gpg_export'],
       entry_points={ 'console_scripts': [ 'poezio = poezio:main' ] },
58
       data_files = [('share/man/man1/', ['data/poezio.1'])],
59 60 61 62 63

       install_requires = ['sleekxmpp==1.2.4',
                           'dnspython3>=1.11.1'],
       extras_require = {'OTR plugin': 'python-potr>=1.0',
                         'Screen autoaway plugin': 'pyinotify==0.9.4'}
mathieui's avatar
mathieui committed
64
)
65 66 67 68 69

# Remove the link afterwards
if os.path.exists(os.path.join(current_dir, 'src', 'default_config.cfg')):
    os.unlink(os.path.join(current_dir, 'src', 'default_config.cfg'))