Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Adam Mercer
Koji Packager
Commits
927860b4
Verified
Commit
927860b4
authored
May 14, 2019
by
Adam Mercer
Browse files
use distutils to locate rpm executable
parent
e5dc98a7
Changes
1
Show whitespace changes
Inline
Side-by-side
gwkoji/rpm.py
View file @
927860b4
...
...
@@ -20,9 +20,11 @@
"""
import
subprocess
from
distutils.spawn
import
find_executable
# method to get the package name from the source
def
get_package_name_from_source_rpm
(
source
):
cmd
=
[
'rpm'
,
'--queryformat'
,
'%{NAME}'
,
'-qp'
,
source
]
rpm
=
find_executable
(
'rpm'
)
cmd
=
[
rpm
,
'--queryformat'
,
'%{NAME}'
,
'-qp'
,
source
]
return
subprocess
.
check_output
(
cmd
).
decode
()
Write
Preview
Supports
Markdown
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