Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
setuptools
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Jérome Perrin
setuptools
Commits
c19ead7f
Commit
c19ead7f
authored
Feb 05, 2012
by
Éric Araujo
Browse files
Options
Browse Files
Download
Plain Diff
Branch merge
parents
ef0dc103
a63bd68d
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
21 additions
and
0 deletions
+21
-0
command/bdist_rpm.py
command/bdist_rpm.py
+12
-0
tests/test_bdist_rpm.py
tests/test_bdist_rpm.py
+9
-0
No files found.
command/bdist_rpm.py
View file @
c19ead7f
...
...
@@ -365,16 +365,28 @@ class bdist_rpm(Command):
self
.
spawn
(
rpm_cmd
)
if
not
self
.
dry_run
:
if
self
.
distribution
.
has_ext_modules
():
pyversion
=
get_python_version
()
else
:
pyversion
=
'any'
if
not
self
.
binary_only
:
srpm
=
os
.
path
.
join
(
rpm_dir
[
'SRPMS'
],
source_rpm
)
assert
(
os
.
path
.
exists
(
srpm
))
self
.
move_file
(
srpm
,
self
.
dist_dir
)
filename
=
os
.
path
.
join
(
self
.
dist_dir
,
source_rpm
)
self
.
distribution
.
dist_files
.
append
(
(
'bdist_rpm'
,
pyversion
,
filename
))
if
not
self
.
source_only
:
for
rpm
in
binary_rpms
:
rpm
=
os
.
path
.
join
(
rpm_dir
[
'RPMS'
],
rpm
)
if
os
.
path
.
exists
(
rpm
):
self
.
move_file
(
rpm
,
self
.
dist_dir
)
filename
=
os
.
path
.
join
(
self
.
dist_dir
,
os
.
path
.
basename
(
rpm
))
self
.
distribution
.
dist_files
.
append
(
(
'bdist_rpm'
,
pyversion
,
filename
))
def
_dist_path
(
self
,
path
):
return
os
.
path
.
join
(
self
.
dist_dir
,
os
.
path
.
basename
(
path
))
...
...
tests/test_bdist_rpm.py
View file @
c19ead7f
...
...
@@ -78,6 +78,10 @@ class BuildRpmTestCase(support.TempdirManager,
dist_created
=
os
.
listdir
(
os
.
path
.
join
(
pkg_dir
,
'dist'
))
self
.
assertTrue
(
'foo-0.1-1.noarch.rpm'
in
dist_created
)
# bug #2945: upload ignores bdist_rpm files
self
.
assertIn
((
'bdist_rpm'
,
'any'
,
'dist/foo-0.1-1.src.rpm'
),
dist
.
dist_files
)
self
.
assertIn
((
'bdist_rpm'
,
'any'
,
'dist/foo-0.1-1.noarch.rpm'
),
dist
.
dist_files
)
def
test_no_optimize_flag
(
self
):
# XXX I am unable yet to make this test work without
...
...
@@ -117,6 +121,11 @@ class BuildRpmTestCase(support.TempdirManager,
dist_created
=
os
.
listdir
(
os
.
path
.
join
(
pkg_dir
,
'dist'
))
self
.
assertTrue
(
'foo-0.1-1.noarch.rpm'
in
dist_created
)
# bug #2945: upload ignores bdist_rpm files
self
.
assertIn
((
'bdist_rpm'
,
'any'
,
'dist/foo-0.1-1.src.rpm'
),
dist
.
dist_files
)
self
.
assertIn
((
'bdist_rpm'
,
'any'
,
'dist/foo-0.1-1.noarch.rpm'
),
dist
.
dist_files
)
os
.
remove
(
os
.
path
.
join
(
pkg_dir
,
'dist'
,
'foo-0.1-1.noarch.rpm'
))
def
test_suite
():
...
...
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