diff options
Diffstat (limited to 'setup.py')
-rw-r--r-- | setup.py | 25 |
1 files changed, 11 insertions, 14 deletions
@@ -129,6 +129,15 @@ import os import time from utils import memoize, has_option, get_python_dict OPTION_SNAPSHOT_BUILD = has_option("snapshot-build") + +# Change the cwd to setup.py's dir. +try: + this_file = __file__ +except NameError: + this_file = sys.argv[0] +this_file = os.path.abspath(this_file) +if os.path.dirname(this_file): + os.chdir(os.path.dirname(this_file)) script_dir = os.getcwd() @@ -354,20 +363,8 @@ if OPTION_ICULIB: if not OPTION_STANDALONE: print("--iculib-url option is a no-op option and will be removed soon.") -# Change the cwd to our source dir -try: - this_file = __file__ -except NameError: - this_file = sys.argv[0] -this_file = os.path.abspath(this_file) -if os.path.dirname(this_file): - os.chdir(os.path.dirname(this_file)) - -if OPTION_NOEXAMPLES: - # Remove pyside2-examples from submodules so they will not be included. - for idx, item in enumerate(submodules): - if item[0].startswith('pyside2-examples'): - del submodules[idx] +def is_debug_python(): + return getattr(sys, "gettotalrefcount", None) is not None # Return a prefix suitable for the _install/_build directory def prefix(): |