Skip to content
Projeler
Gruplar
Parçacıklar
Yardım
Yükleniyor...
Oturum aç / Kaydol
Gezinmeyi değiştir
C
cpython
Proje
Proje
Ayrıntılar
Etkinlik
Cycle Analytics
Depo (repository)
Depo (repository)
Dosyalar
Kayıtlar (commit)
Dallar (branch)
Etiketler
Katkıda bulunanlar
Grafik
Karşılaştır
Grafikler
Konular (issue)
0
Konular (issue)
0
Liste
Pano
Etiketler
Kilometre Taşları
Birleştirme (merge) Talepleri
0
Birleştirme (merge) Talepleri
0
CI / CD
CI / CD
İş akışları (pipeline)
İşler
Zamanlamalar
Grafikler
Paketler
Paketler
Wiki
Wiki
Parçacıklar
Parçacıklar
Üyeler
Üyeler
Collapse sidebar
Close sidebar
Etkinlik
Grafik
Grafikler
Yeni bir konu (issue) oluştur
İşler
Kayıtlar (commit)
Konu (issue) Panoları
Kenar çubuğunu aç
Batuhan Osman TASKAYA
cpython
Commits
ce45a967
Kaydet (Commit)
ce45a967
authored
Mar 02, 2009
tarafından
Tarek Ziadé
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
removing the force-optimized option as discussed in #1533164
üst
ae91d090
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
43 deletions
+3
-43
bdist_rpm.py
Lib/distutils/command/bdist_rpm.py
+3
-18
test_bdist_rpm.py
Lib/distutils/tests/test_bdist_rpm.py
+0
-25
No files found.
Lib/distutils/command/bdist_rpm.py
Dosyayı görüntüle @
ce45a967
...
...
@@ -126,18 +126,10 @@ class bdist_rpm (Command):
(
'quiet'
,
'q'
,
"Run the INSTALL phase of RPM building in quiet mode"
),
# Forces the -O1 option when calling the install command,
# so the rpm contains all files needed for proper operation under
# SELinux. Some systems checks for this on build-time and will
# fail without this.
(
'force-optimize'
,
None
,
"Forces the -O1 option when calling the install command"
),
]
boolean_options
=
[
'keep-temp'
,
'use-rpm-opt-flags'
,
'rpm3-mode'
,
'no-autoreq'
,
'quiet'
,
'force-optimize'
]
'no-autoreq'
,
'quiet'
]
negative_opt
=
{
'no-keep-temp'
:
'keep-temp'
,
'no-rpm-opt-flags'
:
'use-rpm-opt-flags'
,
...
...
@@ -188,7 +180,6 @@ class bdist_rpm (Command):
self
.
force_arch
=
None
self
.
quiet
=
0
self
.
force_optimize
=
1
# initialize_options()
...
...
@@ -504,14 +495,8 @@ class bdist_rpm (Command):
# that we open and interpolate into the spec file, but the defaults
# are just text that we drop in as-is. Hmmm.
# forcing -O1 if force-optimize
if
self
.
force_optimize
:
optimize
=
' -O1'
else
:
optimize
=
''
install_cmd
=
(
'
%
s install
%
s --root=$RPM_BUILD_ROOT '
'--record=INSTALLED_FILES'
)
%
(
def_setup_call
,
optimize
)
install_cmd
=
(
'
%
s install -O1 --root=$RPM_BUILD_ROOT '
'--record=INSTALLED_FILES'
)
%
def_setup_call
script_options
=
[
(
'prep'
,
'prep_script'
,
"
%
setup -n
%
{name}-
%
{unmangled_version}"
),
...
...
Lib/distutils/tests/test_bdist_rpm.py
Dosyayı görüntüle @
ce45a967
...
...
@@ -109,8 +109,6 @@ class BuildRpmTestCase(support.TempdirManager,
cmd
=
bdist_rpm
(
dist
)
cmd
.
fix_python
=
True
# running with force-optimize = 1
# and quiet = 1
cmd
.
quiet
=
1
cmd
.
ensure_finalized
()
cmd
.
run
()
...
...
@@ -119,29 +117,6 @@ class BuildRpmTestCase(support.TempdirManager,
self
.
assert_
(
'foo-0.1-1.noarch.rpm'
in
dist_created
)
os
.
remove
(
os
.
path
.
join
(
pkg_dir
,
'dist'
,
'foo-0.1-1.noarch.rpm'
))
# XXX I am unable yet to make this test work without
# spurious stderr output
# so returning until distutils.spawn acts better
return
# running with force-optimize = 0
cmd
.
force_optimize
=
0
try
:
# XXX How to prevent the spawned
# rpmbuild command to display errors ?
# this can be a problem for buildbots
cmd
.
ensure_finalized
()
cmd
.
run
()
except
DistutilsExecError
:
# happens only under Fedora/RedHat
# and some flavors of Linux
# otherwise it's a bug
if
sys
.
platform
==
'linux2'
:
return
dist_created
=
os
.
listdir
(
os
.
path
.
join
(
pkg_dir
,
'dist'
))
self
.
assert_
(
'foo-0.1-1.noarch.rpm'
in
dist_created
)
def
test_suite
():
return
unittest
.
makeSuite
(
BuildRpmTestCase
)
...
...
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