Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
diffoscope
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
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
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Reproducible Builds
diffoscope
Commits
c341b63a
Commit
c341b63a
authored
2 years ago
by
Chris Lamb
Browse files
Options
Downloads
Patches
Plain Diff
Split inline Python code to generate Recommends to a separate Python script.
parent
a0b80552
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Pipeline
#487510
passed with warnings
2 years ago
Stage: test
Stage: deploy
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
debian/tests/control.sh
+1
-5
1 addition, 5 deletions
debian/tests/control.sh
debian/tests/generate-recommends.py
+15
-0
15 additions, 0 deletions
debian/tests/generate-recommends.py
with
16 additions
and
5 deletions
debian/tests/control.sh
+
1
−
5
View file @
c341b63a
...
...
@@ -12,11 +12,7 @@ cat debian/tests/control.in >> debian/tests/control.tmp
sed
-i
"s#%RECOMMENDS%#
$(
bin/diffoscope
--list-debian-substvars
|
awk
-F
=
'/diffoscope:Recommends/ { print $2 }'
)
#"
debian/tests/control.tmp
sed
-i
"s#%PYRECOMMENDS%#
$(
python3
-c
"from pep517 import meta;
\
from pip._internal.req.constructors import install_req_from_req_string;
\
dist = meta.load('.');
\
print(', '.join([f'python3-{install_req_from_req_string(req).name}' for req in sorted(dist.requires) if install_req_from_req_string(req).markers]))"
\
)
#"
debian/tests/control.tmp
sed
-i
"s#%PYRECOMMENDS%#
$(
debian/tests/generate-recommends.py
)
#"
debian/tests/control.tmp
# Don't test-depend on radare2; not in bullseye for security reasons. (#950372)
sed
-i
"s#radare2, ##"
debian/tests/control.tmp
...
...
This diff is collapsed.
Click to expand it.
debian/tests/generate-recommends.py
0 → 100755
+
15
−
0
View file @
c341b63a
#!/usr/bin/env python3
from
pep517
import
meta
from
pip._internal.req.constructors
import
install_req_from_req_string
dist
=
meta
.
load
(
"
.
"
)
xs
=
set
(
f
"
python3-
{
install_req_from_req_string
(
x
).
name
}
"
for
x
in
dist
.
requires
if
install_req_from_req_string
(
x
).
markers
)
print
(
"
,
"
.
join
(
sorted
(
xs
)))
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