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
4b48c612
Kaydet (Commit)
4b48c612
authored
Ara 28, 2008
tarafından
Ronald Oussoren
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Issue4064: architecture string for universal builds on OSX
üst
dae1a6a4
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
27 additions
and
4 deletions
+27
-4
apiref.rst
Doc/distutils/apiref.rst
+17
-0
util.py
Lib/distutils/util.py
+10
-4
No files found.
Doc/distutils/apiref.rst
Dosyayı görüntüle @
4b48c612
...
...
@@ -1100,6 +1100,23 @@ other utility module.
For non-POSIX platforms, currently just returns ``sys.platform``.
For MacOS X systems the OS version reflects the minimal version on which
binaries will run (that is, the value of ``MACOSX_DEPLOYMENT_TARGET``
during the build of Python), not the OS version of the current system.
For universal binary builds on MacOS X the architecture value reflects
the univeral binary status instead of the architecture of the current
processor. For 32-bit universal binaries the architecture is ``fat``,
for 4-way universal binaries the architecture is ``universal``.
Examples of returned values on MacOS X:
* ``macosx-10.3-ppc``
* ``macosx-10.3-fat``
* ``macosx-10.5-universal``
.. % XXX isn't this also provided by some other non-distutils module?
...
...
Lib/distutils/util.py
Dosyayı görüntüle @
4b48c612
...
...
@@ -100,7 +100,11 @@ def get_platform ():
if
not
macver
:
macver
=
cfgvars
.
get
(
'MACOSX_DEPLOYMENT_TARGET'
)
if
not
macver
:
if
1
:
# Always calculate the release of the running machine,
# needed to determine if we can build fat binaries or not.
macrelease
=
macver
# Get the system version. Reading this plist is a documented
# way to get the system version (see the documentation for
# the Gestalt Manager)
...
...
@@ -116,16 +120,18 @@ def get_platform ():
r'<string>(.*?)</string>'
,
f
.
read
())
f
.
close
()
if
m
is
not
None
:
mac
ver
=
'.'
.
join
(
m
.
group
(
1
)
.
split
(
'.'
)[:
2
])
mac
release
=
'.'
.
join
(
m
.
group
(
1
)
.
split
(
'.'
)[:
2
])
# else: fall back to the default behaviour
if
not
macver
:
macver
=
macrelease
if
macver
:
from
distutils.sysconfig
import
get_config_vars
release
=
macver
osname
=
"macosx"
if
(
release
+
'.'
)
>=
'10.4.'
and
\
if
(
macrelease
+
'.'
)
>=
'10.4.'
and
\
'-arch'
in
get_config_vars
()
.
get
(
'CFLAGS'
,
''
)
.
strip
():
# The universal build will build fat binaries, but not on
# systems before 10.4
...
...
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