SIP installieren

Python und das Qt-Toolkit, erstellen von GUIs mittels des Qt-Designers.
Antworten
BaIs
User
Beiträge: 5
Registriert: Sonntag 27. September 2009, 10:33

hallo leute,

ich habe for ein OS unabhängiges Programm zu entwickeln und mich entschieden es mit pyqt zu machen,
um meine python kenntnisse zu vertiefen.
Allerdings hatte ich eigentlich vor pyqt auf einem Windows-Rechner einzurichten und finde keine Dokumentation zur Installation von
SIP. Die mitgegebene Dokumentation verrät nur soviel:
After unpacking the source package (either a .tar.gz or a .zip file depending on your platform) you should then check for any README files that relate to your platform.

Next you need to configure SIP by executing the configure.py script. For example:

python configure.py

This assumes that the Python interpreter is on your path. Something like the following may be appropriate on Windows:

c:\python26\python configure.py

If you have multiple versions of Python installed then make sure you use the interpreter for which you wish SIP to generate bindings for.

The full set of command line options is:

--version¶
Display the SIP version number.

-h, --help¶
Display a help message.

--arch <ARCH>¶
Binaries for the MacOS/X architecture <ARCH> will be built. This option should be given once for each architecture to be built. Specifying more than one architecture will cause a universal binary to be created.

-b <DIR>, --bindir <DIR>¶
The SIP code generator will be installed in the directory <DIR>.

-d <DIR>, --destdir <DIR>¶
The SIP module will be installed in the directory <DIR>.

-e <DIR>, --incdir <DIR>¶
The SIP header file will be installed in the directory <DIR>.

-k, --static¶
The SIP module will be built as a static library. This is useful when building the SIP module as a Python builtin (see Builtin Modules and Custom Interpreters).

-n, --universal¶
The SIP code generator and module will be built as universal binaries under MacOS/X. If the --arch option has not been specified then the universal binary will include the i386 and ppc architectures.

-p <PLATFORM>, --platform <PLATFORM>¶
Explicitly specify the platform/compiler to be used by the build system, otherwise a platform specific default will be used. The --show-platforms option will display all the supported platform/compilers.

-s <SDK>, --sdk <SDK>¶
If the --universal option was given then this specifies the name of the SDK directory. If a path is not given then it is assumed to be a sub-directory of /Developer/SDKs.

-u, --debug¶
The SIP module will be built with debugging symbols.

-v <DIR>, --sipdir <DIR>¶
By default .sip files will be installed in the directory <DIR>.

--show-platforms¶
The list of all supported platform/compilers will be displayed.

--show-build-macros¶
The list of all available build macros will be displayed.

The configure.py script takes many other options that allows the build system to be finely tuned. These are of the form name=value or name+=value. The --show-build-macros option will display each supported name, although not all are applicable to all platforms.

The name=value form means that value will replace the existing value of name.

The name+=value form means that value will be appended to the existing value of name.

For example, the following will disable support for C++ exceptions (and so reduce the size of module binaries) when used with GCC:

python configure.py CXXFLAGS+=-fno-exceptions

A pure Python module called sipconfig.py is generated by configure.py. This defines each name and its corresponding value. Looking at it will give you a good idea of how the build system uses the different options. It is covered in detail in The Build System.
Das Problem ist jedoch, dass ich z.B die configure.py nicht richtig aufrufen kann. es funktioniert z.B der --help parameter nicht und sonst öffnet sich nur das schwarze Fenster und schließt sich anschließend wieder..
habe ich bei der pyhton Installation was vergessen einzurichten?
oder habt ihr sonst eine Idee?
Benutzeravatar
cofi
Python-Forum Veteran
Beiträge: 4432
Registriert: Sonntag 30. März 2008, 04:16
Wohnort: RGFybXN0YWR0

Und warum benutzt du nicht den Installer von PyQt?
BaIs
User
Beiträge: 5
Registriert: Sonntag 27. September 2009, 10:33

vielen dank!
wusste nicht das es einen installer dafür gibt :oops:
habe ihn aber jetzt auch gefunden und werde es gleich ausprobieren.
Antworten