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
49b0ce06
Kaydet (Commit)
49b0ce06
authored
Mar 27, 2011
tarafından
Martin v. Löwis
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Fix short file name generation in bdist_msi.
Patch by Christoph Gohlke. Closes #7639.
üst
8c05568e
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
19 additions
and
8 deletions
+19
-8
__init__.py
Lib/msilib/__init__.py
+17
-8
NEWS
Misc/NEWS
+2
-0
No files found.
Lib/msilib/__init__.py
Dosyayı görüntüle @
49b0ce06
...
@@ -174,10 +174,10 @@ def add_tables(db, module):
...
@@ -174,10 +174,10 @@ def add_tables(db, module):
def
make_id
(
str
):
def
make_id
(
str
):
#str = str.replace(".", "_") # colons are allowed
#str = str.replace(".", "_") # colons are allowed
str
=
str
.
replace
(
" "
,
"_"
)
for
c
in
" -+~;"
:
str
=
str
.
replace
(
"-"
,
"_"
)
str
=
str
.
replace
(
c
,
"_"
)
if
str
[
0
]
in
string
.
digits
:
if
str
[
0
]
in
(
string
.
digits
+
"."
)
:
str
=
"_"
+
str
str
=
"_"
+
str
assert
re
.
match
(
"^[A-Za-z_][A-Za-z0-9_.]*$"
,
str
),
"FILE"
+
str
assert
re
.
match
(
"^[A-Za-z_][A-Za-z0-9_.]*$"
,
str
),
"FILE"
+
str
return
str
return
str
...
@@ -285,19 +285,28 @@ class Directory:
...
@@ -285,19 +285,28 @@ class Directory:
[(
feature
.
id
,
component
)])
[(
feature
.
id
,
component
)])
def
make_short
(
self
,
file
):
def
make_short
(
self
,
file
):
oldfile
=
file
file
=
file
.
replace
(
'+'
,
'_'
)
file
=
''
.
join
(
c
for
c
in
file
if
not
c
in
' "/
\
[]:;=,'
)
parts
=
file
.
split
(
"."
)
parts
=
file
.
split
(
"."
)
if
len
(
parts
)
>
1
:
if
len
(
parts
)
>
1
:
prefix
=
""
.
join
(
parts
[:
-
1
])
.
upper
()
suffix
=
parts
[
-
1
]
.
upper
()
suffix
=
parts
[
-
1
]
.
upper
()
if
not
prefix
:
prefix
=
suffix
suffix
=
None
else
:
else
:
prefix
=
file
.
upper
()
suffix
=
None
suffix
=
None
prefix
=
parts
[
0
]
.
upper
()
if
len
(
parts
)
<
3
and
len
(
prefix
)
<=
8
and
file
==
oldfile
and
(
if
len
(
prefix
)
<=
8
and
(
not
suffix
or
len
(
suffix
)
<=
3
):
not
suffix
or
len
(
suffix
)
<=
3
):
if
suffix
:
if
suffix
:
file
=
prefix
+
"."
+
suffix
file
=
prefix
+
"."
+
suffix
else
:
else
:
file
=
prefix
file
=
prefix
assert
file
not
in
self
.
short_names
else
:
else
:
file
=
None
if
file
is
None
or
file
in
self
.
short_names
:
prefix
=
prefix
[:
6
]
prefix
=
prefix
[:
6
]
if
suffix
:
if
suffix
:
suffix
=
suffix
[:
3
]
suffix
=
suffix
[:
3
]
...
...
Misc/NEWS
Dosyayı görüntüle @
49b0ce06
...
@@ -51,6 +51,8 @@ Core and Builtins
...
@@ -51,6 +51,8 @@ Core and Builtins
Library
Library
-------
-------
- Issue #7639: Fix short file name generation in bdist_msi.
- Issue #11666: let help() display named tuple attributes and methods
- Issue #11666: let help() display named tuple attributes and methods
that start with a leading underscore.
that start with a leading underscore.
...
...
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