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
646ddec4
Kaydet (Commit)
646ddec4
authored
Ock 28, 2001
tarafından
Martin v. Löwis
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Allow installation of IDLE via distutils (patch #103138).
üst
5838d0fc
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
93 additions
and
0 deletions
+93
-0
idle
Tools/idle/idle
+12
-0
setup.py
Tools/idle/setup.py
+81
-0
No files found.
Tools/idle/idle
0 → 100755
Dosyayı görüntüle @
646ddec4
#! /usr/bin/env python
import
os
import
sys
from
idlelib
import
IdleConf
idle_dir
=
os
.
path
.
dirname
(
IdleConf
.
__file__
)
IdleConf
.
load
(
idle_dir
)
# defer importing Pyshell until IdleConf is loaded
from
idlelib
import
PyShell
PyShell
.
main
()
Tools/idle/setup.py
0 → 100644
Dosyayı görüntüle @
646ddec4
import
os
,
glob
from
distutils.core
import
setup
from
distutils.command.build_py
import
build_py
from
distutils.command.install_lib
import
install_lib
import
idlever
# name of idle package
idlelib
=
"idlelib"
# the normal build_py would not incorporate the .txt files
txt_files
=
[
'config-unix.txt'
,
'config-win.txt'
,
'config.txt'
]
Icons
=
glob
.
glob1
(
"Icons"
,
"*.gif"
)
class
idle_build_py
(
build_py
):
def
get_plain_outfile
(
self
,
build_dir
,
package
,
file
):
# like get_module_outfile, but does not append .py
outfile_path
=
[
build_dir
]
+
list
(
package
)
+
[
file
]
return
apply
(
os
.
path
.
join
,
outfile_path
)
def
run
(
self
):
# Copies all .py files, then also copies the txt and gif files
build_py
.
run
(
self
)
assert
self
.
packages
==
[
idlelib
]
for
name
in
txt_files
:
outfile
=
self
.
get_plain_outfile
(
self
.
build_lib
,
[
idlelib
],
name
)
dir
=
os
.
path
.
dirname
(
outfile
)
self
.
mkpath
(
dir
)
self
.
copy_file
(
name
,
outfile
,
preserve_mode
=
0
)
for
name
in
Icons
:
outfile
=
self
.
get_plain_outfile
(
self
.
build_lib
,
[
idlelib
,
"Icons"
],
name
)
dir
=
os
.
path
.
dirname
(
outfile
)
self
.
mkpath
(
dir
)
self
.
copy_file
(
os
.
path
.
join
(
"Icons"
,
name
),
outfile
,
preserve_mode
=
0
)
def
get_source_files
(
self
):
# returns the .py files, the .txt files, and the icons
icons
=
[
os
.
path
.
join
(
"Icons"
,
name
)
for
name
in
Icons
]
return
build_py
.
get_source_files
(
self
)
+
txt_files
+
icons
def
get_outputs
(
self
,
include_bytecode
=
1
):
# returns the built files
outputs
=
build_py
.
get_outputs
(
self
,
include_bytecode
)
if
not
include_bytecode
:
return
outputs
for
name
in
txt_files
:
filename
=
self
.
get_plain_outfile
(
self
.
build_lib
,
[
idlelib
],
name
)
outputs
.
append
(
filename
)
for
name
in
Icons
:
filename
=
self
.
get_plain_outfile
(
self
.
build_lib
,
[
idlelib
,
"Icons"
],
name
)
outputs
.
append
(
filename
)
return
outputs
# Arghhh. install_lib thinks that all files returned from build_py's
# get_outputs are bytecode files
class
idle_install_lib
(
install_lib
):
def
_bytecode_filenames
(
self
,
files
):
files
=
[
n
for
n
in
files
if
n
.
endswith
(
'.py'
)]
return
install_lib
.
_bytecode_filenames
(
self
,
files
)
setup
(
name
=
"IDLE"
,
version
=
idlever
.
IDLE_VERSION
,
description
=
"IDLE, the Python IDE"
,
author
=
"Guido van Rossum"
,
author_email
=
"guido@python.org"
,
#url =
long_description
=
"""IDLE is a Tkinter based IDE for Python. It is written in 100
%
pure
Python and works both on Windows and Unix. It features a multi-window
text editor with multiple undo, Python colorizing, and many other things,
as well as a Python shell window and a debugger."""
,
cmdclass
=
{
'build_py'
:
idle_build_py
,
'install_lib'
:
idle_install_lib
},
package_dir
=
{
idlelib
:
'.'
},
packages
=
[
idlelib
],
scripts
=
[
'idle'
]
)
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