HDK
Main Page
Related Pages
Modules
Namespaces
Classes
Files
Examples
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Groups
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
10
#include "
pxr/base/arch/pragmas.h
"
11
12
/// \file tf/pySafePython.h
13
/// Intended to replace a direct include of Python.h, which causes several
14
/// build problems with certain configurations and platforms (e.g., debug
15
/// builds on Windows, Qt slots keyword, etc.)
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.
24
ARCH_PRAGMA_PUSH_MACRO
(slots)
25
#undef slots
26
27
#include "pxr/external/boost/python/detail/wrap_python.hpp"
28
29
ARCH_PRAGMA_POP_MACRO
(slots)
30
31
#endif // PXR_BASE_TF_PY_SAFE_PYTHON_H
pragmas.h
ARCH_PRAGMA_POP_MACRO
#define ARCH_PRAGMA_POP_MACRO
Definition:
pragmas.h:171
ARCH_PRAGMA_PUSH_MACRO
#define ARCH_PRAGMA_PUSH_MACRO
Definition:
pragmas.h:167
pxr
base
tf
pySafePython.h
Generated on Wed Aug 27 2025 03:07:50 for HDK by
1.8.6