Skip to content

Commit

Permalink
Add setup.py and debianize.
Browse files Browse the repository at this point in the history
  • Loading branch information
bgreenlee committed Jul 5, 2011
1 parent b4368d5 commit 8a9a11b
Show file tree
Hide file tree
Showing 12 changed files with 91 additions and 4 deletions.
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,5 @@
*.pyc
*.egg-info
.coverage
build
dist
13 changes: 9 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@ pygtail

A python "port" of [logcheck's logtail2](http://logcheck.org).

Pygtail reads log file lines that have not been read. It will even handle log files that have been rotated.
Pygtail reads log file lines that have not been read. It will even handle log
files that have been rotated.

Usage
-----
Expand All @@ -19,8 +20,9 @@ From the command line:
-o OFFSET_FILE, --offset-file=OFFSET_FILE
File to which offset data is written (default:
<logfile>.offset).
-p, --paranoid Update the offset file every time we read a line (as
opposed to only when we reach the end of the file).
-p, --paranoid Update the offset file every time we read a line
(as opposed to only when we reach the end of the
file).

In your code:

Expand All @@ -32,4 +34,7 @@ In your code:
Notes
-----

Pygtail does not handle rotated logs that have been compressed. You should configure your log rotation script so that the most recently rotated log is left uncompressed (`logrotated`, for example, has a `delaycompress` option that does just that).
Pygtail does not handle rotated logs that have been compressed. You should
configure your log rotation script so that the most recently rotated log is
left uncompressed (`logrotated`, for example, has a `delaycompress` option
that does just that).
11 changes: 11 additions & 0 deletions debian/changelog
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
pygtail (0.2) lucid; urgency=low

* Add setup.py and debianize.

-- Brad Greenlee <[email protected]> Wed, 05 Jul 2011 15:04:42 -0700

pygtail (0.1) lucid; urgency=low

* Initial release.

-- Brad Greenlee <[email protected]> Wed, 29 Jun 2011 22:33:12 -0700
1 change: 1 addition & 0 deletions debian/compat
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
7
13 changes: 13 additions & 0 deletions debian/control
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
Source: pygtail
Section: python
Priority: optional
Maintainer: Brad Greenlee <[email protected]>
Build-Depends: debhelper (>= 7)
Build-Depends-Indep: python-support, python-setuptools
Standards-Version: 3.8.3
Homepage: http://github.com/bgreenlee/pygtail

Package: pygtail
Architecture: all
Depends: ${misc:Depends}, ${python:Depends}
Description: Reads log file lines that have not been read.
3 changes: 3 additions & 0 deletions debian/copyright
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
Copyright: 2011 Brad Greenlee <[email protected]>
License: GPL v2
http://www.gnu.org/licenses/gpl-2.0.html
4 changes: 4 additions & 0 deletions debian/rules
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/usr/bin/make -f

%:
dh $@
2 changes: 2 additions & 0 deletions pygtail/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
from core import __version__
from core import Pygtail
2 changes: 2 additions & 0 deletions pygtail.py → pygtail/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,8 @@
import string
from optparse import OptionParser

__version__ = '0.2'

class Pygtail(object):
"""
Creates an iterable object that returns only unread lines.
Expand Down
Empty file added pygtail/test/__init__.py
Empty file.
File renamed without changes.
42 changes: 42 additions & 0 deletions setup.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
import os
from setuptools import setup

from pygtail import __version__

def main():
cwd = os.path.dirname(os.path.abspath(__file__))
path = os.path.join(cwd, 'README.md')
readme = open(path, 'rb').read()

setup(
name = 'pygtail',
version = __version__,
description = 'Reads log file lines that have not been read.',
license = 'GPL v2',
author = 'Brad Greenlee',
author_email = '[email protected]',
keywords = ['logging', 'tail', 'logtail2'],
url = 'http://github.com/bgreenlee/pygtail',
packages = ['pygtail'],
entry_points = {
'console_scripts': ['pygtail=pygtail.core:main']
},
classifiers = [
"Development Status :: 4 - Beta",
"Intended Audience :: Developers",
"License :: OSI Approved :: GNU General Public License (GPL)",
"Operating System :: MacOS :: MacOS X",
"Operating System :: POSIX :: Linux",
"Operating System :: Unix",
"Programming Language :: Python",
"Programming Language :: Python :: 2.6",
"Programming Language :: Python :: 2.7",
"Topic :: Software Development :: Libraries :: Python Modules",
"Topic :: System :: Logging"
],
long_description = readme
)


if __name__ == '__main__':
main()

0 comments on commit 8a9a11b

Please sign in to comment.