|
17 | 17 | or dynamic) and SSL version. for instance: |
18 | 18 | "**p4api_vs2019_static_openssl3.zip**" or "**p4api_vs2019_dyn_openssl3.zip**" |
19 | 19 |
|
20 | | - Note: 32-bit builds of P4Python require a 32-bit version of the |
21 | | - C++ API and a 32-bit version of Python. 64-bit builds of |
22 | | - P4Python require a 64-bit version of the C++ API and a |
23 | | - 64-bit version of Python. |
24 | | - |
| 20 | + **Note:** 32-bit builds of P4Python require a 32-bit version of the |
| 21 | + C++ API and a 32-bit version of Python. 64-bit builds of |
| 22 | + P4Python require a 64-bit version of the C++ API and a |
| 23 | + 64-bit version of Python. |
| 24 | + |
25 | 25 | Unzip the archive into an empty directory. |
26 | 26 |
|
27 | | - 4. Download the P4Python source code from https://github.com/perforce/p4python and extract the archive into a new empty directory. |
28 | | - |
29 | | - 5. If needed, install the Openssl libraries. |
30 | | - |
31 | | - 6. To build P4Python, run the following command: |
32 | | - |
33 | | - _python3 setup.py build --apidir <Perforce C++ API absolute path> --ssl \<OpenSSL library path>_ |
34 | | - |
35 | | - Note: in order to reinstall cleanly P4Python, remove the |
36 | | - directory named "build". |
37 | | - |
38 | | - 7. To test your P4Python build, run the following command: |
| 27 | + 4. Download the P4Python source code from this repository or https://ftp.perforce.com \ |
| 28 | + (e.g. for release 2023.1, source code can be found at https://ftp.perforce.com/perforce/r23.1/bin.tools/) \ |
| 29 | + extract the archive into a new empty directory. |
39 | 30 |
|
40 | | - _python3 p4test.py_ |
| 31 | + 7. If needed, install the Openssl libraries. |
41 | 32 |
|
42 | | - Note: this test harness requires the Perforce server executable |
43 | | - p4d 17.1 or better to be installed and in the PATH. |
| 33 | + 8. To build P4Python, execute setup.py in P4Python source directory, with the following arguments: |
44 | 34 |
|
45 | | - 8. To install P4Python, run the following command: |
| 35 | + ``` |
| 36 | + python3 setup.py build --apidir <Perforce C++ API absolute path> --ssl \<OpenSSL library path> |
| 37 | + ``` |
46 | 38 |
|
47 | | - _python3 setup.py install_ |
| 39 | + **Note:** In order to cleanly reinstall P4Python, remove the directory named "build". |
48 | 40 |
|
49 | | - if this doesn't work, you may need to both build and install in the same |
50 | | - incantation: |
| 41 | + 10. To test your P4Python build, excecute p4test.py: |
| 42 | + ``` |
| 43 | + python3 p4test.py |
| 44 | + ``` |
| 45 | + **Note:** This test requires the Perforce server executable p4d 17.1 or better to be installed and in the PATH. |
51 | 46 |
|
52 | | - _python3 setup.py build --apidir <Perforce C++ API absolute path> --ssl \<OpenSSL library path> install_ |
| 47 | + 12. To install P4Python, execute the following command: |
| 48 | + |
| 49 | + ``` |
| 50 | + python3 setup.py install |
| 51 | + ``` |
| 52 | + |
| 53 | + |
| 54 | + If this doesn't work, you may need to build and install in the same command: |
53 | 55 |
|
54 | | - Note: on Unix/Mac platforms, the installation must be performed |
55 | | - as the root user, so usually these commands are preceded by "sudo". |
56 | | - Also ensure that the umask is set correctly (typically 0022) before |
57 | | - running the install. With a umask of 027, for example, the resulting |
58 | | - installed files are accessible only by users of group root. |
| 56 | + ``` |
| 57 | + python3 setup.py build --apidir <Perforce C++ API absolute path> --ssl \<OpenSSL library path> install |
| 58 | + ``` |
59 | 59 |
|
60 | | - on Windows platforms, open a Visual Studio Command window |
61 | | - (with administrator permissions) and run the command there. |
| 60 | + **Note:** On Unix/Mac platforms, the installation must be performed |
| 61 | + as the root user, so usually these commands are preceded by "sudo". |
| 62 | + Also ensure that the umask is set correctly (typically 0022) before |
| 63 | + running the install. With a umask of 027, for example, the resulting |
| 64 | + installed files are accessible only by users of group root.\ |
| 65 | + On Windows platforms, open a Visual Studio Command window |
| 66 | + (with administrator permissions) and run the command there. |
62 | 67 |
|
63 | 68 | SSL support |
64 | 69 | ----------- |
65 | 70 |
|
66 | | - Perforce Server 2012.1 and later supports SSL connections and the |
67 | | - C++ API has been compiled with this support. With 2020.1 SSL support |
68 | | - is mandatory, that is, P4Python must be linked with valid OpenSSL libraries. |
| 71 | +Perforce Server 2012.1 and later supports SSL connections and the |
| 72 | +C++ API has been compiled with this support. With 2020.1 SSL support |
| 73 | +is mandatory, that is, P4Python must be linked with valid OpenSSL libraries. |
69 | 74 |
|
70 | | - To specify which SSL library to use, provide the --ssl [librarypath] |
71 | | - switch to the build. Without [librarypath] setup will attempt to run |
72 | | - "openssl version" to identify the location of the library path for |
73 | | - openssl and whether openssl has an appropriate version to link to. |
| 75 | +To specify which SSL library to use, provide the --ssl \<OpenSSL library path> |
| 76 | +switch to the build. Without this setup will attempt to run |
| 77 | +"openssl version" to identify the location of the library path for |
| 78 | +openssl and whether openssl has an appropriate version to link to. |
74 | 79 |
|
75 | | - If on linux, and the build process cannot find the correct openssl |
76 | | - libraries, and the -ssl option was not used, then the openssl source will |
77 | | - be downloaded, compiled and installed (this will require a superuser |
78 | | - password for the installation) |
| 80 | +If on linux, and the build process cannot find the correct openssl |
| 81 | +libraries, and the -ssl option was not used, then the openssl source will |
| 82 | +be downloaded, compiled and installed (this will require a superuser |
| 83 | +password for the installation) |
0 commit comments