setuptools msvc build

Sazzad Kamal sazzadbinkamal at gmail.com
Sun Aug 29 07:04:33 EDT 2010


is it possible to build python setuptools with msvc?

> On Monday, July 12, 2010 4:59 PM Alf P. Steinbach /Usenet wrote:

> I let the setup.py script talk:
> 
> 
> <code>
> 
> from distutils.core import setup, Extension
> import distutils.ccompiler
> 
> compilerName = distutils.ccompiler.get_default_compiler()
> options = []
> if compilerName == "msvc":
> options.append( "/W4" )                     # Must be done in this script.
> options.append( "/EHsc" )                   # Could be done via CL env. var.
> options.append( "/GR" )                     # Could be done via CL env. var.
> options.append( "/Zc:forScope,wchar_t" )    # Could be done via CL env. var.
> 
> module1 = Extension(
> name = "noddy",
> sources = [ "noddy.cpp" ],
> extra_compile_args = options
> )
> 
> setup(
> name            = "noddy",
> version         = '1.0',
> description     = 'This is a demo package',
> ext_modules     = [module1]
> )
> </code>
> 
> 
> Cheers,
> 
> - Alf
> 
> --


> Submitted via EggHeadCafe - Software Developer Portal of Choice 
> Custom Favorites Web Site with MongoDb and NoRM
> http://www.eggheadcafe.com/tutorials/aspnet/7fbc7a01-5d30-4cd3-b373-51d4a0e1afa8/custom-favorites-web-site-with-mongodb-and-norm.aspx



More information about the Python-list mailing list