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
3fbcc60e
Kaydet (Commit)
3fbcc60e
authored
Haz 29, 2009
tarafından
Tarek Ziadé
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Fixed 6365: wrong inplace location for build_ext if the extension had dots
üst
5c3dd9a1
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
22 additions
and
7 deletions
+22
-7
build_ext.py
Lib/distutils/command/build_ext.py
+4
-4
test_build_ext.py
Lib/distutils/tests/test_build_ext.py
+15
-3
NEWS
Misc/NEWS
+3
-0
No files found.
Lib/distutils/command/build_ext.py
Dosyayı görüntüle @
3fbcc60e
...
...
@@ -643,16 +643,16 @@ class build_ext (Command):
(inplace option).
"""
fullname
=
self
.
get_ext_fullname
(
ext_name
)
filename
=
self
.
get_ext_filename
(
fullname
)
modpath
=
fullname
.
split
(
'.'
)
package
=
'.'
.
join
(
modpath
[
0
:
-
1
])
base
=
modpath
[
-
1
]
filename
=
self
.
get_ext_filename
(
base
)
if
not
self
.
inplace
:
# no further work needed
return
os
.
path
.
join
(
self
.
build_lib
,
filename
)
# the inplace option requires to find the package directory
# using the build_py command
modpath
=
fullname
.
split
(
'.'
)
package
=
'.'
.
join
(
modpath
[
0
:
-
1
])
base
=
modpath
[
-
1
]
build_py
=
self
.
get_finalized_command
(
'build_py'
)
package_dir
=
os
.
path
.
abspath
(
build_py
.
get_package_dir
(
package
))
return
os
.
path
.
join
(
package_dir
,
filename
)
...
...
Lib/distutils/tests/test_build_ext.py
Dosyayı görüntüle @
3fbcc60e
...
...
@@ -339,10 +339,9 @@ class BuildExtTestCase(support.TempdirManager,
# inplace = 0, cmd.package = 'bar'
cmd
.
package
=
'bar'
path
=
cmd
.
get_ext_fullpath
(
'foo'
)
# checking that the last directory is
ba
r
# checking that the last directory is
the build_di
r
path
=
os
.
path
.
split
(
path
)[
0
]
lastdir
=
os
.
path
.
split
(
path
)[
-
1
]
self
.
assertEquals
(
lastdir
,
cmd
.
package
)
self
.
assertEquals
(
path
,
cmd
.
build_lib
)
# inplace = 1, cmd.package = 'bar'
cmd
.
inplace
=
1
...
...
@@ -358,6 +357,19 @@ class BuildExtTestCase(support.TempdirManager,
lastdir
=
os
.
path
.
split
(
path
)[
-
1
]
self
.
assertEquals
(
lastdir
,
cmd
.
package
)
def
test_build_ext_inplace
(
self
):
etree_c
=
os
.
path
.
join
(
self
.
tmp_dir
,
'lxml.etree.c'
)
etree_ext
=
Extension
(
'lxml.etree'
,
[
etree_c
])
dist
=
Distribution
({
'name'
:
'lxml'
,
'ext_modules'
:
[
etree_ext
]})
cmd
=
build_ext
(
dist
)
cmd
.
inplace
=
1
cmd
.
distribution
.
package_dir
=
{
''
:
'src'
}
cmd
.
distribution
.
packages
=
[
'lxml'
,
'lxml.html'
]
curdir
=
os
.
getcwd
()
wanted
=
os
.
path
.
join
(
curdir
,
'src'
,
'lxml'
,
'etree.so'
)
path
=
cmd
.
get_ext_fullpath
(
'lxml.etree'
)
self
.
assertEquals
(
wanted
,
path
)
def
test_suite
():
src
=
_get_source_filename
()
if
not
os
.
path
.
exists
(
src
):
...
...
Misc/NEWS
Dosyayı görüntüle @
3fbcc60e
...
...
@@ -337,6 +337,9 @@ Core and Builtins
Library
-------
- Issue #6365: Distutils build_ext inplace mode was copying the compiled
extension in a subdirectory if the extension name had dots.
- Issue #6344: Fixed a crash of mmap.read() when passed a negative argument.
- Issue #5230: pydoc would report no documentation found if a module generated
...
...
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