-PYINCLUDE:=$(shell python2.5-config --includes)
-PYLIB:=$(shell python2.5-config --lib)
OS:=$(shell uname | sed 's/[-_].*//')
MACHINE:=$(shell uname -m)
CFLAGS=-Wall -g -O2 -Werror $(PYINCLUDE) -g
randomgen$(EXT): randomgen.o
$(CC) $(CFLAGS) -o $@ $<
-chashsplit$(SOEXT): chashsplitmodule.o
- $(CC) $(CFLAGS) $(LDFLAGS) $(SHARED) -o $@ $< $(PYLIB)
+chashsplit$(SOEXT): chashsplitmodule.c csetup.py
+ @rm -f $@
+ python csetup.py build
+ cp build/*/chashsplit.so .
runtests: all runtests-python runtests-cmdline
clean:
rm -f *.o *.so *.dll *.exe *~ .*~ *.pyc */*.pyc */*~ \
- bup bup-* randomgen \
+ bup bup-* randomgen memtest \
out[12] out2[tc] tags[12] tags2[tc]
- rm -rf *.tmp
+ rm -rf *.tmp build
--- /dev/null
+from distutils.core import setup, Extension
+
+chashsplit_mod = Extension('chashsplit', sources=['chashsplitmodule.c'])
+
+setup(name='chashsplit',
+ version='0.1',
+ description='hashsplit helper library for bup',
+ ext_modules=[chashsplit_mod])