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
c28922e0
Commit
c28922e0
authored
Feb 23, 2016
by
plusvic
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix a few issues with setup.py
parent
7360bf2e
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
3 deletions
+15
-3
setup.py
setup.py
+15
-3
No files found.
setup.py
View file @
c28922e0
...
...
@@ -55,6 +55,7 @@ def muted(*streams):
def
has_function
(
function_name
,
libraries
=
None
):
"""Checks if a given functions exists in the current platform."""
compiler
=
distutils
.
ccompiler
.
new_compiler
()
with
muted
(
sys
.
stdout
,
sys
.
stderr
):
result
=
compiler
.
has_function
(
...
...
@@ -92,12 +93,16 @@ class BuildCommand(build):
'--enable-cuckoo must be used with --static'
)
def
run
(
self
):
sources
=
[
'./yara-python.c'
]
"""Execute the build command."""
os
.
chdir
(
os
.
path
.
dirname
(
__file__
))
sources
=
[
'yara-python.c'
]
exclusions
=
[
'yara/libyara/modules/pe_utils.c'
]
libraries
=
[
'yara'
]
include_dirs
=
[]
library_dirs
=
[]
compile_args
=
[]
compile_args
=
[
'-O3'
]
macros
=
[]
if
self
.
plat_name
in
(
'win32'
,
'win-amd64'
):
...
...
@@ -109,6 +114,13 @@ class BuildCommand(build):
else
:
building_for_windows
=
False
if
'macosx'
in
self
.
plat_name
:
building_for_osx
=
True
include_dirs
.
append
(
'/opt/local/include'
)
library_dirs
.
append
(
'/opt/local/lib'
)
else
:
building_for_osx
=
False
if
has_function
(
'memmem'
):
macros
.
append
((
'HAVE_MEMMEM'
,
'1'
))
if
has_function
(
'strlcpy'
):
...
...
@@ -173,7 +185,7 @@ class BuildCommand(build):
setup
(
name
=
'yara-python'
,
version
=
'3.4.
1
'
,
version
=
'3.4.
2
'
,
author
=
'Victor M. Alvarez'
,
author_email
=
'plusvic@gmail.com;vmalvarez@virustotal.com'
,
url
=
'https://github.com/plusvic/yara-python'
,
...
...
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