[p4] Python scripting with Perforce

Jason Dillon Jason.Dillon at paybytouch.com
Sat Oct 1 16:19:35 PDT 2005

> It uses distutils which works pretty well - do you not have gcc
> For RPM, it should be as simple as "python setup.py bdist_rpm" and 
> anyone who does this and cares to send me the results I will put them 
> on the web page.

Well, it didn't work just like that... but that is only because p4api is
not included.

I had to grab p4api.tar, and extract under p4api/*

Then I created MANIFEST.in:

include *.txt
include P4Clientmodule.cc
include *.py
include p4api/*
include test/*.py
include utils/*.py

and then `python setup.py bdist_rpm` did the right thing.

I documented what I did here:


And I also attached the SRPM for Linux 24x86.  It's not a traditional
SRPM as it contains the p4api dist.  Should really package p4api into an
RPM, then make it a BuildRequires, but that is a bit too grand for me to
take on right now.

Thanks for the hint about bdist_rpm ;-)



More information about the perforce-user mailing list