[issue2385] run_setup can fail if the setup script uses __file__

Tarek Ziadé report at bugs.python.org
Tue Mar 18 11:24:34 CET 2008

New submission from Tarek Ziadé <ziade.tarek at gmail.com>:

When calling run_setup, the execfile does not set the __file__ global
variable, that is often used in setup.py modules (for instance to load a
text file from the package to be used in the long_description)

This patch adds this global variable so it does not fail. 

No test provided (distutils would need a test_core.py). 

I could work on some tests, but the previous test_* files I have added
are not in yet, so i'd rather wait for that before proposing new tests

components: Distutils
files: distutils.core.patch
keywords: patch
messages: 63906
nosy: tarek
severity: normal
status: open
title: run_setup can fail if the setup script uses __file__
type: crash
versions: Python 2.6
Added file: http://bugs.python.org/file9724/distutils.core.patch

Tracker <report at bugs.python.org>

More information about the Python-bugs-list mailing list