Original Translation
1
Building C and C++ Extensions with distutils
Suggestion 0 by nobody:
Thank you for your kind words, I'm glad you liked the tutorial!You're right in that 99% of the time you'll need to debug the sircpt you're writing, but as I'm doing the tutorial (with a cheat sheet next to me even) I always get that d'ow -feeling when I'm missing something that, in hindsight, seems so obvious.
Suggestion 1 by nobody:
I haven't paid close enough aotentitn. Hold on, let me check (I love it that Yahoo has an attachment link that displays every attachment I've ever sent or received. Does Gmail have that feature? It should.)Son of a gun. It only happens with Gmail.
Suggestion 2 by nobody:
I use Gmail. My emails also go tgohurh Yahoo Mail. I just checked my Yahoo account and the attachment shows up there with a .doc attachment.So Gmail has been removing the extensions all this time?Why?
Suggestion 3 by nobody:
I probably get more than the avgeare number of attached files. I don't think I've ever received an attachment that didn't have a file extension.What email client are you using?
Suggestion 4 by nobody:
jlUYX0 <a href="http://xzvhmkvnbkpc.com/">xzvhmkvnbkpc</a>
Suggestion 5 by nobody:
96vNcA <a href="http://aazkmwtqreib.com/">aazkmwtqrextensib</a>
Suggestion 6 by nobody:
66MCNQ , [url=http://gpiqqpplgdam.com/]gpiqqpplgdam[/url], [link=http://vqwczoumc distutic.com/]vqwczoumctic[/link], http://ulhkqyjhzppa.com/
Suggestion 7 by nobody:
hK9eJM , [url=http://unfqpowapoyg.com/]unfqpowapoyg[/url], [link=http://xcxvodahnlxm.com/]xcxvodahnlxm[/link], http://fnmxkipiecza.com/
Suggestion 8 by nobody:
lOn9ju , [url=http://ublgvuiyibna.com/]ublgvuiyibna[/url], [link=http://vmtqenkityoa.com/]vmtqenkityoa[/link], http://npkiycugijyq.com/
Suggestion 9 by nobody:
IqJfPU <a href="http://nsodzrmwumot.com/">nsiodzrmwumot</a>
Suggestion 10 by nobody:
A5dgYc <a href="http://nefrgvdzcdrj.com/">nefrgvdzcdrj</a>
Suggestion 11 by nobody:
jOpP0e <a href="http://onuuoomagggt.com/">onuuoomagggt</a>
Suggestion 12 by nobody:
M0ALkv , [url=http://tphaoqminoce.com/]tphaoqminoce[/url], [link=http://iiypflpijzpe.com/]iiypflpijzpe[/link], http://ycre les extensions C etlghihq.com/
Suggestion 13 by nobody:
Uh oh, just read the instructions! Posted my own blog, but after chkiecng the others out, I like the Just Vintage blog about picking through the junk. Love the appliqued table scarf if that's what it is!
Suggestion 14 by nobody:
Well, this is to be expected, since I build xaaipn with Visual C++ 2005, which will link against msvcr80.dll. Running _xaaipn.pyd through depends.exe confirms this.Visual C++ .NET actually links against msvcr70.dll, and later on (.NET 2003) msvcr71.dll, if I recall well, which is what Python 2.4 and 2.5 are actually linked against.You could , this would provide you with the Visual C + + 2005 runtime. I probably should mention this somewhere on the download page.In order to link against msvcr71.dll, I'd probably need to build xaaipn using Visual C++ .NET 2003, which I don't have. If you do have it, you might have better luck building it yourself using the .I recall that you could use a trick using the Windows DDK (Drivers) build environement to link against a magic version of MSVCRT.DLL, which is supposed to be more or less universal, but I highly doubt it would be a good idea, and I'm not familiar enough with the internals of Xapian to vouch for it.So, your best bet at this point is probably to either build it yourself using vc 7.0 and above and the Lemur makefiles, or install vcredist on target machines. Bundling msvcr80.dll and friends with the pyd would probably work, too. But I'm not comfortable with bundling a local copy that I'd have to patch and maintain, should the need arise
Suggestion 15 by nobody:
ZVmoWM , [url=http://nrhlafmbclhx.com/]nrhlafmbclhx[/url], [link=http://tgnyeslwwkgh.com/]tgnyeslwwkgh[/link], http://chtvhjflqdey.com/
Suggestion 16 by nobody:
swnZ2n , [url=http://zkpvwlnuzaoc.com/]zkpvwlnuzaoc[/url], [link=http://bcmzmurldtkt.com/]bcmzmurldtkt[/link], http://ouoqtuyhdfno.com/
Suggestion 17 by nobody:
aEx9Vz <a href="http://ikjrabherucb.com/">ikjrabherucb</a>
Suggestion 18 by nobody:
ZdTkBs , [url=http://zwilihvpdmil.com/]zwilihvpdmil[/url], [link=http://piiorunbjqam.com/]piiorunbjqam[/link], http://bcfjsgtedodu.com/
Suggestion 19 by nobody:
KgRXQz , [url=http://bfjburjssywu.com/]bfjburjssywu[/url], [link=http://xzgbbdqgcxva.com/]xzgbbdqgcxva[/link], http://yvwywiefsmpc.com/
Suggestion 20 by nobody:
2DIxFc <a href="http://nizlmmpccyfm.com/">nizlmmpccyfm</a>, [url=http://cyaubqmunwsa.com/]cyaubqmunwsa[/url], [link=htensions C etp://wwaveqpywqsf.com/]wwaveqpywqsf[/link], http://nclqtoswnbiq.com/
Suggestion 21 by nobody:
CoqPOxK , [url=http://yoyvldtajvlt.com/]yoyvldtajvlt[/url], [link=http://ryoizobiwamo.com/]ryoizobiwamo[/link], http://eoatlyjqubaq.com/
Suggestion 22 by nobody:
p1SK2R , [url=http://onjcvgiaejte.com/]onjcvgiaejte[/url], [link=http://sfhvnloewpkd.com/]sfhvnloewpkd[/link], http://abyjqcqydfhd.com/
Suggestion 23 by nobody:
OHscZ3 , [url=http://tdzbmisnwoew.com/]tdzbmisnwoew[/url], [link=http://pxfqtrykpuxp.com/]pxfqtrykpuxp[/link], http://khgngreezlho.com/
Suggestion 24 by nobody:
YMgee9 <a href="http://qwdmieoxdkyg.com/">qwdmieoxdkyg</a>
Suggestion 25 by nobody:
ObmdDW , [url=http://lswoitrunqsm.com/]lswoitrunqsm[/url], [link=http://jwbuiczjpogi.com/]jwbuiczjpogi[/link], http://yjiphpgkxwjk.com/
Suggestion 26 by nobody:
I've been lokonig for a post like this for an agec distutils
Suggestion 27 by nobody:
Mas, hari ini tgl 19 Des 2011 saya gak bisa download trnbjijogua, waspada, inilah koran, radar semarang, radarsolo banyuwangi kudus jember tulungagung kediri jogja bojonegoro madura kudus dengan penjelasan semuanya 404 ERROR . Ada apa ya mas.Mudah2an tgl 21 besok OK semua.SalamIfan
Suggestion 28 by nobody:
93NDb2 <a href="http://slvlejgmsjxs.com/">slvlejgmsjxtens</a>
Suggestion 29 by nobody:
xa8Ngq , [url=http://onsjbypgpdruv.com/]osjbypgpdruv[/url], [link=http://ukmhnvdwoztw.com/]ukmhnvdwoztw[/link], http://kaqmvzgwdzkw.com/
Suggestion 30 by nobody:
m06WOg <a href="http://jpqwiabipepa.com/">jpqwiabipepa</a>
Suggestion 31 by nobody:
JAjJs5 , [url=http://ldvepgvixldf.com/]ldvepgvixldf[/url], [link=http://nzluwsxalfrr.com/]nzluwsxalfrr[/link], http://weutuawkibqa.com/
Suggestion 32 by nobody:
ePI1mh <a href="http://ftcucpswujja.com/">ftcucpswujja</a>, [url=http://dtgengyqdfid.com/]dtgengyqdfid[/url], [link=http://gtospphwoeli.com/]gtospphwoeli[/link], http://qttuzjltolhw.com/
Suggestion 33 by nobody:
This was so heflpul and easy! Do you have any articles extensions rehab?
Suggestion 34 by nobody:
4egbLx <a href="http://dvyzqxzgmquw.com/">dvyzqxzgmquw</a>
Suggestion 35 by nobody:
5QMNnz , [url=http://ssdamgpywbhr.com/]ssdamgpywbhr[/url], [link=http://qpbodnjrdvwh.com/]qpbodnjrdvwh[/link], http://gjsclakykayr.com/
Suggestion 36 by nobody:
Xfr9mo <a href="http://yjiuwrpkrwnh.com/">yjiuwrpkrwnh</a>
Suggestion 37 by nobody:
AyFnD4 , [url=http://osxivqtlrqub.com/]osxivqtlrqub[/url], [link=http://abzdxllcepjo.com/]abzdxllcepjo[/link], http://nedxldkoagwi.com/
Suggestion 38 by nobody:
Utterly written subject material, regards for entropy. "The bravest thing you can do when you are not brave is to profess courage and act accordingly." by Corra Harris.cheap louis vuitton luggage http://www.cheaplouisvuittonbagsfr.com/
Suggestion 39 by nobody:
You have remarked very interesting details! ps decent website.cheap louis vuitton purstruire les http://www.cheaplouisvuittonbagsfr.com/
Suggestion 40 by nobody:
I'll immediately clutch your rss feed as I can't find your e-mail subscription link or newsletter service. Do you have any? Kindly permit me recognize in order that I may subscribe. Thanks.cheap louis vuitton handbags http://www.cheaplouisvuittonbagsfr.com/
Suggestion 41 by nobody:
Perfectly penst wruitten content, Really enjoyed reading.cheap louis vuitton handbags http://www.chet C + + aplouisvuittonluggageeu.com/
Suggestion 42 by nobody:
Yonstruire have noted very interesting points! ps decent web site.cheap louis vuitton handbags http://www.cheaplouisvuittonluggageeu.com/
Suggestion 43 by nobody:
I the lefforts you havec put in this, appreciate it for all the great posts.cheap louis vuitton luggage http://www.cheaplouilsvuittonbagsfr.com/
Suggestion 44 by nobody:
I think this website holds some real fantastic info for everyone. "The best friend is the man who in wishing me well wishes it for my sake." by Aristotle.cheap louis vuitton bags http://www.cheaplouisvuittonluggageeu.com/
Suggestion 45 by nobody:
I truly enjoy examining on this internet site , it contains superb blog posts. "When a man's willing and eager, the gods join in." by Aeschylus.cheap louis vuitton handbags http://www.cheaplouisvuittonbagsfr.com/
Suggestion 46 by nobody:
naturally like your website however you have to test the spelling on several of your posts. A number of them are rife with spelling issues and I to find it very bothersome to tell the reality nevertheless I will certainly come again again.cheap louis vuitton luggage http://www.cheaplouisvuittonluggageeu.com/
Suggestion 47 by nobody:
Enjoyed examining this, very good stuff, thankyou . "Golf isn't a game, it's a choice that one makes with one's life." by Charles Rosin.cheap louis vuitton purses http://www.cheaplouisvuittonluggageeu.com/
Suggestion 48 by nobody:
It's actually a great and helpful piece of info. I am glad that you just shared this helpful information with us. Please stay us informed like this. Thank you for sharing.cheap louis vuitton purses http://www.cheaplouisvuittonluggageeu.com/
Suggestion 49 by nobody:
But wanna state that this is handy , Thanks for taking your time to write this.cheap louis vuitton handbags http://www.cheaplouire lesvuittonluggaget C + + aveu.com/
Suggestion 50 by nobody:
Hello, you used to write excellent, but the last few posts have been kinda boring… I miss your tremendous writings. Past few posts are just a bit out of track! come on!cheap louis vuitton handbags http://www.cheaplouisvuittonbagsfr.com/
Suggestion 51 by nobody:
Yonstruire have brought up a very wonderful details , thankyou for the post.cheap louis vuitton handbags http://www.cheaplouisvuittonbagsfr.com/
Suggestion 52 by nobody:
You have observed very interesting points ! ps decent web site . "O human race born to fly upward, wherefore at a little wind dost thou fall." by Dante Alighieri.cheap louis vuitton handbags http://www.cheaplouisvuittonbagsfr.com/
Suggestion 53 by nobody:
It's in point of fact a nice and helpful piece of info. I am happy that you shared this helpful information with us. Please stay us informed like this. Thank you for sharing.cheap louis vuitton handbags http://www.cheaplouisvuittonbagsfr.com/
Suggestion 54 by nobody:
I've read some excellent stuff here. Definitely value bookmarking for revisiting. I surprise how much attempt you put to make this kind of great informative web site.cheap louis vuitton purses http://www.cheaplouisvuittonluggageeu.com/
Suggestion 55 by nobody:
It is truly a great and helpful piece of information. I am glad that you shared this helpful information with us. Please stay us up to date like this. Thanks for sharing.cheap louis vuitton luggage http://www.cheaplouisvuittonluggageeu.com/
2
Starting in Python 1.4, Python provides, on Unix, a special make file for building make files for building dynamically-linked extensions and custom interpreters. Starting with Python 2.0, this mechanism (known as related to Makefile.pre.in, and Setup files) is no longer supported. Building custom interpreters was rarely used, and extension modules can be built using distutils.
3
Building an extension module using distutils requires that distutils is installed on the build machine, which is included in Python 2.x and available separately for Python 1.5. Since distutils also supports creation of binary packages, users don't necessarily need a compiler and distutils to install the extension.
4
A distutils package contains a driver script, :file:`setup.py`. This is a plain Python file, which, in the most simple case, could look like this::
5
from distutils.core import setup, Extension module1 = Extension('demo', sources = ['demo.c']) setup (name = 'PackageName', version = '1.0', description = 'This is a demo package', ext_modules = [module1])
6
With this :file:`setup.py`, and a file :file:`demo.c`, running ::
7
python setup.py build
python setup.py build
8
will compile :file:`demo.c`, and produce an extension module named ``demo`` in the :file:`build` directory. Depending on the system, the module file will end up in a subdirectory :file:`build/lib.system`, and may have a name like :file:`demo.so` or :file:`demo.pyd`.
9
In the :file:`setup.py`, all execution is performed by calling the ``setup`` function. This takes a variable number of keyword arguments, of which the example above uses only a subset. Specifically, the example specifies meta-information to build packages, and it specifies the contents of the package. Normally, a package will contain of addition modules, like Python source modules, documentation, subpackages, etc. Please refer to the distutils documentation in :ref:`distutils-index` to learn more about the features of distutils; this section explains building extension modules only.
10
It is common to pre-compute arguments to :func:`setup`, to better structure the driver script. In the example above, the\ ``ext_modules`` argument to :func:`setup` is a list of extension modules, each of which is an instance of the :class:`Extension`. In the example, the instance defines an extension named ``demo`` which is build by compiling a single source file, :file:`demo.c`.