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
ef4554f7
Kaydet (Commit)
ef4554f7
authored
Agu 25, 2015
tarafından
Berker Peksag
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Issue #10708: Add a link to devguide in Misc/Porting.
üst
d8c5f822
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
41 deletions
+1
-41
Porting
Misc/Porting
+1
-41
No files found.
Misc/Porting
Dosyayı görüntüle @
ef4554f7
Q. I want to port Python to a new platform. How do I begin?
A. I guess the two things to start with is to familiarize yourself
with are the development system for your target platform and the
generic build process for Python. Make sure you can compile and run a
simple hello-world program on your target platform. Make sure you can
compile and run the Python interpreter on a platform to which it has
already been ported (preferably Unix, but Mac or Windows will do,
too).
I also would never start something like this without at least
medium-level understanding of your target platform (i.e. how it is
generally used, how to write platform specific apps etc.) and Python
(or else you'll never know how to test the results).
The build process for Python, in particular the Makefiles in the
source distribution, will give you a hint on which files to compile
for Python. Not all source files are relevant -- some are platform
specific, others are only used in emergencies (e.g. getopt.c). The
Makefiles tell the story.
You'll also need a pyconfig.h file tailored for your platform. You can
start with pyconfig.h.in, read the comments and turn on definitions that
apply to your platform.
And you'll need a config.c file, which lists the built-in modules you
support. Start with Modules/config.c.in.
Finally, you'll run into some things that aren't supported on your
target platform. Forget about the posix module for now -- simply take
it out of the config.c file.
Bang on it until you get a >>> prompt. (You may have to disable the
importing of "site.py" by passing the -S option.)
Then bang on it until it executes very simple Python statements.
Now bang on it some more. At some point you'll want to use the os
module; this is the time to start thinking about what to do with the
posix module. It's okay to simply #ifdef out those functions that
cause problems; the remaining ones will be quite useful.
This document is moved to https://docs.python.org/devguide/faq.html#how-do-i-port-python-to-a-new-platform
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