2014-03-20 23:54:46 +00:00
|
|
|
#!/usr/bin/env python3
|
2014-10-27 18:16:32 +00:00
|
|
|
|
2014-03-22 12:33:21 +00:00
|
|
|
try:
|
|
|
|
from setuptools import setup, Extension
|
|
|
|
except ImportError:
|
2014-10-27 18:16:32 +00:00
|
|
|
print('Setuptools was not found.\n'
|
|
|
|
'This script will use distutils instead, which will NOT'
|
|
|
|
' be able to install a `poezio` executable.\nIf you are '
|
|
|
|
'using it to build a package or install poezio, please '
|
|
|
|
'install setuptools.\n\nYou will also see a few warnings.\n')
|
2014-03-22 12:33:21 +00:00
|
|
|
from distutils.core import setup, Extension
|
|
|
|
|
2014-04-03 22:24:16 +00:00
|
|
|
import os
|
2011-09-09 16:46:42 +00:00
|
|
|
|
2013-05-26 18:07:12 +00:00
|
|
|
module_poopt = Extension('poezio.poopt',
|
2014-03-20 18:35:56 +00:00
|
|
|
extra_compile_args=['-Wno-declaration-after-statement'],
|
2013-05-26 18:07:12 +00:00
|
|
|
sources = ['src/pooptmodule.c'])
|
2011-09-09 16:46:42 +00:00
|
|
|
|
2013-05-29 13:32:25 +00:00
|
|
|
|
|
|
|
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'))
|
|
|
|
|
2015-01-20 23:29:08 +00:00
|
|
|
# identify the git version
|
|
|
|
git_dir = os.path.join(current_dir, '.git')
|
|
|
|
if os.path.exists(git_dir):
|
|
|
|
try:
|
|
|
|
import subprocess
|
2015-01-21 13:18:19 +00:00
|
|
|
result = subprocess.Popen(['git', '--git-dir', git_dir, 'describe'],
|
2015-01-20 23:29:08 +00:00
|
|
|
stdout=subprocess.PIPE)
|
2015-01-21 13:18:19 +00:00
|
|
|
stderr=subprocess.DEVNULL)
|
2015-01-20 23:29:08 +00:00
|
|
|
result.wait()
|
|
|
|
data = result.stdout.read().decode('utf-8', errors='ignore')
|
|
|
|
version = '.dev' + data.split('-')[1]
|
|
|
|
except:
|
|
|
|
version = '.dev1'
|
|
|
|
else:
|
|
|
|
version = '.dev1'
|
|
|
|
|
2013-05-26 18:07:12 +00:00
|
|
|
setup(name="poezio",
|
2015-01-20 23:29:08 +00:00
|
|
|
version="0.9" + version,
|
2013-05-26 18:07:12 +00:00
|
|
|
description="A console XMPP client",
|
|
|
|
long_description=
|
2014-03-20 23:54:46 +00:00
|
|
|
"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"
|
2015-01-20 23:29:08 +00:00
|
|
|
"Documentation is available at http://doc.poez.io/.",
|
2014-03-20 23:54:46 +00:00
|
|
|
|
2011-09-09 16:46:42 +00:00
|
|
|
ext_modules = [module_poopt],
|
2014-03-20 23:54:46 +00:00
|
|
|
url = 'http://poez.io/',
|
2013-05-26 18:07:12 +00:00
|
|
|
license = 'zlib',
|
2014-03-20 23:54:46 +00:00
|
|
|
download_url = 'https://dev.louiz.org/projects/poezio/files',
|
2013-05-26 18:07:12 +00:00
|
|
|
|
2011-09-09 16:46:42 +00:00
|
|
|
author = 'Florent Le Coz',
|
|
|
|
author_email = 'louiz@louiz.org',
|
2013-05-26 18:07:12 +00:00
|
|
|
|
|
|
|
maintainer = 'Mathieu Pasquet',
|
|
|
|
maintainer_email = 'mathieui@mathieui.net',
|
|
|
|
|
2014-02-22 13:27:31 +00:00
|
|
|
classifiers = ['Development Status :: 2 - Pre-Alpha',
|
2014-03-20 23:54:46 +00:00
|
|
|
'Topic :: Communications :: Chat',
|
2013-05-26 18:07:12 +00:00
|
|
|
'Environment :: Console :: Curses',
|
|
|
|
'Intended Audience :: End Users/Desktop',
|
|
|
|
'License :: OSI Approved :: zlib/libpng License',
|
|
|
|
'Natural Language :: English',
|
|
|
|
'Operating System :: Unix',
|
2014-03-20 23:54:46 +00:00
|
|
|
'Programming Language :: Python :: 3'
|
2013-05-26 18:07:12 +00:00
|
|
|
],
|
2013-05-29 13:32:25 +00:00
|
|
|
keywords = ['jabber', 'xmpp', 'client', 'chat', 'im', 'console'],
|
2014-05-05 21:30:56 +00:00
|
|
|
packages = ['poezio', 'poezio.core', 'poezio.tabs', 'poezio.windows',
|
|
|
|
'poezio_plugins', 'poezio_plugins.gpg', 'poezio_themes'],
|
2013-08-09 22:24:27 +00:00
|
|
|
package_dir = {'poezio': 'src', 'poezio_plugins': 'plugins', 'poezio_themes': 'data/themes'},
|
2013-05-29 13:32:25 +00:00
|
|
|
package_data = {'poezio': ['default_config.cfg']},
|
2014-10-27 17:39:32 +00:00
|
|
|
scripts = ['scripts/poezio_gpg_export'],
|
|
|
|
entry_points={ 'console_scripts': [ 'poezio = poezio:main' ] },
|
2014-03-08 11:47:40 +00:00
|
|
|
data_files = [('share/man/man1/', ['data/poezio.1'])],
|
2014-03-20 23:54:46 +00:00
|
|
|
|
2014-11-12 20:18:42 +00:00
|
|
|
install_requires = ['slixmpp',
|
|
|
|
'aiodns'],
|
2014-03-20 23:54:46 +00:00
|
|
|
extras_require = {'OTR plugin': 'python-potr>=1.0',
|
|
|
|
'Screen autoaway plugin': 'pyinotify==0.9.4'}
|
2013-05-26 18:07:12 +00:00
|
|
|
)
|
2013-05-29 13:32:25 +00:00
|
|
|
|
|
|
|
# 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'))
|
|
|
|
|