toxygen/setup.py

52 lines
1.4 KiB
Python
Raw Normal View History

2016-07-05 20:43:51 +02:00
from setuptools import setup
from setuptools.command.install import install
from platform import system
2016-07-06 15:25:04 +02:00
from subprocess import call
from toxygen.util import program_version
2016-07-05 20:43:51 +02:00
2016-07-06 15:25:04 +02:00
version = program_version + '.0'
2016-07-11 16:24:39 +02:00
MODULES = ['PyAudio']
2016-07-06 15:25:04 +02:00
if system() == 'Windows':
MODULES.append('PySide')
class InstallScript(install):
2016-07-11 16:24:39 +02:00
"""This class configures Toxygen after installation"""
2016-07-06 15:25:04 +02:00
2016-07-05 20:43:51 +02:00
def run(self):
install.run(self)
2016-07-06 15:25:04 +02:00
OS = system()
if OS == 'Windows':
call(["toxygen", "--configure"])
elif OS == 'Linux':
call(["toxygen", "--clean"])
2016-07-05 20:43:51 +02:00
setup(name='Toxygen',
2016-07-06 15:25:04 +02:00
version=version,
2016-07-05 20:43:51 +02:00
description='Toxygen - Tox client',
long_description='Toxygen is powerful Tox client written in Python3',
url='https://github.com/xveduk/toxygen/',
2016-07-11 16:24:39 +02:00
keywords='toxygen tox messenger',
2016-07-05 20:43:51 +02:00
author='Ingvar',
2016-07-11 16:24:39 +02:00
maintainer='Ingvar',
2016-07-05 20:43:51 +02:00
license='GPL3',
2016-07-06 15:25:04 +02:00
packages=['toxygen', 'toxygen.plugins', 'toxygen.styles'],
install_requires=MODULES,
2016-07-05 20:43:51 +02:00
include_package_data=True,
classifiers=[
'Programming Language :: Python :: 3 :: Only',
2016-07-06 15:25:04 +02:00
'Programming Language :: Python :: 3.2',
2016-07-05 20:43:51 +02:00
'Programming Language :: Python :: 3.3',
'Programming Language :: Python :: 3.4',
],
entry_points={
2016-07-06 15:25:04 +02:00
'console_scripts': ['toxygen=toxygen.main:main'],
2016-07-05 20:43:51 +02:00
},
cmdclass={
2016-07-06 15:25:04 +02:00
'install': InstallScript,
2016-07-05 20:43:51 +02:00
},
)