# This is so far just tested on Windows... # Seems to work fine with ActiveState Python2.3 and Linux # Note you need to link p4api to whereever you put Perforce API from distutils.core import setup, Extension import os if os.name == "nt": setup(name="P4", version="1.0", py_modules=["p4"], ext_modules=[Extension("P4Client", ["P4Clientmodule.cc"], include_dirs=["p4api"], library_dirs=["p4api"], libraries=["oldnames", "wsock32", "advapi32", "libclient", "librpc", "libsupp"], extra_compile_args=["/DOS_NT", "/DMT", "/DCASE_INSENSITIVE"], # extra_link_args=["/NODEFAULTLIB:msvcrt", "/NODEFAULTLIB:libcmt"] )]) else: # Linux setup(name="P4", version="1.0", py_modules=["p4"], ext_modules=[Extension("P4Client", ["P4Clientmodule.cc"], include_dirs=["p4api"], library_dirs=["p4api"], libraries=["client", "rpc", "supp"], extra_compile_args=["-DOS_LINUX"], )])