|
1 | 1 | ## Building P4Python from Source |
2 | 2 |
|
3 | | - 1. Download the r23.1 Perforce C++ API from the Perforce FTP site at |
4 | | - "ftp://ftp.perforce.com/perforce". The API archive is located |
5 | | - in release and platform-specific subdirectories. |
| 3 | + 1. Download the corresponding Perforce C++ API (e.g. if you trying to build P4Python 2023.1, download the r23.1 P4API) from |
| 4 | + https://ftp.perforce.com/perforce. The API archive is located in release and platform-specific subdirectories. |
6 | 5 |
|
7 | | - Under Linux the p4api is named p4api-glib<GLIBVER>-openssl<SSLVER>.tgz\ |
8 | | - Note that setup.py will download the correct p4api automatically from |
9 | | - ftp.perforce.com if you do not provide an --apidir parameter to the |
10 | | - setup.py "build" command. |
| 6 | + Under Linux, the p4api is named _p4api-glib\<GLIBVER>-openssl\<SSLVER>.tgz_ |
| 7 | + |
| 8 | + Note that setup.py will download the correct p4api automatically from |
| 9 | + https://ftp.perforce.com/perforce if you do not provide an\ |
| 10 | + _--apidir_ parameter to the "setup.py build" command. |
11 | 11 |
|
12 | 12 | Mac OS X users should get the API from the relevant platform directory e.g. |
13 | | - "**bin.macosx1010x86_64**" or "**bin.macosx12arm64**". The p4api is named |
14 | | - p4api-openssl<SSLVER>.tgz |
| 13 | + "**bin.macosx1015x86_64**" or "**bin.macosx12arm64**".\ |
| 14 | + The p4api is named _p4api-openssl\<SSLVER>.tgz_ |
15 | 15 |
|
16 | 16 | Under Windows the p4api needs to match your compiler, build type (static |
17 | 17 | or dynamic) and SSL version. for instance: |
18 | | - |
19 | | - "**p4api_vs2010_static_openssl1.1.1.zip**" or\ |
20 | | - "**p4api_vs2015_dyn_openssl1.0.2.zip**" |
| 18 | + "**p4api_vs2019_static_openssl3.zip**" or "**p4api_vs2019_dyn_openssl3.zip**" |
21 | 19 |
|
22 | 20 | Note: 32-bit builds of P4Python require a 32-bit version of the |
23 | 21 | C++ API and a 32-bit version of Python. 64-bit builds of |
|
26 | 24 |
|
27 | 25 | Unzip the archive into an empty directory. |
28 | 26 |
|
29 | | - 2. Download and extract the P4Python API archive into a new, empty directory. |
| 27 | + 4. Download the P4Python source code from https://github.com/perforce/p4python and extract the archive into a new empty directory. |
30 | 28 |
|
31 | | - 3. If needed, install the Openssl libraries. |
| 29 | + 5. If needed, install the Openssl libraries. |
32 | 30 |
|
33 | | - 4. To build P4Python, run the following command: |
| 31 | + 6. To build P4Python, run the following command: |
34 | 32 |
|
35 | | - _python3 setup.py build --apidir <Perforce C++ API absolute path> |
36 | | - --ssl <OpenSSL library path> _ |
| 33 | + _python3 setup.py build --apidir <Perforce C++ API absolute path> --ssl \<OpenSSL library path>_ |
37 | 34 |
|
38 | 35 | Note: in order to reinstall cleanly P4Python, remove the |
39 | 36 | directory named "build". |
40 | 37 |
|
41 | | - 5. To test your P4Python build, run the following command: |
| 38 | + 7. To test your P4Python build, run the following command: |
42 | 39 |
|
43 | 40 | _python3 p4test.py_ |
44 | 41 |
|
45 | 42 | Note: this test harness requires the Perforce server executable |
46 | 43 | p4d 17.1 or better to be installed and in the PATH. |
47 | 44 |
|
48 | | - 6. To install P4Python, run the following command: |
| 45 | + 8. To install P4Python, run the following command: |
49 | 46 |
|
50 | 47 | _python3 setup.py install_ |
51 | 48 |
|
52 | 49 | if this doesn't work, you may need to both build and install in the same |
53 | 50 | incantation: |
54 | 51 |
|
55 | | - _python3 setup.py build --apidir <Perforce C++ API absolute path> --ssl <OpenSSL library path> install_ |
| 52 | + _python3 setup.py build --apidir <Perforce C++ API absolute path> --ssl \<OpenSSL library path> install_ |
56 | 53 |
|
57 | 54 | Note: on Unix/Mac platforms, the installation must be performed |
58 | 55 | as the root user, so usually these commands are preceded by "sudo". |
|
0 commit comments