Skip to content

Commit

Permalink
Rename the extension module to ufal/_udpipe.
Browse files Browse the repository at this point in the history
The newest SWIG uses this convention for loading extension modules.
  • Loading branch information
foxik committed Nov 20, 2019
1 parent f6c3f04 commit 054195f
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
4 changes: 2 additions & 2 deletions bindings/python/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

include ../common/Makefile.common

BINDING_MODULE=$(if $(filter osx-%,$(PLATFORM)),ufal_udpipe.so,$(call dynlib,ufal_udpipe))
BINDING_MODULE=$(if $(filter osx-%,$(PLATFORM)),ufal/_udpipe.so,$(call dynlib,ufal/_udpipe))
BINDING_C_FLAGS+=$(if $(PYTHON_INCLUDE),,$(error PYTHON_INCLUDE must be set to the directory containing Python.h))
BINDING_C_FLAGS+=$(call include_dir,$(PYTHON_INCLUDE))
BINDING_C_FLAGS+=$(if $(filter %-gcc %-clang,$(PLATFORM)),-w)
Expand All @@ -23,7 +23,7 @@ $(BINDING_MODULE): $(call dynobj,udpipe_python) $(BINDING_UDPIPE_OBJECTS)
udpipe_python.cpp: udpipe_python.i ../common/udpipe.i
@$(call mkdir,ufal)
@$(call echo,>ufal/__init__.py)
swig $(SWIG_FLAGS) -python -outdir ufal -o $@ -interface ufal_udpipe -builtin $<
swig $(SWIG_FLAGS) -python -outdir ufal -o $@ -builtin $<

.PHONY: clean
clean:
Expand Down
6 changes: 5 additions & 1 deletion bindings/python/udpipe_python.i
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
%module udpipe
%module(package="ufal") udpipe

%begin %{
#ifdef _WIN32
Expand All @@ -12,4 +12,8 @@
#endif
%}

%pythonbegin %{
# __version__ =
%}

%include "../common/udpipe.i"

0 comments on commit 054195f

Please sign in to comment.