From d1e9232b8abe55f46e44a37162fa706ee95f0b07 Mon Sep 17 00:00:00 2001 From: Matt Fox Date: Thu, 12 May 2011 14:08:37 -0700 Subject: [PATCH] Various packaging updates and bugfixes --- .gitignore | 1 + MANIFEST | 4 +++- README.rst | 6 +++--- setup.py | 5 +++-- 4 files changed, 10 insertions(+), 6 deletions(-) diff --git a/.gitignore b/.gitignore index 325a3ce..3025308 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,4 @@ *.so build/ dist/ +MANIFEST diff --git a/MANIFEST b/MANIFEST index 948b17a..691734c 100644 --- a/MANIFEST +++ b/MANIFEST @@ -1,5 +1,7 @@ CHANGES.txt LICENSE.txt -README.txt +README.rst +netfilterqueue.c +netfilterqueue.pxd netfilterqueue.pyx setup.py diff --git a/README.rst b/README.rst index c485a22..b665b75 100644 --- a/README.rst +++ b/README.rst @@ -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. diff --git a/setup.py b/setup.py index f7116c6..f5b2a5d 100644 --- a/setup.py +++ b/setup.py @@ -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,