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
9f5c0c41
Kaydet (Commit)
9f5c0c41
authored
Agu 25, 2004
tarafından
Martin v. Löwis
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Patch #736857, #736859: Add -e option to build_scripts.
üst
be83737c
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
16 additions
and
3 deletions
+16
-3
dist.tex
Doc/dist/dist.tex
+3
-1
build.py
Lib/distutils/command/build.py
+5
-0
build_scripts.py
Lib/distutils/command/build_scripts.py
+5
-2
NEWS
Misc/NEWS
+3
-0
No files found.
Doc/dist/dist.tex
Dosyayı görüntüle @
9f5c0c41
...
@@ -640,7 +640,9 @@ started from the command line. Scripts don't require Distutils to do
...
@@ -640,7 +640,9 @@ started from the command line. Scripts don't require Distutils to do
anything very complicated. The only clever feature is that if the
anything very complicated. The only clever feature is that if the
first line of the script starts with
\code
{
\#
!
}
and contains the word
first line of the script starts with
\code
{
\#
!
}
and contains the word
``python'', the Distutils will adjust the first line to refer to the
``python'', the Distutils will adjust the first line to refer to the
current interpreter location.
current interpreter location. By default, it is replaced with the
current interpreter location. The '--executable=/-e' switch will
allow the interpreter path to be explicitly overridden.
The
\option
{
scripts
}
option simply is a list of files to be handled
The
\option
{
scripts
}
option simply is a list of files to be handled
in this way. From the PyXML setup script:
in this way. From the PyXML setup script:
...
...
Lib/distutils/command/build.py
Dosyayı görüntüle @
9f5c0c41
...
@@ -40,6 +40,8 @@ class build (Command):
...
@@ -40,6 +40,8 @@ class build (Command):
"compile extensions and libraries with debugging information"
),
"compile extensions and libraries with debugging information"
),
(
'force'
,
'f'
,
(
'force'
,
'f'
,
"forcibly build everything (ignore file timestamps)"
),
"forcibly build everything (ignore file timestamps)"
),
(
'executable='
,
'e'
,
"specify final destination interpreter path (build.py)"
),
]
]
boolean_options
=
[
'debug'
,
'force'
]
boolean_options
=
[
'debug'
,
'force'
]
...
@@ -61,6 +63,7 @@ class build (Command):
...
@@ -61,6 +63,7 @@ class build (Command):
self
.
compiler
=
None
self
.
compiler
=
None
self
.
debug
=
None
self
.
debug
=
None
self
.
force
=
0
self
.
force
=
0
self
.
executable
=
None
def
finalize_options
(
self
):
def
finalize_options
(
self
):
...
@@ -93,6 +96,8 @@ class build (Command):
...
@@ -93,6 +96,8 @@ class build (Command):
self
.
build_scripts
=
os
.
path
.
join
(
self
.
build_base
,
self
.
build_scripts
=
os
.
path
.
join
(
self
.
build_base
,
'scripts-'
+
sys
.
version
[
0
:
3
])
'scripts-'
+
sys
.
version
[
0
:
3
])
if
self
.
executable
is
None
:
self
.
executable
=
os
.
path
.
normpath
(
sys
.
executable
)
# finalize_options ()
# finalize_options ()
...
...
Lib/distutils/command/build_scripts.py
Dosyayı görüntüle @
9f5c0c41
...
@@ -24,6 +24,7 @@ class build_scripts (Command):
...
@@ -24,6 +24,7 @@ class build_scripts (Command):
user_options
=
[
user_options
=
[
(
'build-dir='
,
'd'
,
"directory to
\"
build
\"
(copy) to"
),
(
'build-dir='
,
'd'
,
"directory to
\"
build
\"
(copy) to"
),
(
'force'
,
'f'
,
"forcibly build everything (ignore file timestamps"
),
(
'force'
,
'f'
,
"forcibly build everything (ignore file timestamps"
),
(
'executable='
,
'e'
,
"specify final destination interpreter path"
),
]
]
boolean_options
=
[
'force'
]
boolean_options
=
[
'force'
]
...
@@ -33,12 +34,14 @@ class build_scripts (Command):
...
@@ -33,12 +34,14 @@ class build_scripts (Command):
self
.
build_dir
=
None
self
.
build_dir
=
None
self
.
scripts
=
None
self
.
scripts
=
None
self
.
force
=
None
self
.
force
=
None
self
.
executable
=
None
self
.
outfiles
=
None
self
.
outfiles
=
None
def
finalize_options
(
self
):
def
finalize_options
(
self
):
self
.
set_undefined_options
(
'build'
,
self
.
set_undefined_options
(
'build'
,
(
'build_scripts'
,
'build_dir'
),
(
'build_scripts'
,
'build_dir'
),
(
'force'
,
'force'
))
(
'force'
,
'force'
),
(
'executable'
,
'executable'
))
self
.
scripts
=
self
.
distribution
.
scripts
self
.
scripts
=
self
.
distribution
.
scripts
def
get_source_files
(
self
):
def
get_source_files
(
self
):
...
@@ -95,7 +98,7 @@ class build_scripts (Command):
...
@@ -95,7 +98,7 @@ class build_scripts (Command):
outf
=
open
(
outfile
,
"w"
)
outf
=
open
(
outfile
,
"w"
)
if
not
sysconfig
.
python_build
:
if
not
sysconfig
.
python_build
:
outf
.
write
(
"#!
%
s
%
s
\n
"
%
outf
.
write
(
"#!
%
s
%
s
\n
"
%
(
os
.
path
.
normpath
(
sys
.
executable
)
,
(
self
.
executable
,
post_interp
))
post_interp
))
else
:
else
:
outf
.
write
(
"#!
%
s
%
s
\n
"
%
outf
.
write
(
"#!
%
s
%
s
\n
"
%
...
...
Misc/NEWS
Dosyayı görüntüle @
9f5c0c41
...
@@ -57,6 +57,9 @@ Extension modules
...
@@ -57,6 +57,9 @@ Extension modules
Library
Library
-------
-------
-
distutils
build
/
build_scripts
now
has
an
-
e
option
to
specify
the
path
to
the
Python
interpreter
for
installed
scripts
.
-
PEP
292
classes
Template
and
SafeTemplate
are
added
to
the
string
module
.
-
PEP
292
classes
Template
and
SafeTemplate
are
added
to
the
string
module
.
-
tarfile
now
generates
GNU
tar
files
by
default
.
-
tarfile
now
generates
GNU
tar
files
by
default
.
...
...
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