From 9825332b3e7744b81d3ef04242bf264ba813fe40 Mon Sep 17 00:00:00 2001 From: Matt Thompson Date: Thu, 27 Jun 2013 17:23:57 -0500 Subject: [PATCH 1/2] Convert to setuptools, add dummy test --- README => README.md | 16 ++++++++++------ inotify/tests/__init__.py | 0 inotify/tests/test_directories.py | 6 ++++++ setup.py | 15 +++++++++------ 4 files changed, 25 insertions(+), 12 deletions(-) rename README => README.md (88%) create mode 100644 inotify/tests/__init__.py create mode 100644 inotify/tests/test_directories.py mode change 100755 => 100644 setup.py diff --git a/README b/README.md similarity index 88% rename from README rename to README.md index d7c1d54..fc1091b 100644 --- a/README +++ b/README.md @@ -1,5 +1,11 @@ -About python-inotify --------------------- +# python-inotify + +## Origins + +This is a fork of Bryan O'Sullivan's python-inotify library. It has been +converted to setuptools and will have a test suite soon. + +## About This is python-inotify, a Python interface to the Linux 2.6 kernel's inotify subsystem. The inotify subsystem provides an efficient way to @@ -19,8 +25,7 @@ want to read queued events yet. -This package is *not* pyinotify -------------------------------- +## This package is *not* pyinotify To confuse matters a little, there's another Python inotify interface available, called pyinotify. I wrote python-inotify as a reaction to @@ -33,8 +38,7 @@ You can find pyinotify at http://pyinotify.sourceforge.net/ -Notice of copyright and license -------------------------------- +## Notice of copyright and license This library is free software; you can redistribute it and/or modify it under the terms of version 2.1 of the GNU Lesser General Public diff --git a/inotify/tests/__init__.py b/inotify/tests/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/inotify/tests/test_directories.py b/inotify/tests/test_directories.py new file mode 100644 index 0000000..2259272 --- /dev/null +++ b/inotify/tests/test_directories.py @@ -0,0 +1,6 @@ +import unittest + +class TestDirectories(unittest.TestCase): + def testSomething(self): + pass + diff --git a/setup.py b/setup.py old mode 100755 new mode 100644 index 38ce55a..e885f13 --- a/setup.py +++ b/setup.py @@ -1,15 +1,15 @@ #!/usr/bin/env python -import distutils.core -import distutils.util +import setuptools +import sysconfig -platform = distutils.util.get_platform() +platform = sysconfig.get_platform() if not platform.startswith('linux'): raise Exception('inotify is linux-specific, and does not work on %s' % platform) -distutils.core.setup( +setuptools.setup( name='python-inotify', version='0.5', description='Interface to Linux inotify subsystem', @@ -19,6 +19,9 @@ platforms='Linux', packages=['inotify'], url='http://www.serpentine.com/', - ext_modules=[distutils.core.Extension('inotify._inotify', - ['inotify/_inotify.c'])], + ext_modules=[setuptools.extension.Extension('inotify._inotify', + ['inotify/_inotify.c'])], + setup_requires=['nose>=1.3.0'], + tests_require=['mock>=1.0.1'], + test_suite='nose.collector', ) From 1b435366ee4ba39a6b730f3e297a7c37260c9cd5 Mon Sep 17 00:00:00 2001 From: Matt Thompson Date: Thu, 27 Jun 2013 17:26:03 -0500 Subject: [PATCH 2/2] Adding git ignore --- .gitignore | 39 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) create mode 100644 .gitignore diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..fdd7e34 --- /dev/null +++ b/.gitignore @@ -0,0 +1,39 @@ +*.py[cod] + +# C extensions +*.so + +# Packages +*.egg +*.egg-info +dist +build +eggs +parts +bin +var +sdist +develop-eggs +.installed.cfg +lib +lib64 +__pycache__ + +# Installer logs +pip-log.txt + +# Unit test / coverage reports +.coverage +.tox +nosetests.xml + +# Translations +*.mo + +# Mr Developer +.mr.developer.cfg +.project +.pydevproject + +# Virtualenv +.venv