Merge pull request #453 from benjamb/benbrown/fix-404

Fix module entry point declaration (fixes #404)
This commit is contained in:
Romain 2020-08-25 15:44:36 +02:00 committed by GitHub
commit 4db8cf8b30
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 10 additions and 13 deletions

View File

@ -73,17 +73,15 @@ environment:
PYTHON64_LIBRARY: "C:\\Python37-x64\\libs\\python37.lib" PYTHON64_LIBRARY: "C:\\Python37-x64\\libs\\python37.lib"
# Python 3.8 # Python 3.8
# Skip due to the following error: - PYTHON_VERSION: "3.8"
# Fatal Python error : _PyInterpreterState_Get(): no current thread state PYTHON32_PATH: "C:\\Python38"
# - PYTHON_VERSION: "3.8" PYTHON32_INCLUDE: "C:\\Python38\\include"
# PYTHON32_PATH: "C:\\Python38" PYTHON32_BINARY: "C:\\Python38\\python.exe"
# PYTHON32_INCLUDE: "C:\\Python38\\include" PYTHON32_LIBRARY: "C:\\Python38\\libs\\python38.lib"
# PYTHON32_BINARY: "C:\\Python38\\python.exe" PYTHON64_PATH: "C:\\Python38-x64"
# PYTHON32_LIBRARY: "C:\\Python38\\libs\\python38.lib" PYTHON64_INCLUDE: "C:\\Python38-x64\\include"
# PYTHON64_PATH: "C:\\Python38-x64" PYTHON64_BINARY: "C:\\Python38-x64\\python.exe"
# PYTHON64_INCLUDE: "C:\\Python38-x64\\include" PYTHON64_LIBRARY: "C:\\Python38-x64\\libs\\python38.lib"
# PYTHON64_BINARY: "C:\\Python38-x64\\python.exe"
# PYTHON64_LIBRARY: "C:\\Python38-x64\\libs\\python38.lib"
matrix: matrix:
fast_finish: true # set this flag to immediately finish build once one of the jobs fails. fast_finish: true # set this flag to immediately finish build once one of the jobs fails.

View File

@ -50,13 +50,12 @@
#include "platforms/android/pyAndroid.hpp" #include "platforms/android/pyAndroid.hpp"
py::module LIEF_module("lief", "Python API for LIEF");
PYBIND11_MODULE(lief, LIEF_module) { PYBIND11_MODULE(lief, LIEF_module) {
LIEF_module.attr("__version__") = py::str(LIEF_VERSION); LIEF_module.attr("__version__") = py::str(LIEF_VERSION);
LIEF_module.attr("__tag__") = py::str(LIEF_TAG); LIEF_module.attr("__tag__") = py::str(LIEF_TAG);
LIEF_module.attr("__is_tagged__") = py::bool_(LIEF_TAGGED); LIEF_module.attr("__is_tagged__") = py::bool_(LIEF_TAGGED);
LIEF_module.doc() = "Python API for LIEF";
init_LIEF_Object_class(LIEF_module); init_LIEF_Object_class(LIEF_module);