Various packaging updates and bugfixes

This commit is contained in:
Matt Fox 2011-05-12 14:08:37 -07:00
parent 38f62cd360
commit d1e9232b8a
4 changed files with 10 additions and 6 deletions

1
.gitignore vendored
View File

@ -1,3 +1,4 @@
*.so
build/
dist/
MANIFEST

View File

@ -1,5 +1,7 @@
CHANGES.txt
LICENSE.txt
README.txt
README.rst
netfilterqueue.c
netfilterqueue.pxd
netfilterqueue.pyx
setup.py

View File

@ -32,7 +32,7 @@ From PyPI
To install from PyPI by pip::
pip install netfilterqueue
pip install NetfilterQueue
From source
-----------
@ -40,8 +40,8 @@ From source
To install from source::
wget http://pypi.python.org/packages/source/N/NetfilterQueue/NetfilterQueue-0.1.tar.gz
tar -xvzf netfilterqueue-0.1.tar.gz
cd netfilterqueue-0.1
tar -xvzf NetfilterQueue-0.1.tar.gz
cd NetfilterQueue-0.1
python setup.py install
Setup will use Cython if it is installed, regenerating the .c source from the .pyx before compiling the .so.

View File

@ -5,6 +5,7 @@ VERSION = "0.1"
try:
# Use Cython
from Cython.Distutils import build_ext
cmd = {"build_ext": build_ext}
ext = Extension(
"netfilterqueue",
sources=["netfilterqueue.pyx",],
@ -12,7 +13,7 @@ try:
)
except ImportError:
# No Cython
build_ext = None
cmd = {}
ext = Extension(
"netfilterqueue",
sources = ["netfilterqueue.c"],
@ -20,7 +21,7 @@ except ImportError:
)
setup(
cmdclass = {"build_ext": build_ext},
cmdclass = cmd,
ext_modules = [ext],
name="NetfilterQueue",
version=VERSION,