Distutil question
Steve Menard
steve.menard at videotron.ca
Thu Jun 10 13:16:04 EDT 2004
I built a extension module that I'd like to distribute via distutil. It
consists of a bunch of cpp and hpp files.
my setup.py files looks like this :
from distutils.core import setup, Extension
import os, os.path
cpp = []
hpp = []
for i in os.listdir("src/native"):
if i[-4:] == '.cpp' :
cpp.append( "src/native/"+i)
elif i[-4:] == '.hpp' :
hpp.append( "src/native/"+i)
e = Extension("_jpype", cpp,
include_dirs=[os.getenv("JAVA_HOME")+"/include",
os.getenv("JAVA_HOME")+"/include/win32"] )
setup(
name="JPype",
version="0.2.1p1",
description="Python-Java bridge",
author="Steve Menard",
author_email="devilwolf at users.sourceforge.net",
url="http://jpype.sourceforge.net/",
packages=["jpype"],
package_dir={"jpype": "src/python/jpype"},
ext_modules=[e]
)
now, if I add the hpp list to the extension sources, I get an error that
it does not know what to do with the hpp files.
How do I go about distributing those files so that a source dsitribution
will compile properly? should I rename them to .h files instead?
Thanks for your help,
Steve
More information about the Python-list
mailing list