Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
A
abc
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
lvzhengyang
abc
Commits
257cbfd2
Commit
257cbfd2
authored
Jun 10, 2014
by
Baruch Sterin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add an option to the pyabc packaging scripts
parent
e58713a6
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
3 deletions
+10
-3
Makefile
+3
-1
src/python/package.py
+7
-2
No files found.
Makefile
View file @
257cbfd2
ABC_PYTHON
=
/usr/bin/python
READLINE
=
0
CC
:=
gcc
CXX
:=
g++
...
...
@@ -40,7 +42,7 @@ arch_flags : arch_flags.c
$(CC)
arch_flags.c
-o
arch_flags
ARCHFLAGS
?=
$(
shell
$(CC)
arch_flags.c
-o
arch_flags
&&
./arch_flags
)
OPTFLAGS
?=
-g
-O
#-DABC_NAMESPACE=xxx
OPTFLAGS
?=
-g
-O
3
#-DABC_NAMESPACE=xxx
MSG_PREFIX
?=
CFLAGS
+=
-Wall
-Wno-unused-function
-Wno-write-strings
-Wno-sign-compare
$(OPTFLAGS)
$(ARCHFLAGS)
-Isrc
...
...
src/python/package.py
View file @
257cbfd2
...
...
@@ -71,7 +71,7 @@ def add_file(tf, fname, arcname, mode, mtime):
with
open
(
fname
,
"rb"
)
as
f
:
add_fileobj
(
tf
,
f
,
arcname
,
mode
,
mtime
)
def
package
(
pyabc_dir
,
extra_bin
,
extra_lib
,
abc_exe
,
abc_sh
,
pyabc
,
ofname
,
scripts_dir
,
use_sys
):
def
package
(
pyabc_dir
,
extra_bin
,
extra_lib
,
extra_files
,
abc_exe
,
abc_sh
,
pyabc
,
ofname
,
scripts_dir
,
use_sys
):
mtime
=
time
.
time
()
...
...
@@ -106,6 +106,9 @@ def package(pyabc_dir, extra_bin, extra_lib, abc_exe, abc_sh, pyabc, ofname, scr
for
lib
in
extra_lib
:
add_python_lib
(
tf
,
lib_dir
,
lib
,
mtime
)
for
file
,
dest
in
extra_files
:
add_file
(
tf
,
file
,
'
%
s/
%
s'
%
(
pyabc_dir
,
dest
),
0666
,
mtime
)
for
entry
in
os
.
listdir
(
pyabc
):
if
entry
.
endswith
(
'.py'
):
add_file
(
tf
,
os
.
path
.
join
(
pyabc
,
entry
),
os
.
path
.
join
(
"
%
s/lib"
%
pyabc_dir
,
entry
),
0666
,
mtime
)
...
...
@@ -142,6 +145,7 @@ def main(args):
parser
.
add_option
(
"-d"
,
"--pyabc_dir"
,
dest
=
"pyabc_dir"
,
help
=
"name of generated directory"
)
parser
.
add_option
(
"-b"
,
"--extra_bin"
,
dest
=
"extra_bin"
,
help
=
"extra binaries to pack"
)
parser
.
add_option
(
"-l"
,
"--extra_lib"
,
dest
=
"extra_lib"
,
help
=
"extra directories in lib to pack"
)
parser
.
add_option
(
"-f"
,
"--extra_files"
,
dest
=
"extra_files"
,
help
=
"additional files (comma separated pairs of file:dest"
)
parser
.
add_option
(
"-a"
,
"--abc"
,
dest
=
"abc"
,
help
=
"location of the ABC exeutable"
)
parser
.
add_option
(
"-s"
,
"--abc_sh"
,
dest
=
"abc_sh"
,
help
=
"location of the ABC setup script"
)
parser
.
add_option
(
"-p"
,
"--pyabc"
,
dest
=
"pyabc"
,
help
=
"location of pyabc.py"
)
...
...
@@ -161,8 +165,9 @@ def main(args):
extra_bin
=
options
.
extra_bin
.
split
(
','
)
if
options
.
extra_bin
else
[]
extra_lib
=
options
.
extra_lib
.
split
(
','
)
if
options
.
extra_lib
else
[]
extra_files
=
[
s
.
split
(
':'
)
for
s
in
options
.
extra_files
.
split
(
','
)]
if
options
.
extra_files
else
[]
return
package
(
options
.
pyabc_dir
,
extra_bin
,
extra_lib
,
options
.
abc
,
options
.
abc_sh
,
options
.
pyabc
,
options
.
out
,
options
.
scripts
,
options
.
sys
)
return
package
(
options
.
pyabc_dir
,
extra_bin
,
extra_lib
,
extra_files
,
options
.
abc
,
options
.
abc_sh
,
options
.
pyabc
,
options
.
out
,
options
.
scripts
,
options
.
sys
)
if
__name__
==
"__main__"
:
main
(
sys
.
argv
)
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