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
2c91c815
Kaydet (Commit)
2c91c815
authored
Mar 21, 2001
tarafından
Martin v. Löwis
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Patch #409504: Fix regex problems, consider \-continuation lines in Makefile
and Setup.
üst
55f826cd
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
15 additions
and
2 deletions
+15
-2
makeconfig.py
Tools/freeze/makeconfig.py
+2
-2
parsesetup.py
Tools/freeze/parsesetup.py
+13
-0
No files found.
Tools/freeze/makeconfig.py
Dosyayı görüntüle @
2c91c815
...
@@ -12,7 +12,7 @@ def makeconfig(infp, outfp, modules, with_ifdef=0):
...
@@ -12,7 +12,7 @@ def makeconfig(infp, outfp, modules, with_ifdef=0):
line
=
infp
.
readline
()
line
=
infp
.
readline
()
if
not
line
:
break
if
not
line
:
break
outfp
.
write
(
line
)
outfp
.
write
(
line
)
if
m1
and
m1
.
search
(
line
)
>=
0
:
if
m1
and
m1
.
search
(
line
):
m1
=
None
m1
=
None
for
mod
in
modules
:
for
mod
in
modules
:
if
mod
in
never
:
if
mod
in
never
:
...
@@ -22,7 +22,7 @@ def makeconfig(infp, outfp, modules, with_ifdef=0):
...
@@ -22,7 +22,7 @@ def makeconfig(infp, outfp, modules, with_ifdef=0):
outfp
.
write
(
'extern void init
%
s();
\n
'
%
mod
)
outfp
.
write
(
'extern void init
%
s();
\n
'
%
mod
)
if
with_ifdef
:
if
with_ifdef
:
outfp
.
write
(
"#endif
\n
"
)
outfp
.
write
(
"#endif
\n
"
)
elif
m2
and
m2
.
search
(
line
)
>=
0
:
elif
m2
and
m2
.
search
(
line
):
m2
=
None
m2
=
None
for
mod
in
modules
:
for
mod
in
modules
:
if
mod
in
never
:
if
mod
in
never
:
...
...
Tools/freeze/parsesetup.py
Dosyayı görüntüle @
2c91c815
...
@@ -13,11 +13,17 @@ makevardef = re.compile('^([a-zA-Z0-9_]+)[ \t]*=(.*)')
...
@@ -13,11 +13,17 @@ makevardef = re.compile('^([a-zA-Z0-9_]+)[ \t]*=(.*)')
def
getmakevars
(
filename
):
def
getmakevars
(
filename
):
variables
=
{}
variables
=
{}
fp
=
open
(
filename
)
fp
=
open
(
filename
)
pendingline
=
""
try
:
try
:
while
1
:
while
1
:
line
=
fp
.
readline
()
line
=
fp
.
readline
()
if
pendingline
:
line
=
pendingline
+
line
pendingline
=
""
if
not
line
:
if
not
line
:
break
break
if
line
.
endswith
(
'
\\\n
'
):
pendingline
=
line
[:
-
2
]
matchobj
=
makevardef
.
match
(
line
)
matchobj
=
makevardef
.
match
(
line
)
if
not
matchobj
:
if
not
matchobj
:
continue
continue
...
@@ -44,15 +50,22 @@ def getsetupinfo(filename):
...
@@ -44,15 +50,22 @@ def getsetupinfo(filename):
modules
=
{}
modules
=
{}
variables
=
{}
variables
=
{}
fp
=
open
(
filename
)
fp
=
open
(
filename
)
pendingline
=
""
try
:
try
:
while
1
:
while
1
:
line
=
fp
.
readline
()
line
=
fp
.
readline
()
if
pendingline
:
line
=
pendingline
+
line
pendingline
=
""
if
not
line
:
if
not
line
:
break
break
# Strip comments
# Strip comments
i
=
string
.
find
(
line
,
'#'
)
i
=
string
.
find
(
line
,
'#'
)
if
i
>=
0
:
if
i
>=
0
:
line
=
line
[:
i
]
line
=
line
[:
i
]
if
line
.
endswith
(
'
\\\n
'
):
pendingline
=
line
[:
-
2
]
continue
matchobj
=
setupvardef
.
match
(
line
)
matchobj
=
setupvardef
.
match
(
line
)
if
matchobj
:
if
matchobj
:
(
name
,
value
)
=
matchobj
.
group
(
1
,
2
)
(
name
,
value
)
=
matchobj
.
group
(
1
,
2
)
...
...
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