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
6fd287e6
Kaydet (Commit)
6fd287e6
authored
Eki 06, 2011
tarafından
Éric Araujo
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Fix return code of “pysetup run COMMAND” (closes #12222)
üst
8ed34a13
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
19 additions
and
16 deletions
+19
-16
run.py
Lib/packaging/run.py
+3
-2
test_uninstall.py
Lib/packaging/tests/test_uninstall.py
+16
-14
No files found.
Lib/packaging/run.py
Dosyayı görüntüle @
6fd287e6
...
...
@@ -283,10 +283,11 @@ def _run(dispatcher, args, **kw):
dist
.
parse_config_files
()
for
cmd
in
dispatcher
.
commands
:
# FIXME need to catch MetadataMissingError here (from the check command
# e.g.)--or catch any exception, print an error message and exit with 1
dist
.
run_command
(
cmd
,
dispatcher
.
command_options
[
cmd
])
# XXX this is crappy
return
dist
return
0
@action_help
(
"""
\
...
...
Lib/packaging/tests/test_uninstall.py
Dosyayı görüntüle @
6fd287e6
...
...
@@ -4,12 +4,9 @@ import sys
import
logging
import
packaging.util
from
io
import
StringIO
from
packaging.run
import
main
from
packaging.errors
import
PackagingError
from
packaging.install
import
remove
from
packaging.database
import
disable_cache
,
enable_cache
from
packaging.command.install_dist
import
install_dist
from
packaging.tests
import
unittest
,
support
...
...
@@ -47,16 +44,12 @@ class UninstallTestCase(support.TempdirManager,
packaging
.
util
.
_path_created
.
clear
()
super
(
UninstallTestCase
,
self
)
.
tearDown
()
def
run_setup
(
self
,
*
args
):
# run setup with args
args
=
[
'run'
]
+
list
(
args
)
dist
=
main
(
args
)
return
dist
def
get_path
(
self
,
dist
,
name
):
cmd
=
install_dist
(
dist
)
cmd
.
prefix
=
self
.
root_dir
cmd
.
finalize_options
()
# the dist argument must contain an install_dist command correctly
# initialized with a prefix option and finalized befored this method
# can be called successfully; practically, this means that you should
# call self.install_dist before self.get_path
cmd
=
dist
.
get_command_obj
(
'install_dist'
)
return
getattr
(
cmd
,
'install_'
+
name
)
def
make_dist
(
self
,
name
=
'Foo'
,
**
kw
):
...
...
@@ -83,8 +76,17 @@ class UninstallTestCase(support.TempdirManager,
if
not
dirname
:
dirname
=
self
.
make_dist
(
name
,
**
kw
)
os
.
chdir
(
dirname
)
sys
.
stderr
=
StringIO
()
dist
=
self
.
run_setup
(
'install_dist'
,
'--prefix='
+
self
.
root_dir
)
dist
=
support
.
TestDistribution
()
# for some unfathomable reason, the tests will fail horribly if the
# parse_config_files method is not called, even if it doesn't do
# anything useful; trying to build and use a command object manually
# also fails
dist
.
parse_config_files
()
dist
.
finalize_options
()
dist
.
run_command
(
'install_dist'
,
{
'prefix'
:
(
'command line'
,
self
.
root_dir
)})
site_packages
=
self
.
get_path
(
dist
,
'purelib'
)
return
dist
,
site_packages
...
...
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