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
e71fb285
Kaydet (Commit)
e71fb285
authored
Kas 02, 2013
tarafından
Jason R. Coombs
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Sade Fark
Merge with 3.3 for Issue #19286.
üst
32dfef81
ca9242f4
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
36 additions
and
1 deletion
+36
-1
build_py.py
Lib/distutils/command/build_py.py
+2
-1
test_build_py.py
Lib/distutils/tests/test_build_py.py
+31
-0
NEWS
Misc/NEWS
+3
-0
No files found.
Lib/distutils/command/build_py.py
Dosyayı görüntüle @
e71fb285
...
...
@@ -127,7 +127,8 @@ class build_py (Command):
# Each pattern has to be converted to a platform-specific path
filelist
=
glob
(
os
.
path
.
join
(
src_dir
,
convert_path
(
pattern
)))
# Files that match more than one pattern are only added once
files
.
extend
([
fn
for
fn
in
filelist
if
fn
not
in
files
])
files
.
extend
([
fn
for
fn
in
filelist
if
fn
not
in
files
and
os
.
path
.
isfile
(
fn
)])
return
files
def
build_package_data
(
self
):
...
...
Lib/distutils/tests/test_build_py.py
Dosyayı görüntüle @
e71fb285
...
...
@@ -123,6 +123,37 @@ class BuildPyTestCase(support.TempdirManager,
self
.
assertEqual
(
sorted
(
found
),
[
'boiledeggs.
%
s.pyo'
%
sys
.
implementation
.
cache_tag
])
def
test_dir_in_package_data
(
self
):
"""
A directory in package_data should not be added to the filelist.
"""
# See bug 19286
sources
=
self
.
mkdtemp
()
pkg_dir
=
os
.
path
.
join
(
sources
,
"pkg"
)
os
.
mkdir
(
pkg_dir
)
open
(
os
.
path
.
join
(
pkg_dir
,
"__init__.py"
),
"w"
)
.
close
()
docdir
=
os
.
path
.
join
(
pkg_dir
,
"doc"
)
os
.
mkdir
(
docdir
)
open
(
os
.
path
.
join
(
docdir
,
"testfile"
),
"w"
)
.
close
()
# create the directory that could be incorrectly detected as a file
os
.
mkdir
(
os
.
path
.
join
(
docdir
,
'otherdir'
))
os
.
chdir
(
sources
)
dist
=
Distribution
({
"packages"
:
[
"pkg"
],
"package_data"
:
{
"pkg"
:
[
"doc/*"
]}})
# script_name need not exist, it just need to be initialized
dist
.
script_name
=
os
.
path
.
join
(
sources
,
"setup.py"
)
dist
.
script_args
=
[
"build"
]
dist
.
parse_command_line
()
try
:
dist
.
run_commands
()
except
DistutilsFileError
:
self
.
fail
(
"failed package_data when data dir includes a dir"
)
def
test_dont_write_bytecode
(
self
):
# makes sure byte_compile is not used
dist
=
self
.
create_dist
()[
1
]
...
...
Misc/NEWS
Dosyayı görüntüle @
e71fb285
...
...
@@ -31,6 +31,9 @@ Core and Builtins
Library
-------
- Issue #19286: Directories in ``package_data`` are no longer added to
the filelist, preventing failure outlined in the ticket.
- Issue #15114: The html.parser module now raises a DeprecationWarning when the
strict argument of HTMLParser or the HTMLParser.error method are used.
...
...
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