Skip to content
Snippets Groups Projects
Commit 85c887a9 authored by Axel Huebl's avatar Axel Huebl Committed by Massimiliano Culpo
Browse files

Python Installs: No User Site Dir (#7065)

Avoid adding an "outside" (local home's) python user site directory
during python package installs.

Implements #6611

Fixes packages with auto-find side effects such as `py-setuptools`
that cause `py-matplotlib` to fail to build #6558
parent e0082e05
No related branches found
No related tags found
No related merge requests found
......@@ -75,7 +75,7 @@ class PythonPackage(PackageBase):
.. code-block:: console
$ python setup.py --no-user-cfg <phase>
$ python -s setup.py --no-user-cfg <phase>
Each phase also has a <phase_args> function that can pass arguments to
this call. All of these functions are empty except for the ``install_args``
......@@ -132,7 +132,7 @@ def setup_py(self, *args, **kwargs):
setup = self.setup_file()
with working_dir(self.build_directory):
self.python(setup, '--no-user-cfg', *args, **kwargs)
self.python('-s', setup, '--no-user-cfg', *args, **kwargs)
def _setup_command_available(self, command):
"""Determines whether or not a setup.py command exists.
......@@ -152,7 +152,7 @@ def _setup_command_available(self, command):
python = inspect.getmodule(self).python
setup = self.setup_file()
python(setup, '--no-user-cfg', command, '--help', **kwargs)
python('-s', setup, '--no-user-cfg', command, '--help', **kwargs)
return python.returncode == 0
# The following phases and their descriptions come from:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment