diff options
author | Alexander Sulfrian <alexander@sulfrian.net> | 2014-04-21 16:14:27 +0200 |
---|---|---|
committer | Alexander Sulfrian <alexander@sulfrian.net> | 2014-04-21 16:14:27 +0200 |
commit | 87acb87dffa227329512079334fc2657197792a2 (patch) | |
tree | 7b8593238c7c1c47f5eb91d99bcbeb7439748f44 | |
parent | 09221cfefe6f7c1d4fff320b6bcee56a23deb54d (diff) | |
download | m2crypto_ext-87acb87dffa227329512079334fc2657197792a2.tar.gz m2crypto_ext-87acb87dffa227329512079334fc2657197792a2.tar.bz2 m2crypto_ext-87acb87dffa227329512079334fc2657197792a2.zip |
use distutils
-rw-r--r-- | .gitignore | 7 | ||||
-rw-r--r-- | Makefile | 20 | ||||
-rwxr-xr-x | setup.py | 18 |
3 files changed, 20 insertions, 25 deletions
@@ -1,5 +1,2 @@ -*.c -*.o -*.so -*.py -*.pyc +M2Crypto_ext_wrap.c +M2Crypto_ext.py diff --git a/Makefile b/Makefile deleted file mode 100644 index b682e4d..0000000 --- a/Makefile +++ /dev/null @@ -1,20 +0,0 @@ -PYTHON_INCLUDES=$(shell python-config --includes) - -all: M2Crypto_ext - -clean: - $(RM) _M2Crypto_ext.so M2Crypto_ext.py* M2Crypto_ext_wrap.c M2Crypto_ext_wrap.o - -M2Crypto_ext: _M2Crypto_ext.so M2Crypto_ext.py - -M2Crypto_ext.py: M2Crypto_ext.i - swig -python -I/usr/include $< - -M2Crypto_ext_wrap.c: M2Crypto_ext.i - swig -python -I/usr/include $< - -M2Crypto_ext_wrap.o: M2Crypto_ext_wrap.c - gcc -O2 -fPIC -o $@ -c $< $(PYTHON_INCLUDES) - -_M2Crypto_ext.so: M2Crypto_ext_wrap.o - gcc -shared -o $@ $< diff --git a/setup.py b/setup.py new file mode 100755 index 0000000..fcb2823 --- /dev/null +++ b/setup.py @@ -0,0 +1,18 @@ +#!/usr/bin/env python +from distutils.core import setup, Extension + +m2crypto_ext_module = Extension( + '_M2Crypto_ext', + sources=['M2Crypto_ext.i'], + swig_opts=['-I/usr/include'], + libraries=['ssl'] +) + +setup( + name = 'M2Crypto_ext', + version = '0.1.0', + author = "Alexander Sulfrian", + description = """Simple swig example from docs""", + ext_modules = [m2crypto_ext_module], + py_modules = ["M2Crypto_ext"], +) |