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
15136f78
Commit
15136f78
authored
13 years ago
by
Piotr Ożarowski
Browse files
Options
Downloads
Patches
Plain Diff
add --ignore-namespace option that will disable handling
Egg-info's namespace_packages.txt (AKA namespace feature)
parent
b3b5577c
No related branches found
No related tags found
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
+17
-8
17 additions, 8 deletions
dh_python2
dh_python2.rst
+5
-0
5 additions, 0 deletions
dh_python2.rst
with
24 additions
and
8 deletions
debian/changelog
+
2
−
0
View file @
15136f78
...
...
@@ -12,6 +12,8 @@ python-defaults (2.7.2-2) UNRELEASED; urgency=low
Leonid Borisenko for the original patch)
- add --ignore-shebangs option that will disable translating shebangs into
Debian dependencies
- add --ignore-namespace option that will disable handling
Egg-info's namespace_packages.txt (AKA namespace feature)
-- Piotr Ożarowski <piotr@debian.org> Sun, 12 Jun 2011 13:28:48 +0200
...
...
This diff is collapsed.
Click to expand it.
dh_python2
+
17
−
8
View file @
15136f78
...
...
@@ -257,7 +257,8 @@ def share_2x(dir1, dir2, dc=None):
# directories with .so files will be blocked earlier
common_files
.
append
(
i
)
elif
islink
(
dir1
):
# skip this symlink in pyshared (dpkg has problems with symlinks anyway)
# skip this symlink in pyshared
# (dpkg has problems with symlinks anyway)
common_dirs
=
[]
common_files
=
[]
else
:
...
...
@@ -488,6 +489,8 @@ def main():
help
=
'
generate maintainer script that will remove pycentral files
'
)
parser
.
add_option
(
'
--ignore-shebangs
'
,
action
=
'
store_true
'
,
default
=
False
,
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
"
)
# ignore some debhelper options:
parser
.
add_option
(
'
-O
'
,
help
=
SUPPRESS_HELP
)
...
...
@@ -572,7 +575,8 @@ def main():
pyclean_added
=
False
# invoke pyclean only once in maintainer script
if
stats
[
'
compile
'
]:
if
options
.
clean_pycentral
:
dh
.
autoscript
(
package
,
'
preinst
'
,
'
preinst-pycentral-clean
'
,
''
)
dh
.
autoscript
(
package
,
'
preinst
'
,
'
preinst-pycentral-clean
'
,
''
)
dh
.
autoscript
(
package
,
'
postinst
'
,
'
postinst-pycompile
'
,
''
)
dh
.
autoscript
(
package
,
'
prerm
'
,
'
prerm-pyclean
'
,
''
)
pyclean_added
=
True
...
...
@@ -622,14 +626,19 @@ def main():
fcopy
(
pydist_file
,
join
(
dstdir
,
package
))
# namespace feature - recreate __init__.py files at install time
nsp
=
ns
.
parse
(
stats
[
'
nsp.txt
'
],
options
.
namespaces
)
if
options
.
ignore_namespace
:
nsp
=
None
else
:
nsp
=
ns
.
parse
(
stats
[
'
nsp.txt
'
],
options
.
namespaces
)
# note that pycompile/pyclean is already added to maintainer scripts
# and it should remain there even if __init__.py was the only .py file
try
:
nsp
=
ns
.
remove_from_package
(
package
,
nsp
,
stats
[
'
public_vers
'
])
except
(
IOError
,
OSError
),
e
:
log
.
error
(
'
cannot remove __init__.py from package: %s
'
,
e
)
exit
(
6
)
if
nsp
:
try
:
nsp
=
ns
.
remove_from_package
(
package
,
nsp
,
stats
[
'
public_vers
'
])
except
(
IOError
,
OSError
),
e
:
log
.
error
(
'
cannot remove __init__.py from package: %s
'
,
e
)
exit
(
6
)
if
nsp
:
dstdir
=
join
(
'
debian
'
,
package
,
'
usr/share/python/ns/
'
)
if
not
exists
(
dstdir
):
...
...
This diff is collapsed.
Click to expand it.
dh_python2.rst
+
5
−
0
View file @
15136f78
...
...
@@ -97,6 +97,11 @@ OPTIONS
--namespace use this option (multiple time if necessary) if
namespace_packages.txt is not complete
--ignore-namespace ignore Egg's namespace declaration and
--namespace option. This option will disable removing (and recreating at
install time) empty __init__.py files. Removing namespace_packages.txt from
egg-info directory has the same effect.
--clean-pycentral generate maintainer script that will remove byte code
generated by python-central helper
...
...
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