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
fbe37dff
Kaydet (Commit)
fbe37dff
authored
Agu 29, 2011
tarafından
Éric Araujo
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Make bdist_* commands respect --skip-build passed to bdist (#10946)
üst
aa26b275
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
43 additions
and
25 deletions
+43
-25
bdist_dumb.py
Lib/distutils/command/bdist_dumb.py
+3
-2
bdist_msi.py
Lib/distutils/command/bdist_msi.py
+5
-1
bdist_wininst.py
Lib/distutils/command/bdist_wininst.py
+5
-1
test_bdist.py
Lib/distutils/tests/test_bdist.py
+27
-21
NEWS
Misc/NEWS
+3
-0
No files found.
Lib/distutils/command/bdist_dumb.py
Dosyayı görüntüle @
fbe37dff
...
@@ -47,7 +47,7 @@ class bdist_dumb(Command):
...
@@ -47,7 +47,7 @@ class bdist_dumb(Command):
self
.
format
=
None
self
.
format
=
None
self
.
keep_temp
=
0
self
.
keep_temp
=
0
self
.
dist_dir
=
None
self
.
dist_dir
=
None
self
.
skip_build
=
0
self
.
skip_build
=
None
self
.
relative
=
0
self
.
relative
=
0
def
finalize_options
(
self
):
def
finalize_options
(
self
):
...
@@ -65,7 +65,8 @@ class bdist_dumb(Command):
...
@@ -65,7 +65,8 @@ class bdist_dumb(Command):
self
.
set_undefined_options
(
'bdist'
,
self
.
set_undefined_options
(
'bdist'
,
(
'dist_dir'
,
'dist_dir'
),
(
'dist_dir'
,
'dist_dir'
),
(
'plat_name'
,
'plat_name'
))
(
'plat_name'
,
'plat_name'
),
(
'skip_build'
,
'skip_build'
))
def
run
(
self
):
def
run
(
self
):
if
not
self
.
skip_build
:
if
not
self
.
skip_build
:
...
...
Lib/distutils/command/bdist_msi.py
Dosyayı görüntüle @
fbe37dff
...
@@ -130,18 +130,22 @@ class bdist_msi(Command):
...
@@ -130,18 +130,22 @@ class bdist_msi(Command):
self
.
no_target_optimize
=
0
self
.
no_target_optimize
=
0
self
.
target_version
=
None
self
.
target_version
=
None
self
.
dist_dir
=
None
self
.
dist_dir
=
None
self
.
skip_build
=
0
self
.
skip_build
=
None
self
.
install_script
=
None
self
.
install_script
=
None
self
.
pre_install_script
=
None
self
.
pre_install_script
=
None
self
.
versions
=
None
self
.
versions
=
None
def
finalize_options
(
self
):
def
finalize_options
(
self
):
self
.
set_undefined_options
(
'bdist'
,
(
'skip_build'
,
'skip_build'
))
if
self
.
bdist_dir
is
None
:
if
self
.
bdist_dir
is
None
:
bdist_base
=
self
.
get_finalized_command
(
'bdist'
)
.
bdist_base
bdist_base
=
self
.
get_finalized_command
(
'bdist'
)
.
bdist_base
self
.
bdist_dir
=
os
.
path
.
join
(
bdist_base
,
'msi'
)
self
.
bdist_dir
=
os
.
path
.
join
(
bdist_base
,
'msi'
)
short_version
=
get_python_version
()
short_version
=
get_python_version
()
if
(
not
self
.
target_version
)
and
self
.
distribution
.
has_ext_modules
():
if
(
not
self
.
target_version
)
and
self
.
distribution
.
has_ext_modules
():
self
.
target_version
=
short_version
self
.
target_version
=
short_version
if
self
.
target_version
:
if
self
.
target_version
:
self
.
versions
=
[
self
.
target_version
]
self
.
versions
=
[
self
.
target_version
]
if
not
self
.
skip_build
and
self
.
distribution
.
has_ext_modules
()
\
if
not
self
.
skip_build
and
self
.
distribution
.
has_ext_modules
()
\
...
...
Lib/distutils/command/bdist_wininst.py
Dosyayı görüntüle @
fbe37dff
...
@@ -65,13 +65,15 @@ class bdist_wininst(Command):
...
@@ -65,13 +65,15 @@ class bdist_wininst(Command):
self
.
dist_dir
=
None
self
.
dist_dir
=
None
self
.
bitmap
=
None
self
.
bitmap
=
None
self
.
title
=
None
self
.
title
=
None
self
.
skip_build
=
0
self
.
skip_build
=
None
self
.
install_script
=
None
self
.
install_script
=
None
self
.
pre_install_script
=
None
self
.
pre_install_script
=
None
self
.
user_access_control
=
None
self
.
user_access_control
=
None
def
finalize_options
(
self
):
def
finalize_options
(
self
):
self
.
set_undefined_options
(
'bdist'
,
(
'skip_build'
,
'skip_build'
))
if
self
.
bdist_dir
is
None
:
if
self
.
bdist_dir
is
None
:
if
self
.
skip_build
and
self
.
plat_name
:
if
self
.
skip_build
and
self
.
plat_name
:
# If build is skipped and plat_name is overridden, bdist will
# If build is skipped and plat_name is overridden, bdist will
...
@@ -81,8 +83,10 @@ class bdist_wininst(Command):
...
@@ -81,8 +83,10 @@ class bdist_wininst(Command):
# next the command will be initialized using that name
# next the command will be initialized using that name
bdist_base
=
self
.
get_finalized_command
(
'bdist'
)
.
bdist_base
bdist_base
=
self
.
get_finalized_command
(
'bdist'
)
.
bdist_base
self
.
bdist_dir
=
os
.
path
.
join
(
bdist_base
,
'wininst'
)
self
.
bdist_dir
=
os
.
path
.
join
(
bdist_base
,
'wininst'
)
if
not
self
.
target_version
:
if
not
self
.
target_version
:
self
.
target_version
=
""
self
.
target_version
=
""
if
not
self
.
skip_build
and
self
.
distribution
.
has_ext_modules
():
if
not
self
.
skip_build
and
self
.
distribution
.
has_ext_modules
():
short_version
=
get_python_version
()
short_version
=
get_python_version
()
if
self
.
target_version
and
self
.
target_version
!=
short_version
:
if
self
.
target_version
and
self
.
target_version
!=
short_version
:
...
...
Lib/distutils/tests/test_bdist.py
Dosyayı görüntüle @
fbe37dff
"""Tests for distutils.command.bdist."""
"""Tests for distutils.command.bdist."""
import
unittest
import
sys
import
os
import
os
import
tempfile
import
unittest
import
shutil
from
test.support
import
run_unittest
from
test.support
import
run_unittest
from
distutils.core
import
Distribution
from
distutils.command.bdist
import
bdist
from
distutils.command.bdist
import
bdist
from
distutils.tests
import
support
from
distutils.tests
import
support
from
distutils.spawn
import
find_executable
from
distutils
import
spawn
from
distutils.errors
import
DistutilsExecError
class
BuildTestCase
(
support
.
TempdirManager
,
class
BuildTestCase
(
support
.
TempdirManager
,
unittest
.
TestCase
):
unittest
.
TestCase
):
def
test_formats
(
self
):
def
test_formats
(
self
):
# let's create a command and make sure
# let's create a command and make sure
# we can
fix
the format
# we can
set
the format
pkg_pth
,
dist
=
self
.
create_dist
()
dist
=
self
.
create_dist
()[
1
]
cmd
=
bdist
(
dist
)
cmd
=
bdist
(
dist
)
cmd
.
formats
=
[
'msi'
]
cmd
.
formats
=
[
'msi'
]
cmd
.
ensure_finalized
()
cmd
.
ensure_finalized
()
self
.
assertEqual
(
cmd
.
formats
,
[
'msi'
])
self
.
assertEqual
(
cmd
.
formats
,
[
'msi'
])
# what format bdist offers ?
# what formats does bdist offer?
# XXX an explicit list in bdist is
formats
=
[
'bztar'
,
'gztar'
,
'msi'
,
'rpm'
,
'tar'
,
# not the best way to bdist_* commands
'wininst'
,
'zip'
,
'ztar'
]
# we should add a registry
found
=
sorted
(
cmd
.
format_command
)
formats
=
[
'rpm'
,
'zip'
,
'gztar'
,
'bztar'
,
'ztar'
,
self
.
assertEqual
(
found
,
formats
)
'tar'
,
'wininst'
,
'msi'
]
formats
.
sort
()
def
test_skip_build
(
self
):
founded
=
list
(
cmd
.
format_command
.
keys
())
# bug #10946: bdist --skip-build should trickle down to subcommands
founded
.
sort
()
dist
=
self
.
create_dist
()[
1
]
self
.
assertEqual
(
founded
,
formats
)
cmd
=
bdist
(
dist
)
cmd
.
skip_build
=
1
cmd
.
ensure_finalized
()
dist
.
command_obj
[
'bdist'
]
=
cmd
names
=
[
'bdist_dumb'
,
'bdist_wininst'
]
# bdist_rpm does not support --skip-build
if
os
.
name
==
'nt'
:
names
.
append
(
'bdist_msi'
)
for
name
in
names
:
subcmd
=
cmd
.
get_finalized_command
(
name
)
self
.
assertTrue
(
subcmd
.
skip_build
,
'
%
s should take --skip-build from bdist'
%
name
)
def
test_suite
():
def
test_suite
():
return
unittest
.
makeSuite
(
BuildTestCase
)
return
unittest
.
makeSuite
(
BuildTestCase
)
...
...
Misc/NEWS
Dosyayı görüntüle @
fbe37dff
...
@@ -22,6 +22,9 @@ Core and Builtins
...
@@ -22,6 +22,9 @@ Core and Builtins
Library
Library
-------
-------
- Issue #10946: The distutils commands bdist_dumb, bdist_wininst and bdist_msi
now respect a --skip-build option given to bdist.
- Issue #12287: Fix a stack corruption in ossaudiodev module when the FD is
- Issue #12287: Fix a stack corruption in ossaudiodev module when the FD is
greater than FD_SETSIZE.
greater than FD_SETSIZE.
...
...
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