"""P4Python - Python interface to Perforce API Perforce is the fast SCM system at www.perforce.com. This package provides a simple interface from Python wrapping the Perforce C++ API to gain performance and ease of coding. Similar to interfaces available for Ruby and Perl. """ classifiers = """\ Development Status :: 4 - Beta Intended Audience :: Developers License :: Freely Distributable Programming Language :: Python Topic :: Software Development :: Libraries :: Python Modules Topic :: Software Development :: Version Control Topic :: Software Development Topic :: Utilities Operating System :: Microsoft :: Windows Operating System :: Unix """ # Seems to work fine with ActiveState Python2.3 or 2.4 and Linux # Note you need to link p4api to where ever you put Perforce API # See notes in P4API documentation for building with API on different # platforms: # http://www.perforce.com/perforce/doc.042/manuals/p4api/02_clientprog.html from distutils.core import setup, Extension import os, sys # Fix for older versions of Python if sys.version_info < (2, 3): _setup = setup def setup(**kwargs): if kwargs.has_key("classifiers"): del kwargs["classifiers"] _setup(**kwargs) doclines = __doc__.split("\n") NAME = "P4Python" VERSION = "0.6" PY_MODULES = ["p4"] DESCRIPTION=doclines[0] AUTHOR="Robert Cowham" MAINTAINER="Robert Cowham" AUTHOR_EMAIL="robert@vaccaperna.co.uk" MAINTAINER_EMAIL="robert@vaccaperna.co.uk" LICENSE="http://public.perforce.com/guest/robert_cowham/perforce/API/python/main/LICENSE.txt" URL="http://public.perforce.com/guest/robert_cowham/perforce/API/python/index.html" KEYWORDS="Perforce perforce" def do_setup(): if os.name == "nt": setup(name=NAME, version=VERSION, description=DESCRIPTION, author=AUTHOR, author_email=AUTHOR_EMAIL, maintainer=MAINTAINER, maintainer_email=MAINTAINER_EMAIL, license=LICENSE, url=URL, keywords=KEYWORDS, classifiers = filter(None, classifiers.split("\n")), long_description = "\n".join(doclines[2:]), py_modules=PY_MODULES, ext_modules=[Extension("P4Client", ["P4Clientmodule.cc"], include_dirs=["p4api"], library_dirs=["p4api"], libraries=["oldnames", "wsock32", "advapi32", # MSVC libs "libclient", "librpc", "libsupp"], # P4API libs extra_compile_args=["/DOS_NT", "/DMT", "/DCASE_INSENSITIVE"], # DEBUG options # extra_compile_args=["/DOS_NT", "/DMT", "/DCASE_INSENSITIVE", "/Od", '/Z7', '/D_DEBUG'], extra_link_args=["/NODEFAULTLIB:libcmt"], # extra_link_args=["/NODEFAULTLIB:libcmt", "/DEBUG"], )]) else: # Assume Linux setup(name=NAME, version=VERSION, description=DESCRIPTION, author=AUTHOR, author_email=AUTHOR_EMAIL, maintainer=MAINTAINER, maintainer_email=MAINTAINER_EMAIL, license=LICENSE, url=URL, keywords=KEYWORDS, classifiers = filter(None, classifiers.split("\n")), long_description = "\n".join(doclines[2:]), py_modules=PY_MODULES, ext_modules=[Extension("P4Client", ["P4Clientmodule.cc"], include_dirs=["p4api"], library_dirs=["p4api"], libraries=["client", "rpc", "supp"], # P4API libs extra_compile_args=["-DOS_LINUX"], )]) if __name__ == "__main__": do_setup()
# | Change | User | Description | Committed | |
---|---|---|---|---|---|
#1 | 5750 | Robert Cowham | New branch | ||
//guest/robert_cowham/perforce/API/python/main/setup.py | |||||
#7 | 5061 | Robert Cowham | Updated distutils info for PyPI registration. | ||
#6 | 5057 | Robert Cowham |
- Added P4Error class and catch all errors - shouldn't see P4Client.error any more! - Raise the error when appropriate. - Added translate() function to allow working with Internationalised servers. - Fix problem with diff2 and diff |
||
#5 | 4812 | Robert Cowham |
Made it ready for PyPI (Python Package Index) release and did that. Fixed perf.py script to be compatible with latest changes. |
||
#4 | 4771 | Robert Cowham |
Revised build procedures. Release updated binaries from previous checkin. |
||
#3 | 4766 | Robert Cowham |
Rather better documentation (and license and changelog). Reorganised dirs. Added .zip file and windows binary installer. |
||
#2 | 4758 | Robert Cowham |
Fix line endings. Make less Windows specific. |
||
#1 | 4755 | Robert Cowham |
Rename //guest/robert_cowham/perforce/API/python/P4Client/... To //guest/robert_cowham/perforce/API/python/main/... |
||
//guest/robert_cowham/perforce/API/python/P4Client/setup.py | |||||
#2 | 4618 | Robert Cowham |
Note that the contents of p4.py is now in p4cmd.py as I want to re-use the name p4.py for the more general module case. Started converting package to be more like p4ruby and p4perl in the way it works. |
||
#1 | 4592 | Robert Cowham |
Untabbed. Added setup.py - works for ActiveState Python 2.3! |