diff options
| author | Anthony Ramine <123095+nox@users.noreply.github.com> | 2019-09-30 05:05:28 +0200 |
|---|---|---|
| committer | Giampaolo Rodola <g.rodola@gmail.com> | 2019-09-30 11:05:28 +0800 |
| commit | ff1bc8cdb2e585f717d121ef61dc7f0931a64dd8 (patch) | |
| tree | 2e91f4958b38868dec67008f21b37c268dec67e4 /Makefile | |
| parent | 2963b5f264b451a67dd26e19d38ab890a5bafa41 (diff) | |
| download | psutil-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-- | Makefile | 5 |
1 files changed, 1 insertions, 4 deletions
@@ -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 |
