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
63afe4d5
Commit
63afe4d5
authored
Oct 20, 2016
by
Joachim Metz
Committed by
Victor M. Alvarez
Oct 20, 2016
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added setup.py update command. (#24)
parent
1942e64d
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
37 additions
and
2 deletions
+37
-2
setup.py
setup.py
+37
-2
No files found.
setup.py
View file @
63afe4d5
...
...
@@ -15,7 +15,7 @@
#
from
distutils.command.build
import
build
from
setuptools
import
setup
,
Extension
from
setuptools
import
setup
,
Command
,
Extension
from
codecs
import
open
import
distutils.errors
...
...
@@ -172,6 +172,39 @@ class BuildCommand(build):
build
.
run
(
self
)
class
UpdateCommand
(
Command
):
"""Update libyara source.
This is normally only run by packagers to make a new release.
"""
user_options
=
[]
def
initialize_options
(
self
):
pass
def
finalize_options
(
self
):
pass
def
run
(
self
):
subprocess
.
check_call
([
'git'
,
'stash'
],
cwd
=
'yara'
)
subprocess
.
check_call
([
'git'
,
'submodule'
,
'init'
])
subprocess
.
check_call
([
'git'
,
'submodule'
,
'update'
])
subprocess
.
check_call
([
'git'
,
'reset'
,
'--hard'
],
cwd
=
'yara'
)
subprocess
.
check_call
([
'git'
,
'clean'
,
'-x'
,
'-f'
,
'-d'
],
cwd
=
'yara'
)
subprocess
.
check_call
([
'git'
,
'checkout'
,
'master'
],
cwd
=
'yara'
)
subprocess
.
check_call
([
'git'
,
'pull'
],
cwd
=
'yara'
)
subprocess
.
check_call
([
'git'
,
'fetch'
,
'--tags'
],
cwd
=
'yara'
)
tag_name
=
'tags/v
%
s'
%
self
.
distribution
.
metadata
.
version
subprocess
.
check_call
([
'git'
,
'checkout'
,
tag_name
],
cwd
=
'yara'
)
subprocess
.
check_call
([
'./bootstrap.sh'
],
cwd
=
'yara'
)
subprocess
.
check_call
([
'./configure'
],
cwd
=
'yara'
)
with
open
(
'README.rst'
,
'r'
,
'utf-8'
)
as
f
:
readme
=
f
.
read
()
...
...
@@ -185,7 +218,9 @@ setup(
author_email
=
'plusvic@gmail.com;vmalvarez@virustotal.com'
,
url
=
'https://github.com/VirusTotal/yara-python'
,
zip_safe
=
False
,
cmdclass
=
{
'build'
:
BuildCommand
},
cmdclass
=
{
'build'
:
BuildCommand
,
'update'
:
UpdateCommand
},
ext_modules
=
[
Extension
(
name
=
'yara'
,
include_dirs
=
[
'yara/libyara/include'
,
'yara/libyara/'
,
'.'
],
...
...
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