1 | n/a | # This is an example of a distutils 'setup' script for the example_nt |
---|
2 | n/a | # sample. This provides a simpler way of building your extension |
---|
3 | n/a | # and means you can avoid keeping MSVC solution files etc in source-control. |
---|
4 | n/a | # It also means it should magically build with all compilers supported by |
---|
5 | n/a | # python. |
---|
6 | n/a | |
---|
7 | n/a | # USAGE: you probably want 'setup.py install' - but execute 'setup.py --help' |
---|
8 | n/a | # for all the details. |
---|
9 | n/a | |
---|
10 | n/a | # NOTE: This is *not* a sample for distutils - it is just the smallest |
---|
11 | n/a | # script that can build this. See distutils docs for more info. |
---|
12 | n/a | |
---|
13 | n/a | from distutils.core import setup, Extension |
---|
14 | n/a | |
---|
15 | n/a | example_mod = Extension('example', sources = ['example.c']) |
---|
16 | n/a | |
---|
17 | n/a | |
---|
18 | n/a | setup(name = "example", |
---|
19 | n/a | version = "1.0", |
---|
20 | n/a | description = "A sample extension module", |
---|
21 | n/a | ext_modules = [example_mod], |
---|
22 | n/a | ) |
---|