/brz/remove-bazaar

To get this branch, use:
bzr branch http://gegoxaren.bato24.eu/bzr/brz/remove-bazaar

« back to all changes in this revision

Viewing changes to doc/developers/HACKING.txt

  • Committer: Jelmer Vernooij
  • Date: 2017-06-06 01:10:48 UTC
  • mto: (6656.2.4 integrate-bisect)
  • mto: This revision was merged to the branch mainline in revision 6674.
  • Revision ID: jelmer@jelmer.uk-20170606011048-ahf4exo5kvy3mwt1
Drop pyrex support.

Show diffs side-by-side

added added

removed removed

Lines of Context:
532
532
C Extension Modules
533
533
===================
534
534
 
535
 
We write some extensions in C using pyrex. We design these to work in
 
535
We write some extensions in C using Cython. We design these to work in
536
536
three scenarios:
537
537
 
538
538
 * User with no C compiler
543
543
extensions can be built, but if no C compiler is present, the pure python
544
544
versions we supply will work, though more slowly.
545
545
 
546
 
For developers we recommend that pyrex be installed, so that the C
 
546
For developers we recommend that Cython be installed, so that the C
547
547
extensions can be changed if needed.
548
548
 
549
549
For the C extensions, the extension module should always match the
550
550
original python one in all respects (modulo speed). This should be
551
551
maintained over time.
552
552
 
553
 
To create an extension, add rules to setup.py for building it with pyrex,
 
553
To create an extension, add rules to setup.py for building it with Cython ,
554
554
and with distutils. Now start with an empty .pyx file. At the top add
555
555
"include 'yourmodule.py'". This will import the contents of foo.py into this
556
556
file at build time - remember that only one module will be loaded at
557
557
runtime. Now you can subclass classes, or replace functions, and only your
558
558
changes need to be present in the .pyx file.
559
559
 
560
 
Note that pyrex does not support all 2.4 programming idioms, so some
561
 
syntax changes may be required. I.e.
562
 
 
563
 
 - 'from foo import (bar, gam)' needs to change to not use the brackets.
564
 
 - 'import foo.bar as bar' needs to be 'import foo.bar; bar = foo.bar'
565
 
 
566
 
If the changes are too dramatic, consider
567
 
maintaining the python code twice - once in the .pyx, and once in the .py,
568
 
and no longer including the .py file.
569
 
 
570
 
 
571
560
Making Installers for OS Windows
572
561
================================
573
562
To build a win32 installer, see the instructions on the wiki page: