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
e557f355
Kaydet (Commit)
e557f355
authored
Şub 28, 2003
tarafından
Andrew M. Kuchling
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
[Patch #695090 from Bernhard Herzog] Allow specifying both py_modules and packages
üst
6156a2d0
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
20 deletions
+6
-20
build_py.py
Lib/distutils/command/build_py.py
+6
-20
No files found.
Lib/distutils/command/build_py.py
Dosyayı görüntüle @
e557f355
...
...
@@ -86,25 +86,11 @@ class build_py (Command):
# Two options control which modules will be installed: 'packages'
# and 'py_modules'. The former lets us work with whole packages, not
# specifying individual modules at all; the latter is for
# specifying modules one-at-a-time. Currently they are mutually
# exclusive: you can define one or the other (or neither), but not
# both. It remains to be seen how limiting this is.
# Dispose of the two "unusual" cases first: no pure Python modules
# at all (no problem, just return silently), and over-specified
# 'packages' and 'py_modules' options.
if
not
self
.
py_modules
and
not
self
.
packages
:
return
if
self
.
py_modules
and
self
.
packages
:
raise
DistutilsOptionError
,
\
"build_py: supplying both 'packages' and 'py_modules' "
+
\
"options is not allowed"
# Now we're down to two cases: 'py_modules' only and 'packages' only.
# specifying modules one-at-a-time.
if
self
.
py_modules
:
self
.
build_modules
()
else
:
if
self
.
packages
:
self
.
build_packages
()
self
.
byte_compile
(
self
.
get_outputs
(
include_bytecode
=
0
))
...
...
@@ -276,10 +262,10 @@ class build_py (Command):
(package, module, module_file), just like 'find_modules()' and
'find_package_modules()' do."""
modules
=
[]
if
self
.
py_modules
:
modules
=
self
.
find_modules
()
else
:
modules
=
[]
modules
.
extend
(
self
.
find_modules
())
if
self
.
packages
:
for
package
in
self
.
packages
:
package_dir
=
self
.
get_package_dir
(
package
)
m
=
self
.
find_package_modules
(
package
,
package_dir
)
...
...
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