All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
pySafePython.h
Go to the documentation of this file.
1//
2// Copyright 2020 Pixar
3//
4// Licensed under the terms set forth in the LICENSE.txt file available at
5// https://openusd.org/license.
6//
7#ifndef PXR_BASE_TF_PY_SAFE_PYTHON_H
8#define PXR_BASE_TF_PY_SAFE_PYTHON_H
9
11
16
17// This include is a hack to avoid build errors due to incompatible
18// macro definitions in pyport.h on MacOS for older versions of Python.
19// See: https://bugs.python.org/issue10910
20#include <locale>
21
22// Python 3 has a conflict with the slots macro defined by the Qt library,
23// so we're undef'ing here temporarily before including Python.
24ARCH_PRAGMA_PUSH_MACRO(slots)
25#undef slots
26
27#include "pxr/external/boost/python/detail/wrap_python.hpp"
28
29ARCH_PRAGMA_POP_MACRO(slots)
30
31#endif // PXR_BASE_TF_PY_SAFE_PYTHON_H
Pragmas for controlling compiler-specific behaviors.