diff options
| author | hauntsaninja <hauntsaninja@gmail.com> | 2023-01-24 21:24:59 -0800 |
|---|---|---|
| committer | hauntsaninja <hauntsaninja@gmail.com> | 2023-01-24 22:06:51 -0800 |
| commit | 7ced705dcc84cd0bd8968ea2008f96303a87f93d (patch) | |
| tree | 20b162e5325770dc31a2d365f7708952ed506ed9 | |
| parent | 6510d128c4068fbd6dc31f84ac3548d0bdbed027 (diff) | |
| download | python-setuptools-git-7ced705dcc84cd0bd8968ea2008f96303a87f93d.tar.gz | |
Make __file__ an absolute path in setuptools.build_meta
This is a difference between pip's legacy wheel build (or direct
invocations of setup.py) and the PEP 517 build.
While setup.py scripts that rely on this are fragile, it was quite
painful to debug! Since Python 3.4, `__file__` is usually an absolute
path, so this change might result in fewer surprises.
| -rw-r--r-- | setuptools/build_meta.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/setuptools/build_meta.py b/setuptools/build_meta.py index 1fb4c3b1..618a5e8f 100644 --- a/setuptools/build_meta.py +++ b/setuptools/build_meta.py @@ -326,7 +326,7 @@ class _BuildMetaBackend(_ConfigSettingsTranslator): def run_setup(self, setup_script='setup.py'): # Note that we can reuse our build directory between calls # Correctness comes first, then optimization later - __file__ = setup_script + __file__ = os.path.abspath(setup_script) __name__ = '__main__' with _open_setup_script(__file__) as f: |
