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
cubicweb
cubicweb
Commits
06bcb7e7a69c
Commit
f7f307f6
authored
Jul 05, 2016
by
Denis Laxalde
Browse files
[pkg] Handle verbose option in setup.py's export function
Make debugging easier. --HG-- branch : 3.23
parent
b5cd8a2cccab
Changes
1
Hide whitespace changes
Inline
Side-by-side
setup.py
View file @
06bcb7e7
...
...
@@ -118,15 +118,23 @@ def export(from_dir, to_dir,
import
errno
if
ex
.
errno
!=
errno
.
EEXIST
:
raise
else
:
if
verbose
:
print
(
'created %s directory'
%
to_dir
)
for
dirpath
,
dirnames
,
filenames
in
os
.
walk
(
from_dir
):
for
norecurs
in
blacklist
:
try
:
dirnames
.
remove
(
norecurs
)
except
ValueError
:
pass
else
:
if
verbose
:
print
(
'not recursing in %s'
%
join
(
dirpath
,
norecurs
))
for
dirname
in
dirnames
:
dest
=
join
(
to_dir
,
dirname
)
if
not
exists
(
dest
):
if
verbose
:
print
(
'creating %s directory'
%
dest
)
os
.
mkdir
(
dest
)
for
filename
in
filenames
:
# don't include binary files
...
...
@@ -138,6 +146,8 @@ def export(from_dir, to_dir,
continue
if
exists
(
dest
):
os
.
remove
(
dest
)
if
verbose
:
print
(
'copying %s to %s'
%
(
src
,
dest
))
shutil
.
copy2
(
src
,
dest
)
...
...
@@ -153,7 +163,7 @@ class MyInstallLib(install_lib.install_lib):
if
include_dirs
:
for
directory
in
include_dirs
:
dest
=
join
(
self
.
install_dir
,
modname
,
directory
)
export
(
directory
,
dest
,
verbose
=
Fal
se
)
export
(
directory
,
dest
,
verbose
=
self
.
verbo
se
)
# write required share/cubicweb/cubes/__init__.py
class
MyInstallData
(
install_data
.
install_data
):
...
...
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