summaryrefslogtreecommitdiff
path: root/setup.py
diff options
context:
space:
mode:
authorSebastien Martini <seb@dbzteam.org>2009-12-26 15:48:44 +0100
committerSebastien Martini <seb@dbzteam.org>2009-12-26 15:48:44 +0100
commit68596454008d6bf26f960bdc930ff5044214058a (patch)
tree3595b54ceb63005a9e341af842513b248a42b1af /setup.py
parentff3cbf1b405fcf3d8559c82821b1dc4ca1225c1d (diff)
downloadpyinotify-68596454008d6bf26f960bdc930ff5044214058a.tar.gz
Unified setup.py install for python2 and python3.
Diffstat (limited to 'setup.py')
-rwxr-xr-xsetup.py54
1 files changed, 54 insertions, 0 deletions
diff --git a/setup.py b/setup.py
new file mode 100755
index 0000000..6c9e325
--- /dev/null
+++ b/setup.py
@@ -0,0 +1,54 @@
+#!/usr/bin/env python
+
+# check Python's version
+import sys
+if sys.version < '2.4':
+ sys.stderr.write('This module requires at least Python 2.4\n')
+ sys.exit(1)
+
+# import statements
+from distutils.core import setup, Extension
+from distutils.util import get_platform
+
+# debug
+DISTUTILS_DEBUG = True
+
+# get platform
+platform = get_platform()
+
+# check linux platform
+if not platform.startswith('linux'):
+ sys.stderr.write("inotify is not available under %s\n" % platform)
+ sys.exit(1)
+
+classif = [
+ 'Environment :: Console',
+ 'Intended Audience :: Developers',
+ 'License :: OSI Approved :: GNU General Public License (GPL)',
+ 'Natural Language :: English',
+ 'Operating System :: POSIX :: Linux',
+ 'Programming Language :: Python',
+ 'Topic :: Software Development :: Libraries',
+ 'Topic :: System :: Monitoring'
+ ]
+
+if sys.version_info[0] >= 3:
+ package_dir = {'': 'python3'}
+else:
+ package_dir = {'': 'python2'}
+
+setup(
+ name='pyinotify',
+ version='0.8.8',
+ description='Linux filesystem events monitoring',
+ author='Sebastien Martini',
+ author_email='sebastien.martini@gmail.com',
+ license='GPLv2+',
+ platforms='Linux',
+ classifiers=classif,
+ url='http://trac.dbzteam.org/pyinotify',
+ download_url='http://seb.dbzteam.org/pub/pyinotify/releases/pyinotify-0.8.8.tar.gz',
+ py_modules=['pyinotify'],
+ package_dir=package_dir,
+ packages=[''],
+ )