-
-
Notifications
You must be signed in to change notification settings - Fork 5.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
Add LibSVM #358
Merged
Merged
Add LibSVM #358
Changes from 2 commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
acccad4
Add libsvm
183amir 378ea5c
Fixes Windows
patricksnape 4b3175d
Merge Error Fix
patricksnape 5e2f3d9
Add clean and error check
patricksnape d1f720b
Python build and test
patricksnape c8cd2fe
Re-add PY_VER Jinja
patricksnape File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
nmake /f Makefile.win all | ||
if errorlevel 1 exit 1 | ||
|
||
REM Install step | ||
copy windows\libsvm.dll %LIBRARY_LIB%\libsvm.dll | ||
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. Could you please add |
||
xcopy windows\*.exe %LIBRARY_BIN%\ | ||
if errorlevel 1 exit 1 | ||
copy svm.h %LIBRARY_INC%\svm.h | ||
if errorlevel 1 exit 1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
#!/bin/bash | ||
|
||
make all | ||
make lib | ||
# there is no make check or something similar and no make install | ||
|
||
mkdir -p $PREFIX/share/licenses/libsvm $PREFIX/lib $PREFIX/include $PREFIX/bin | ||
install -m644 libsvm.so.* $PREFIX/lib/ | ||
install -m644 svm.h $PREFIX/include/svm.h | ||
install -m644 COPYRIGHT $PREFIX/share/licenses/libsvm/LICENSE | ||
install -m755 svm-train $PREFIX/bin/ | ||
install -m755 svm-scale $PREFIX/bin/ | ||
install -m755 svm-predict $PREFIX/bin/ | ||
ln -s libsvm.so.* $PREFIX/lib/libsvm.so |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
{% set version = "3.21" %} | ||
{% set flatversion = version.replace(".", "") %} | ||
|
||
package: | ||
name: libsvm | ||
version: {{ version }} | ||
|
||
source: | ||
fn: libsvm-{{ flatversion }}.tar.gz | ||
url: https://github.com/cjlin1/libsvm/archive/v{{ flatversion }}.tar.gz | ||
md5: acff2c058b7cb38a135fa5d0b4f39e43 | ||
|
||
patches: | ||
- win32.patch # [win32] | ||
|
||
build: | ||
number: 0 | ||
features: | ||
- vc9 # [win and py27] | ||
- vc10 # [win and py34] | ||
- vc14 # [win and py35] | ||
|
||
test: | ||
requires: | ||
- python {{ environ['PY_VER'] + '*' }} # [win] | ||
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. |
||
|
||
test: | ||
commands: | ||
- test -e $PREFIX/include/svm.h # [unix] | ||
- test -e $PREFIX/lib/libsvm.so # [unix] | ||
- test -e $PREFIX/lib/libsvm.so.2 # [unix] | ||
- svm-train | grep 'Usage' # [unix] | ||
- svm-scale | grep 'Usage' # [unix] | ||
- svm-predict | grep 'Usage' # [unix] | ||
- svm-train | find "Usage" # [win] | ||
- svm-scale | find "Usage" # [win] | ||
- svm-predict | find "Usage" # [win] | ||
- if not exist %PREFIX%\\Library\\lib\\libsvm.dll exit 1 # [win] | ||
|
||
about: | ||
home: https://github.com/cjlin1/libsvm | ||
license: Modified BSD License (3-clause) | ||
summary: A simple, easy-to-use, and efficient software for SVM classification and regression. | ||
|
||
extra: | ||
recipe-maintainers: | ||
- 183amir | ||
- patricksnape |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
--- Makefile.win | ||
+++ Makefile.win | ||
@@ -7,3 +7,3 @@ | ||
CXX = cl.exe | ||
-CFLAGS = /nologo /O2 /EHsc /I. /D _WIN64 /D _CRT_SECURE_NO_DEPRECATE | ||
+CFLAGS = /nologo /O2 /EHsc /I. /D _WIN32 /D _CRT_SECURE_NO_DEPRECATE | ||
TARGET = windows |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
Since you have removed the clean command, could you please remove the files in the windows folder before building?