Standard distutils package problems with MSVC / lacking functionality?

  • Thread starter Alf P. Steinbach /Usenet
  • Start date
A

Alf P. Steinbach /Usenet

I let the setup.py script talk:


<code>
# 03_1__noddy

from distutils.core import setup, Extension
import distutils.ccompiler

compilerName = distutils.ccompiler.get_default_compiler()
options = []
if compilerName == "msvc":
# * distutils sets warning level 3:
# Overriding with warning level 4 generates command line warning D9025...
# There's no good away around that, it needs fix/extension of distutils
# or the config file(s) that distutil uses (perhaps that's a makefile?).
options.append( "/W4" ) # Must be done in this script.
# * distutils forgets to enable exception handling:
options.append( "/EHsc" ) # Could be done via CL env. var.
# * distutils forgets to enable RTTI:
options.append( "/GR" ) # Could be done via CL env. var.
# * distutils forgets to enable standard 'for' loop and 'wchar_t' type:
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
 
S

Sazzad Kamal

is it possible to build python setuptools with msvc?
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/tutorial...favorites-web-site-with-mongodb-and-norm.aspx
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,764
Messages
2,569,564
Members
45,039
Latest member
CasimiraVa

Latest Threads

Top