Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
P
python-defaults
Manage
Activity
Members
Labels
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
pkg
python-defaults
Commits
7b97ade9
Commit
7b97ade9
authored
13 years ago
by
Piotr Ożarowski
Browse files
Options
Downloads
Patches
Plain Diff
add --no-dbg-cleaning option (to disable removing files from debug
packages)
parent
6d049e4f
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
debian/changelog
+2
-0
2 additions, 0 deletions
debian/changelog
dh_python2
+8
-5
8 additions, 5 deletions
dh_python2
dh_python2.rst
+2
-0
2 additions, 0 deletions
dh_python2.rst
with
12 additions
and
5 deletions
debian/changelog
+
2
−
0
View file @
7b97ade9
...
...
@@ -6,6 +6,8 @@ python-defaults (2.7.2-5) UNRELEASED; urgency=low
from given package only, add --compile-all to dh_python2's call if you
want the old behaviour (i.e. compile also files (plugins?) provided by
other packages, which do not use a helper/bytecompile them)
- add --no-dbg-cleaning option (to disable removing files from debug
packages)
* pyclean now accepts --package and private dir argument at the same time
-- Piotr Ożarowski <piotr@debian.org> Thu, 28 Jul 2011 00:23:50 +0200
...
...
This diff is collapsed.
Click to expand it.
dh_python2
+
8
−
5
View file @
7b97ade9
...
...
@@ -299,7 +299,7 @@ def share_2x(dir1, dir2, dc=None):
### PACKAGE DETAILS ############################################
def
scan
(
package
,
dname
=
None
):
def
scan
(
package
,
dname
=
None
,
clean_dbg_pkg
=
True
):
"""
Gather statistics about Python files in given package.
"""
r
=
{
'
requires.txt
'
:
set
(),
'
nsp.txt
'
:
set
(),
...
...
@@ -359,7 +359,7 @@ def scan(package, dname=None):
# handle some EGG related data (.egg-info dirs)
for
name
in
dirs
:
if
name
.
endswith
(
'
.egg-info
'
):
if
dbg_package
:
if
dbg_package
and
clean_dbg_pkg
:
rmtree
(
join
(
root
,
name
))
dirs
.
remove
(
name
)
continue
...
...
@@ -396,7 +396,7 @@ def scan(package, dname=None):
os
.
remove
(
lpath
)
log
.
info
(
'
renaming %s to %s
'
,
dstfpath
,
fn
)
os
.
rename
(
dstfpath
,
fpath
)
if
dbg_package
and
fext
not
in
(
'
so
'
,
'
h
'
):
if
dbg_package
and
clean_dbg_pkg
and
fext
not
in
(
'
so
'
,
'
h
'
):
os
.
remove
(
join
(
root
,
fn
))
continue
...
...
@@ -449,7 +449,7 @@ def scan(package, dname=None):
if
res
:
r
[
'
shebangs
'
].
add
(
res
)
if
dbg_package
:
if
dbg_package
and
clean_dbg_pkg
:
# remove empty directories in -dbg packages
proot
=
proot
+
'
/usr/lib
'
for
root
,
dirs
,
file_names
in
os
.
walk
(
proot
,
topdown
=
False
):
...
...
@@ -516,6 +516,9 @@ def main():
help
=
'
do not translate shebangs into Debian dependencies
'
)
parser
.
add_option
(
'
--ignore-namespace
'
,
action
=
'
store_true
'
,
default
=
False
,
help
=
"
ignore Egg
'
s namespace_packages.txt file and --namespace option
"
)
parser
.
add_option
(
'
--no-dbg-cleaning
'
,
action
=
'
store_false
'
,
dest
=
'
clean_dbg_pkg
'
,
default
=
True
,
help
=
'
do not remove files from debug packages
'
)
# ignore some debhelper options:
parser
.
add_option
(
'
-O
'
,
help
=
SUPPRESS_HELP
)
...
...
@@ -577,7 +580,7 @@ def main():
if
not
pyremove
(
package
,
options
.
vrange
):
exit
(
5
)
fix_locations
(
package
)
stats
=
scan
(
package
,
private_dir
)
stats
=
scan
(
package
,
private_dir
,
options
.
clean_dbg_pkg
)
if
not
private_dir
:
share
(
package
,
stats
,
options
)
pyshared_dir
=
"
debian/%s/usr/share/pyshared/
"
%
package
...
...
This diff is collapsed.
Click to expand it.
dh_python2.rst
+
2
−
0
View file @
7b97ade9
...
...
@@ -110,6 +110,8 @@ OPTIONS
--no-guessing-deps disable guessing dependencies
--no-dbg-cleaning do not remove any files from debug packages
--skip-private don't check private directories
-v, --verbose turn verbose mode on
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment