summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorAnthony Ramine <123095+nox@users.noreply.github.com>2019-09-30 05:05:28 +0200
committerGiampaolo Rodola <g.rodola@gmail.com>2019-09-30 11:05:28 +0800
commitff1bc8cdb2e585f717d121ef61dc7f0931a64dd8 (patch)
tree2e91f4958b38868dec67008f21b37c268dec67e4 /Makefile
parent2963b5f264b451a67dd26e19d38ab890a5bafa41 (diff)
downloadpsutil-ff1bc8cdb2e585f717d121ef61dc7f0931a64dd8.tar.gz
Don't pollute tree with temporary configure test files (#1597)
The docs for CCompiler.compile say: > If output_dir is given, object files will be put under it, while retaining their > original path component. That is, foo/bar.c normally compiles to foo/bar.o (for a > Unix implementation); if output_dir is build, then it would compile to build/foo/bar.o. What they forget to say is that path components are also retained if output_dir is not specified, it just means it will do so in the current directory. So if you compile a temporary C file /tmp/foo.c, it will produce a ./tmp/foo.o file relative to the current directory. This commit fixes that issue by passing an explicit output_dir itself located in a temporary directory.
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile5
1 files changed, 1 insertions, 4 deletions
diff --git a/Makefile b/Makefile
index e3f17f22..71f93001 100644
--- a/Makefile
+++ b/Makefile
@@ -55,8 +55,7 @@ clean: ## Remove all build files.
build/ \
dist/ \
docs/_build/ \
- htmlcov/ \
- tmp/
+ htmlcov/
_:
@@ -68,13 +67,11 @@ build: _ ## Compile without installing.
@# "import psutil" when using the interactive interpreter from within
@# this directory.
PYTHONWARNINGS=all $(PYTHON) setup.py build_ext -i
- rm -rf tmp
$(PYTHON) -c "import psutil" # make sure it actually worked
install: ## Install this package as current user in "edit" mode.
${MAKE} build
PYTHONWARNINGS=all $(PYTHON) setup.py develop $(INSTALL_OPTS)
- rm -rf tmp
uninstall: ## Uninstall this package via pip.
cd ..; $(PYTHON) -m pip uninstall -y -v psutil || true