Skip to content

Commit

Permalink
Add my version of Doug Song's Python pcap library to the package for
Browse files Browse the repository at this point in the history
completeness.

Update all tests to look for the installed version of PCS, instead of
locally.  This can be undone by removing a single comment character.

Update the Makefile to correctly build PCS and the pcap.so no matter
what install or build target is selected.

Add Li-Wen Hsu and Tom McLaughlin as contributors.
  • Loading branch information
gvnn3 committed Mar 22, 2007
1 parent e59cecc commit 8cd54c9
Show file tree
Hide file tree
Showing 22 changed files with 939 additions and 36 deletions.
14 changes: 14 additions & 0 deletions .hgignore
@@ -0,0 +1,14 @@
# use glob syntax
syntax: glob

*.pyc
*.aux
*.log
*.ps
*.dvi
*.pdf
docs/Web/*
docs/latex/*
docs/man/*
make.out

4 changes: 4 additions & 0 deletions CONTRIBUTORS
@@ -1,3 +1,7 @@
John-Mark Gurney (jmg at freebsd.org)

Clément Lecigne (clemun at gmail.com)

Li-Wen Hsu (lwhsu at lwhsu.ckefgisc.org)

Tom McLaughlin (tmclaugh at sdf.lonestar.org)
1 change: 1 addition & 0 deletions INSTALL
Expand Up @@ -4,6 +4,7 @@ PCS follows the normal Python conventions for building and installing
and there is very little, if any, magic. To install the library and
the associated packet classes into your system do:

> python setup.py config <return>
> python setup.py install <return>

To test your installation do:
Expand Down
26 changes: 20 additions & 6 deletions Makefile
Expand Up @@ -5,11 +5,25 @@
# Author: George V. Neville-Neil
#
# Makefile for building distributions of PCS.
install::
python setup.py install

dist::
python setup.py sdist
PYTHON = python

all: pcap.c
$(PYTHON) setup.py config $(CONFIG_ARGS)
$(PYTHON) setup.py build

pcap.c: pcs/pcap/pcap.pyx
pyrexc pcs/pcap/pcap.pyx

install: all
$(PYTHON) setup.py install

dist:
$(PYTHON) setup.py sdist

clean:
$(PYTHON) setup.py clean
rm -rf build dist MANIFEST \
pcs/pcap/config.h \
pcs/pcap/config.pkl

clean::
rm -rf dist build MANIFEST
2 changes: 1 addition & 1 deletion pcs/__init__.py
Expand Up @@ -65,7 +65,7 @@
# We need the socket module for to implement some of the Connector classes.
from socket import *

import pcap
import pcs.pcap as pcap

import itertools

Expand Down
11 changes: 11 additions & 0 deletions pcs/pcap/LICENSE
@@ -0,0 +1,11 @@

Copyright (c) 2004 Dug Song <dugsong@monkey.org>
All rights reserved, all wrongs reversed.

Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:

1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
3. The names of the authors and copyright holders may not be used to endorse or promote products derived from this software without specific prior written permission.

THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

0 comments on commit 8cd54c9

Please sign in to comment.