Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
Y
yara-python
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
fact-depend
yara-python
Commits
1e97d6dc
Commit
1e97d6dc
authored
May 17, 2017
by
Victor Manuel Alvarez
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Build jansson library in appveyor
parent
f55d7cb1
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
36 additions
and
3 deletions
+36
-3
appveyor.yml
appveyor.yml
+20
-1
setup.py
setup.py
+16
-2
No files found.
appveyor.yml
View file @
1e97d6dc
...
...
@@ -14,26 +14,32 @@ environment:
-
PYTHON
:
"
C:
\\
Python27"
PYTHON_VERSION
:
"
2.7.x"
# currently 2.7.13
PYTHON_ARCH
:
"
32"
JANSSON_VERSION
:
"
2.10"
-
PYTHON
:
"
C:
\\
Python27-x64"
PYTHON_VERSION
:
"
2.7.x"
# currently 2.7.13
PYTHON_ARCH
:
"
64"
JANSSON_VERSION
:
"
2.10"
-
PYTHON
:
"
C:
\\
Python33"
PYTHON_VERSION
:
"
3.3.x"
# currently 3.3.5
PYTHON_ARCH
:
"
32"
JANSSON_VERSION
:
"
2.10"
-
PYTHON
:
"
C:
\\
Python33-x64"
PYTHON_VERSION
:
"
3.3.x"
# currently 3.3.5
PYTHON_ARCH
:
"
64"
JANSSON_VERSION
:
"
2.10"
-
PYTHON
:
"
C:
\\
Python34"
PYTHON_VERSION
:
"
3.4.x"
# currently 3.4.4
PYTHON_ARCH
:
"
32"
JANSSON_VERSION
:
"
2.10"
-
PYTHON
:
"
C:
\\
Python34-x64"
PYTHON_VERSION
:
"
3.4.x"
# currently 3.4.4
PYTHON_ARCH
:
"
64"
JANSSON_VERSION
:
"
2.10"
# Python versions not pre-installed
...
...
@@ -87,13 +93,26 @@ install:
# target Python version and architecture
-
"
%CMD_IN_ENV%
pip
install
nose
wheel"
# Download and build jansson library
-
cd ..
-ps
:
Invoke-WebRequest "https://github.com/akheron/jansson/archive/v%JANSSON_VERSION%.zip" -OutFile "jansson.zip"
-ps
:
Expand-Archive jansson.zip -DestinationPath .
-
cd jansson-%JANSSON_VERSION%
-
md build
-
cd build
-
cmake -DJANSSON_BUILD_DOCS=OFF -G "%VS%" ..
-
cmake --build . --config Release
-
ctest --output-on-failure
-
cd ../../yara-python
clone_script
:
-
cmd
:
git clone -q --recursive --branch=%APPVEYOR_REPO_BRANCH% https://github.com/%APPVEYOR_REPO_NAME%.git %APPVEYOR_BUILD_FOLDER%
-
cmd
:
git checkout -qf %APPVEYOR_REPO_COMMIT%
build_script
:
# Build the compiled extension
-
"
%CMD_IN_ENV%
python
setup.py
build
--enable-cuckoo"
-
"
%CMD_IN_ENV%
python
setup.py
build
--enable-cuckoo
--library-dir=../jansson-%JANSSON_VERSION%/build/lib/Release
--include-dir=../jansson-%JANSSON_VERSION%/build/include
"
test_script
:
# Run the project tests
...
...
setup.py
View file @
1e97d6dc
...
...
@@ -35,7 +35,9 @@ OPTIONS = [
(
'dynamic-linking'
,
None
,
'link dynamically against libyara'
),
(
'enable-cuckoo'
,
None
,
'enable "cuckoo" module'
),
(
'enable-magic'
,
None
,
'enable "magic" module'
),
(
'enable-profiling'
,
None
,
'enable profiling features'
)]
(
'enable-profiling'
,
None
,
'enable profiling features'
),
(
'library-dir='
,
None
,
'library directory'
),
(
'include-dir='
,
None
,
'include directory'
)]
BOOLEAN_OPTIONS
=
[
...
...
@@ -94,6 +96,8 @@ class BuildCommand(build):
self
.
enable_magic
=
None
self
.
enable_cuckoo
=
None
self
.
enable_profiling
=
None
self
.
library_dir
=
None
self
.
include_dir
=
None
def
finalize_options
(
self
):
...
...
@@ -113,6 +117,8 @@ class BuildExtCommand(build_ext):
self
.
enable_magic
=
None
self
.
enable_cuckoo
=
None
self
.
enable_profiling
=
None
self
.
library_dir
=
None
self
.
include_dir
=
None
def
finalize_options
(
self
):
...
...
@@ -125,7 +131,9 @@ class BuildExtCommand(build_ext):
(
'dynamic_linking'
,
'dynamic_linking'
),
(
'enable_magic'
,
'enable_magic'
),
(
'enable_cuckoo'
,
'enable_cuckoo'
),
(
'enable_profiling'
,
'enable_profiling'
))
(
'enable_profiling'
,
'enable_profiling'
),
(
'library_dir'
,
'library_dir'
),
(
'include_dir'
,
'include_dir'
))
if
self
.
enable_magic
and
self
.
dynamic_linking
:
raise
distutils
.
errors
.
DistutilsOptionError
(
...
...
@@ -145,6 +153,12 @@ class BuildExtCommand(build_ext):
exclusions
=
[]
if
self
.
library_dir
:
module
.
library_dirs
.
append
(
self
.
library_dir
)
if
self
.
include_dir
:
module
.
include_dirs
.
append
(
self
.
include_dir
)
if
self
.
plat_name
in
(
'win32'
,
'win-amd64'
):
building_for_windows
=
True
bits
=
'64'
if
self
.
plat_name
==
'win-amd64'
else
'32'
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment