Skip to content

Commit 37ec2cf

Browse files
committed
bindings: switch to python's setuptools
1 parent 65319a0 commit 37ec2cf

File tree

3 files changed

+11
-9
lines changed

3 files changed

+11
-9
lines changed

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -219,6 +219,9 @@ src/example
219219
src/cvc-print
220220
src/cvcprint
221221
bindings/python/cvc_rehash
222+
bindings/python/*.i
223+
bindings/python/OpenPACE.egg-info
224+
bindings/python/dist
222225
eac_wrap.c
223226
SWIGTYPE_p_*
224227
eac.go

bindings/python/Makefile.am

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,8 @@ INTERFACES = $(srcdir)/../ca.i \
66
$(srcdir)/../objects.i \
77
$(srcdir)/../util.i
88

9-
BUILT_SOURCES = eac_wrap.c eac.py
10-
119
EXTRA_DIST = setup.py.in cvc_rehash.in test.py chat.py example.py
12-
CLEANFILES = installed_files.txt setup.py $(BUILT_SOURCES)
10+
CLEANFILES = setup.py
1311
bin_SCRIPTS = cvc_rehash
1412

1513
do_subst=$(SED)\
@@ -41,7 +39,8 @@ setup.py: setup.py.in $(top_builddir)/src/libeac.la
4139
cvc_rehash: cvc_rehash.in
4240
@$(do_subst) < $(srcdir)/cvc_rehash.in > cvc_rehash
4341

44-
$(BUILT_SOURCES): $(INTERFACES) setup.py
42+
eac.py: $(INTERFACES) setup.py
43+
for f in $(INTERFACES); do cp $$f .; done
4544
env CC="$(CC)" $(PYTHON) setup.py build_ext --swig=$(SWIG)
4645

4746
# Androids implementation does not honour --root=$(DESTDIR) so we change the prefix
@@ -52,8 +51,10 @@ uninstall-local:
5251
cat installed_files.txt | xargs rm -rf
5352

5453
clean-local:
55-
rm -rf build
54+
rm -rf build eac_wrap.c eac.py
5655
rm -f *.pyc setup.inc
56+
rm -f *.i
57+
rm -rf OpenPACE.egg-info dist installed_files.txt
5758

5859
distclean-local:
5960
rm -f cvc_rehash setup

bindings/python/setup.py.in

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
"""
44
setup.py file for OpenPACE wrapper
55
"""
6-
from distutils.core import setup, Extension
6+
from setuptools import setup, Extension
77
import shlex
88

99
#The following variables are set by autotools at build-time
@@ -21,10 +21,8 @@ all_cflags = shlex.split(CPPFLAGS + ' ' + CFLAGS + ' ' + OPENPACE_CFLAGS + ' ' +
2121
#Prepare the external module that we want to build
2222
eac_module = Extension('_eac',
2323
sources=['eac.i'],
24-
swig_opts=['-modern', '-outdir', '@builddir@', '-I@srcdir@/..'],
2524
extra_compile_args=all_cflags,
26-
extra_link_args=all_libs,
27-
)
25+
extra_link_args=all_libs)
2826

2927
#Setup Distutils
3028
setup (name = '@PACKAGE_NAME@',

0 commit comments

Comments
 (0)