summaryrefslogtreecommitdiff
path: root/setup.py
blob: 46fb9b3af2205c636cd49f04e50d6ea1a3ff6f2b (plain)
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
#!/usr/bin/env python3

from distutils.core import setup, Extension
from distutils.command import install as distutils_install
from iotop.version import VERSION

_ioprio = Extension('iotop._ioprio', sources = ['iotop/_ioprio.c'])

# Dirty hack to make setup.py install the iotop script to sbin/ instead of bin/
# while still honoring the choice of installing into local/ or not.
if hasattr(distutils_install, 'INSTALL_SCHEMES'):
    for d in distutils_install.INSTALL_SCHEMES.values():
        if d.get('scripts', '').endswith('/bin'):
            d['scripts'] = d['scripts'][:-len('/bin')] + '/sbin'

setup(name='iotop',
      version=VERSION,
      description='Per process I/O bandwidth monitor',
      long_description='''Iotop is a Python program with a top like UI used to
show of behalf of which process is the I/O going on.''',
      author='Guillaume Chazarain',
      author_email='guichaz@gmail.com',
      url='http://guichaz.free.fr/iotop/',
      scripts=['sbin/iotop'],
      data_files=[('share/man/man8', ['iotop.8'])],
      packages=['iotop'],
      ext_modules = [_ioprio],
      license='GPL'
)