Skip to content

Commit c019bd7

Browse files
committed
Compile wrapper.pyx under the name libzim.
Instead of creating a submodule named `libzim.wrapper`, let's directly create a libzim module. This break tests as we cannot import submodules anymore but it will be fixed in next commits.
1 parent e040821 commit c019bd7

File tree

4 files changed

+3
-21
lines changed

4 files changed

+3
-21
lines changed

libzim/__init__.py

Lines changed: 0 additions & 18 deletions
This file was deleted.

libzim/libwrapper.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@
3434
ObjWrapper::ObjWrapper(PyObject* obj)
3535
: m_obj(obj)
3636
{
37-
if (import_libzim__wrapper()) {
37+
if (import_libzim()) {
3838
std::cerr << "Error executing import_libzim!\n";
3939
throw std::runtime_error("Error executing import_libzim");
4040
}

libzim/wrapper.pyx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
# along with this program. If not, see <http://www.gnu.org/licenses/>.
1919

2020

21-
cimport libzim.zim as zim
21+
cimport zim
2222

2323
import os
2424
import enum

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ def get_long_description():
8787

8888

8989
wrapper_extension = Extension(
90-
name="libzim.wrapper",
90+
name="libzim",
9191
sources=["libzim/wrapper.pyx", "libzim/libwrapper.cpp"],
9292
include_dirs=["libzim", LIBZIM_INCLUDE_DIR],
9393
libraries=["zim"],

0 commit comments

Comments
 (0)