Skip to content

Commit

Permalink
Changes to package structure, fixed links, fixed docs so they should …
Browse files Browse the repository at this point in the history
…render on readthedocs.
  • Loading branch information
chrisjbillington committed Jan 11, 2016
1 parent f4d37e6 commit 71edf36
Show file tree
Hide file tree
Showing 9 changed files with 50 additions and 9 deletions.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
build/*
doc/build/*
dist/*
*.pyc
/MANIFEST
27 changes: 27 additions & 0 deletions README
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
inotify_init() is wrapped as a class that does little more than hold the
resulting inotify file descriptor. A read() method is provided which reads
available data from the file descriptor and returns events as namedtuples
after unpacking them with the struct module. inotify_add_watch() and
inotify_rm_watch() are wrapped with no changes at all, taking and returning
watch descriptor integers that calling code is expected to keep track of
itself, just as one would use inotify from C. Works with Python 2 or 3.

Fork me on github: https://github.com/chrisjbillington/inotify_simple
Read the docs: http://inotify_simple.readthedocs.org

Installation:

to install `inotify_simple`, run:

$ pip install inotify_simple

or to install from source:

$ python setup.py install

inotify_simple is a small amount of code and unlikely to change much in the
future until inotify itself or Python changes, so you can also just copy and
paste it into your project to avoid the extra dependency with pretty low risk.


See full documentation at http://inotify_simple.readthedocs.org
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# inotify_simple 1.0

`inotify_simple` is a simple wrapper around
`inotify_simple` is a simple Python wrapper around
[inotify](http://man7.org/linux/man-pages/man7/inotify.7.html).
No fancy bells and whistles, just a literal wrapper with ctypes. Only 95
lines of code!
Expand All @@ -14,7 +14,7 @@ watch descriptor integers that calling code is expected to keep track of
itself, just as one would use inotify from C. Works with Python 2 or 3.

[View on PyPI](http://pypi.python.org/pypi/inotify_simple) |
[Fork me on github](http://github.org/cbillington/inotify_simple) |
[Fork me on github](https://github.com/chrisjbillington/inotify_simple) |
[Read the docs](http://inotify_simple.readthedocs.org)


Expand Down
1 change: 1 addition & 0 deletions doc/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
build/*
6 changes: 3 additions & 3 deletions doc/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ inotify_simple |release|
:maxdepth: 2


``inotify_simple`` is a simple wrapper around
``inotify_simple`` is a simple Python wrapper around
`inotify <http://man7.org/linux/man-pages/man7/inotify.7.html>`_.
No fancy bells and whistles, just a literal wrapper with ctypes. Only 95
lines of code!
Expand All @@ -24,7 +24,7 @@ expected to keep track of itself, just as one would use inotify from C. Works
with Python 2 or 3.

`View on PyPI <http://pypi.python.org/pypi/inotify_simple>`_
| `Fork me on GitHub <http://github.org/cbillington/inotify_simple>`_
| `Fork me on GitHub <https://github.com/chrisjbillington/inotify_simple>`_
| `Read the docs <http://inotify_simple.readthedocs.org>`_
*************
Expand Down Expand Up @@ -122,7 +122,7 @@ Example usage
Event(wd=1, mask=32768, cookie=0, name=u'')
flags.IGNORED
Note that the flags, since they are defined with an `enum.IntEnum`, print as
Note that the flags, since they are defined with an ``enum.IntEnum``, print as
what they are called rather than their integer values. However they are still
just integers and so can be ANDed and ORed etc with masks etc. The
``flags.from_mask()`` method ANDs a mask with all possible flags and returns a
Expand Down
1 change: 1 addition & 0 deletions inotify_simple/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
/__version__.py
6 changes: 6 additions & 0 deletions inotify_simple/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
from __future__ import absolute_import
from .inotify_simple import *
try:
from __version__ import __version__
except ImportError:
__version__ = None
File renamed without changes.
11 changes: 8 additions & 3 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,21 +5,26 @@
# If the package is not registered with PyPI yet, do so with:
# python setup.py register

import os
from distutils.core import setup

__version__ = '1.0.0'
__version__ = '1.0.1'

DESCRIPTION = \
"""A simple wrapper around inotify. No fancy bells and whistles, just a
literal wrapper with ctypes. Only 95 lines of code!
"""

# Auto generate a __version__ package for the package to import
with open(os.path.join('inotify_simple', '__version__.py'), 'w') as f:
f.write("__version__ = '%s'\n" % __version__)

setup(name='inotify_simple',
version=__version__,
description=DESCRIPTION,
author='Chris Billington',
author_email='[email protected]',
url='https://github.org/cbillington/inotify_simple',
url='https://github.com/chrisjbillington/inotify_simple',
license="BSD",
py_modules=["inotify_simple"]
packages=["inotify_simple"]
)

0 comments on commit 71edf36

Please sign in to comment.