Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Thomas Lavocat
yggdrasil
Commits
f09ef1f2
Commit
f09ef1f2
authored
Jul 24, 2017
by
lavocat
Browse files
Create entry-points on binaries
parent
92426c09
Changes
4
Expand all
Show whitespace changes
Inline
Side-by-side
bin/socket-bridge
deleted
100755 → 0
View file @
92426c09
This diff is collapsed.
Click to expand it.
setup.py
View file @
f09ef1f2
...
...
@@ -21,5 +21,11 @@ setup(
packages
=
find_packages
(),
install_requires
=
[
'pyzmq'
,
'pexpect'
],
scripts
=
[
'bin/erebor'
,
'bin/socket-bridge'
]
)
entry_points
=
{
'console_scripts'
:
[
'erebor=yggdrasil.erebor.main:main'
,
'socket-bridge=yggdrasil.isengard.socket_bridge:main'
,
],
}
)
bin/erebor
→
yggdrasil/erebor/main.py
View file @
f09ef1f2
...
...
@@ -11,7 +11,7 @@ def flushprint(*args, **kwargs):
sys
.
stdout
.
flush
()
def
main
(
argv
,
Controler
=
None
):
def
runner
(
argv
,
Controler
=
None
):
flushprint
(
"start"
)
try
:
options
,
argv
=
getopt
.
getopt
(
...
...
@@ -90,5 +90,5 @@ def main(argv, Controler=None):
sys
.
exit
(
-
1
)
if
__name__
==
"__
main
__"
:
sys
.
exit
(
main
(
sys
.
argv
)
)
def
main
()
:
runner
(
sys
.
argv
)
yggdrasil/isengard/socket_bridge.py
View file @
f09ef1f2
...
...
@@ -10,7 +10,8 @@ import struct
import
sys
import
socket
import
select
from
.
import
consts
import
yggdrasil
from
yggdrasil.isengard
import
consts
from
threading
import
Thread
from
threading
import
Timer
from
threading
import
Lock
...
...
@@ -860,7 +861,8 @@ class Bridge(Thread):
# This one will be asked to be launched by the main one on taktuk.
# The main one will access to the bridge through another unix socket, on the file
# given on parameters
def
main
(
argv
):
def
main
():
argv
=
sys
.
argv
sys
.
stderr
=
sys
.
stdout
try
:
options
,
argv
=
getopt
.
getopt
(
...
...
@@ -892,6 +894,3 @@ def main(argv):
bridge
.
start
()
bridge
.
log_to_father
(
"control -> {}"
.
format
(
control_adress
))
bridge
.
join
()
if
__name__
==
"__main__"
:
sys
.
exit
(
main
(
sys
.
argv
))
Write
Preview
Supports
Markdown
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