-
Notifications
You must be signed in to change notification settings - Fork 1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
WIP Python fixes #383
base: master
Are you sure you want to change the base?
WIP Python fixes #383
Changes from 4 commits
0a3aab9
94260ad
7b78f5f
e60847d
d7a4ee3
1b299b9
52284ce
cf39fe9
c9d2d07
c18b193
7942074
c9bc770
9c1be64
0f7ef1d
d567656
e6e4de3
a5a54ef
6917c4d
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
This file was deleted.
This file was deleted.
This file was deleted.
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,13 +7,13 @@ | |
|
||
|
||
py_dir = 'Python' if sys.version_info[0] < 3 else 'Python3' | ||
swig_dir = os.path.join('swig', py_dir) | ||
|
||
class SnowboyBuild(build): | ||
|
||
def run(self): | ||
|
||
cmd = ['make'] | ||
swig_dir = os.path.join('swig', py_dir) | ||
def compile(): | ||
call(cmd, cwd=swig_dir) | ||
|
||
|
@@ -39,14 +39,14 @@ def compile(): | |
|
||
setup( | ||
name='snowboy', | ||
version='1.3.0', | ||
version='1.3.1', | ||
description='Snowboy is a customizable hotword detection engine', | ||
maintainer='KITT.AI', | ||
maintainer_email='[email protected]', | ||
license='Apache-2.0', | ||
url='https://snowboy.kitt.ai', | ||
packages=find_packages(os.path.join('examples', py_dir)), | ||
package_dir={'snowboy': os.path.join('examples', py_dir)}, | ||
packages=find_packages(swig_dir), | ||
package_dir={'snowboy': swig_dir}, | ||
py_modules=['snowboy.snowboydecoder', 'snowboy.snowboydetect'], | ||
package_data={'snowboy': ['resources/*']}, | ||
zip_safe=False, | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -35,7 +35,7 @@ else | |
CXX := g++ | ||
PYINC := $(shell python-config --cflags) | ||
PYLIBS := $(shell python-config --ldflags) | ||
SWIGFLAGS := -shared | ||
SWIGFLAGS := -Wl,-O1,--as-needed -shared | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. the -O1 option here asks the compiler to do level 1 optimizations, might be helpful There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I dont understand. What do you mean? Was this just a "hey, thats good!" or are you requesting some change? I am already using -O1? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Oh OK sorry, mis-read it... I thought "SWIGFLAGS := -Wl,-O1,--as-needed -shared" was the original line. |
||
CXXFLAGS += -std=c++0x | ||
# Make sure you have Atlas installed. You can statically link Atlas if you | ||
# would like to be able to move the library to a machine without Atlas. | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -39,14 +39,14 @@ else | |
CXX := g++ | ||
PYINC := $(shell python3-config --cflags) | ||
PYLIBS := $(shell python3-config --ldflags) | ||
SWIGFLAGS := -shared | ||
SWIGFLAGS := -Wl,-O1,--as-needed -shared | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Same as above, the -O1 option here asks the compiler to do level 1 optimizations, might be helpful |
||
CXXFLAGS += -std=c++0x | ||
# Make sure you have Atlas installed. You can statically link Atlas if you | ||
# would like to be able to move the library to a machine without Atlas. | ||
ifneq ("$(ldconfig -p | grep lapack_atlas)","") | ||
LDLIBS := -lm -ldl -lf77blas -lcblas -llapack_atlas -latlas | ||
else | ||
LDLIBS := -lm -ldl -lf77blas -lcblas -llapack -latlas | ||
LDLIBS := -lm -lcblas | ||
endif | ||
SNOWBOYDETECTLIBFILE = $(TOPDIR)/lib/ubuntu64/libsnowboy-detect.a | ||
ifneq (,$(findstring arm,$(shell uname -m))) | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I added a new param for
apply_frontend
. We can now set it through initialization.