Skip to content

Commit

Permalink
Merge pull request #104 from uglide/allow_embedding_in_qt_app
Browse files Browse the repository at this point in the history
Use python.h wrapping to allow embedding as-is in any Qt-based project
  • Loading branch information
thp authored Jun 6, 2019
2 parents 395491f + 4c2bc52 commit ed279cb
Show file tree
Hide file tree
Showing 9 changed files with 14 additions and 8 deletions.
2 changes: 1 addition & 1 deletion src/ensure_gil_state.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
* PERFORMANCE OF THIS SOFTWARE.
**/

#include "Python.h"
#include "python_wrap.h"

class EnsureGILState {
public:
Expand Down
2 changes: 1 addition & 1 deletion src/pyglarea.h
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
#ifndef PYOTHERSIDE_PYGLAREA_H
#define PYOTHERSIDE_PYGLAREA_H

#include "Python.h"
#include "python_wrap.h"

#include <QString>
#include <QVariant>
Expand Down
2 changes: 1 addition & 1 deletion src/pyglrenderer.h
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
#ifndef PYOTHERSIDE_PYGLRENDERER_H
#define PYOTHERSIDE_PYGLRENDERER_H

#include "Python.h"
#include "python_wrap.h"

#include <QVariant>
#include <QString>
Expand Down
2 changes: 1 addition & 1 deletion src/pyobject_converter.h
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
#include "converter.h"
#include "pyqobject.h"

#include "Python.h"
#include "python_wrap.h"
#include "datetime.h"
#include <QDebug>

Expand Down
2 changes: 1 addition & 1 deletion src/pyobject_ref.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
#ifndef PYOTHERSIDE_PYOBJECT_REF_H
#define PYOTHERSIDE_PYOBJECT_REF_H

#include "Python.h"
#include "python_wrap.h"

#include <QMetaType>

Expand Down
2 changes: 1 addition & 1 deletion src/pyqobject.h
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
#ifndef PYOTHERSIDE_PYQOBJECT_H
#define PYOTHERSIDE_PYQOBJECT_H

#include "Python.h"
#include "python_wrap.h"

#include "qobject_ref.h"

Expand Down
6 changes: 6 additions & 0 deletions src/python_wrap.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
#pragma once

#pragma push_macro("slots")
#undef slots
#include "Python.h"
#pragma pop_macro("slots")
2 changes: 1 addition & 1 deletion src/qpython.h
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
#ifndef PYOTHERSIDE_QPYTHON_H
#define PYOTHERSIDE_QPYTHON_H

#include "Python.h"
#include "python_wrap.h"

#include <QVariant>
#include <QObject>
Expand Down
2 changes: 1 addition & 1 deletion src/qpython_priv.h
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
#ifndef PYOTHERSIDE_QPYTHON_PRIV_H
#define PYOTHERSIDE_QPYTHON_PRIV_H

#include "Python.h"
#include "python_wrap.h"

#include "pyobject_ref.h"
#include "pyqobject.h"
Expand Down

0 comments on commit ed279cb

Please sign in to comment.