From c646b68c61fecee29205d91038b4ddcae2e6594b Mon Sep 17 00:00:00 2001 From: =?utf8?q?Fran=C3=A7ois=20Pinard?= Date: Sun, 1 Dec 2013 20:31:33 -0500 Subject: [PATCH] tests/Makefile.am, tests/setup.py.in: Build in place. --- tests/Makefile.am | 4 +++- tests/setup.py.in | 14 -------------- 2 files changed, 3 insertions(+), 15 deletions(-) diff --git a/tests/Makefile.am b/tests/Makefile.am index 1389e4f..3aa5b3d 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -37,7 +37,9 @@ check-local: Recode.so $(PYTHON) $(srcdir)/pytest $(LIMIT) $(srcdir)/t*.py Recode.so: Recode.c setup.py - $(PYTHON) setup.py build + rm -f *.so + $(PYTHON) setup.py build_ext --inplace + rm -fr build Recode.c: Recode.pyx cd $(srcdir) && cython Recode.pyx diff --git a/tests/setup.py.in b/tests/setup.py.in index a844d2a..7c3d7ad 100644 --- a/tests/setup.py.in +++ b/tests/setup.py.in @@ -26,17 +26,3 @@ finally: if srcdir != '.': if os.path.exists('Recode.c'): os.remove('Recode.c') - -def extract_and_clean(directory): - for base in os.listdir(directory): - name = os.path.join(directory, base) - if base == 'Recode.so': - buffer = file(name, 'rb').read() - file('Recode.so', 'wb').write(buffer) - if os.path.isdir(name): - extract_and_clean(name) - else: - os.remove(name) - os.rmdir(directory) - -extract_and_clean(build) -- 2.40.0