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
43436768
Commit
43436768
authored
9 years ago
by
plusvic
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Make static linking the default option while building yara-python
parent
d88f8ac6
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
9 deletions
+9
-9
setup.py
setup.py
+9
-9
No files found.
setup.py
View file @
43436768
...
...
@@ -68,29 +68,29 @@ def has_function(function_name, libraries=None):
class
BuildCommand
(
build
):
user_options
=
build
.
user_options
+
[
(
'
static'
,
's'
,
'build libyara statically into yara-python module
'
),
(
'
dynamic-linking'
,
None
,
'link dynamically against libyara
'
),
(
'enable-cuckoo'
,
None
,
'enable "cuckoo" module (use with --static)'
),
(
'enable-magic'
,
None
,
'enable "magic" module (use with --static)'
),
(
'enable-profiling'
,
None
,
'enable profiling features'
)]
boolean_options
=
build
.
boolean_options
+
[
'
stat
ic'
,
'enable-cuckoo'
,
'enable-magic'
,
'enable-profiling'
]
'
dynam
ic'
,
'enable-cuckoo'
,
'enable-magic'
,
'enable-profiling'
]
def
initialize_options
(
self
):
build
.
initialize_options
(
self
)
self
.
static
=
None
self
.
dynamic_linking
=
None
self
.
enable_magic
=
None
self
.
enable_cuckoo
=
None
self
.
enable_profiling
=
None
def
finalize_options
(
self
):
build
.
finalize_options
(
self
)
if
self
.
enable_magic
and
not
self
.
stat
ic
:
if
self
.
enable_magic
and
self
.
dynam
ic
:
raise
distutils
.
errors
.
DistutilsOptionError
(
'--enable-magic
must be used with --static
'
)
if
self
.
enable_cuckoo
and
not
self
.
stat
ic
:
'--enable-magic
can''t be used with --dynamic-linking
'
)
if
self
.
enable_cuckoo
and
self
.
dynam
ic
:
raise
distutils
.
errors
.
DistutilsOptionError
(
'--enable-cuckoo
must be used with --static
'
)
'--enable-cuckoo
can''t be used with --dynamic-linking
'
)
def
run
(
self
):
"""Execute the build command."""
...
...
@@ -134,7 +134,7 @@ class BuildCommand(build):
if
self
.
enable_profiling
:
macros
.
append
((
'PROFILING_ENABLED'
,
'1'
))
if
self
.
static
:
if
not
self
.
dynamic_linking
:
libraries
.
remove
(
'yara'
)
include_dirs
.
extend
([
'yara/libyara/include'
,
'yara/libyara/'
,
'.'
])
...
...
@@ -188,7 +188,7 @@ class BuildCommand(build):
setup
(
name
=
'yara-python'
,
version
=
'3.4.
2
'
,
version
=
'3.4.
0.00
'
,
author
=
'Victor M. Alvarez'
,
author_email
=
'plusvic@gmail.com;vmalvarez@virustotal.com'
,
url
=
'https://github.com/plusvic/yara-python'
,
...
...
This diff is collapsed.
Click to expand it.
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