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
58437f20
Kaydet (Commit)
58437f20
authored
May 10, 2002
tarafından
Greg Ward
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
[from Oct 2000]
Clarify explanations of header file search directories.
üst
1f89e2ab
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
18 additions
and
14 deletions
+18
-14
dist.tex
Doc/dist/dist.tex
+18
-14
No files found.
Doc/dist/dist.tex
Dosyayı görüntüle @
58437f20
...
...
@@ -505,23 +505,27 @@ Extension("foo", ["foo.c"], include_dirs=["/usr/include/X11"])
\end{verbatim}
You should avoid this sort of non-portable usage if you plan to
distribute your code: it's probably better to write your code to include
(e.g.)
\code
{
<X11/Xlib.h>
}
.
distribute your code: it's probably better to write C code like
\begin{verbatim}
#include <X11/Xlib.h>
\end{verbatim}
If you need to include header files from some other Python extension,
you can take advantage of the fact that
the Distutils installs
extension header files in a consistent way. For example, on a
standard
\UNIX
{}
installation the Numerical Python header files are
installed to
\file
{
/usr/local/include/python1.5/Numerical
}
. (The
exact location will differ according to your platform and Python
you can take advantage of the fact that
header files are installed in a
consistent way by the Distutils
\command
{
install
\_
header
}
command. For
example, the Numerical Python header files are installed (on a standard
Unix installation) to
\file
{
/usr/local/include/python1.5/Numerical
}
.
(The
exact location will differ according to your platform and Python
installation.) Since the Python include
directory---
\file
{
/usr/local/include/python1.5
}
in this case---is
always included in the search path when building Python extensions,
the best approach is to include (e.g.)
\code
{
<Numerical/arrayobject.h>
}
. If you insist on putting the
\file
{
Numerical
}
include directory right into your header search path,
though, you can find that directory using the Distutils
\module
{
sysconfig
}
module:
directory---
\file
{
/usr/local/include/python1.5
}
in this case---is always
included in the search path when building Python extensions, the best
approach is to write C code like
\begin{verbatim}
#include <Numerical/arrayobject.h>
\end{verbatim}
If you must put the
\file
{
Numerical
}
include directory right into your
header search path, though, you can find that directory using the
Distutils
\module
{
sysconfig
}
module:
\begin{verbatim}
from distutils.sysconfig import get
_
python
_
inc
...
...
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