@@ -43,28 +43,28 @@ Fetch the pull request by number
43
43
For the example, we will use `1901 ` for the example) and the pull request
44
44
branch that we will use is `feature-fix-numpy `, then you will use a variation
45
45
of the following git command:
46
- `git fetch origin pull/<#>/head:<local_branch_name> `, eg.: :
46
+ `git fetch origin pull/<#>/head:<local_branch_name> `, e.g. :
47
47
48
- .. codeblock :: bash
48
+ .. code-block :: bash
49
49
50
- git fetch upstream pull/1901/head:feature-fix-numpy
50
+ git fetch upstream pull/1901/head:feature-fix-numpy
51
51
52
52
.. note :: Notice that we fetch from `upstream`, since that is the original
53
53
project, where the pull request is supposed to be
54
54
55
55
.. tip :: The amount of work of some users maybe worth it to add his remote
56
56
to your fork's git configuration, to do so with the imaginary
57
57
github user `Obi-Wan Kenobi ` which nickname is `obiwankenobi `, you
58
- will do::
58
+ will do:
59
59
60
- .. codeblock :: bash
60
+ .. code-block :: bash
61
61
62
62
git remote add obiwankenobi https://github.com/obiwankenobi/python-for-android.git
63
63
64
64
And to fetch the pull request branch that we put as example, you
65
- would do::
65
+ would do:
66
66
67
- .. codeblock :: bash
67
+ .. code-block :: bash
68
68
69
69
git fetch obiwankenobi
70
70
git checkout obiwankenobi/feature-fix-numpy
@@ -74,9 +74,9 @@ Clone the pull request branch from the user's fork
74
74
--------------------------------------------------
75
75
Sometimes you may prefer to use directly the fork of the user, so you will get
76
76
the nickname of the user who created the pull request, let's take the same
77
- imaginary user than before `obiwankenobi `::
77
+ imaginary user than before `obiwankenobi `:
78
78
79
- .. codeblock :: bash
79
+ .. code-block :: bash
80
80
81
81
git clone -b feature-fix-numpy \
82
82
--single-branch \
@@ -103,25 +103,25 @@ Using python-for-android commands directly from the pull request files
103
103
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
104
104
105
105
- Enter inside the directory of the cloned repository in the above
106
- step and run p4a command with proper args, eg (to test an modified
107
- `pycryptodome ` recipe)::
108
-
109
- .. codeblock :: bash
110
-
111
- cd p4a-feature-fix-numpy
112
- PYTHONPATH=. python3 -m pythonforandroid.toolchain apk \
113
- --private=testapps/on_device_unit_tests/test_app \
114
- --dist-name=dist_unit_tests_app_pycryptodome \
115
- --package=org.kivy \
116
- --name=unit_tests_app_pycryptodome \
117
- --version=0.1 \
118
- --requirements=sdl2,pyjnius,kivy,python3,pycryptodome \
119
- --ndk-dir=/media/DEVEL/Android/android-ndk-r20 \
120
- --sdk-dir=/media/DEVEL/Android/android-sdk-linux \
121
- --android-api=27 \
122
- --arch=arm64-v8a \
123
- --permission=VIBRATE \
124
- --debug
106
+ step and run p4a command with proper args, e.g. (to test an modified
107
+ `pycryptodome ` recipe)
108
+
109
+ .. code-block :: bash
110
+
111
+ cd p4a-feature-fix-numpy
112
+ PYTHONPATH=. python3 -m pythonforandroid.toolchain apk \
113
+ --private=testapps/on_device_unit_tests/test_app \
114
+ --dist-name=dist_unit_tests_app_pycryptodome \
115
+ --package=org.kivy \
116
+ --name=unit_tests_app_pycryptodome \
117
+ --version=0.1 \
118
+ --requirements=sdl2,pyjnius,kivy,python3,pycryptodome \
119
+ --ndk-dir=/media/DEVEL/Android/android-ndk-r20 \
120
+ --sdk-dir=/media/DEVEL/Android/android-sdk-linux \
121
+ --android-api=27 \
122
+ --arch=arm64-v8a \
123
+ --permission=VIBRATE \
124
+ --debug
125
125
126
126
Things that you should know:
127
127
@@ -153,31 +153,31 @@ Installing python-for-android using the github's branch of the pull request
153
153
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
154
154
155
155
- Enter inside the directory of the cloned repository mentioned in
156
- `Common steps ` and install it via pip, eg.: :
156
+ `Common steps ` and install it via pip, e.g. :
157
157
158
- .. codeblock :: bash
158
+ .. code-block :: bash
159
159
160
- cd p4a-feature-fix-numpy
161
- pip3 install . --upgrade --user
160
+ cd p4a-feature-fix-numpy
161
+ pip3 install . --upgrade --user
162
162
163
163
- Now, go inside the `testapps/on_device_unit_tests ` directory (we assume that
164
- you still are inside the cloned repository)::
164
+ you still are inside the cloned repository)
165
165
166
- .. codeblock :: bash
166
+ .. code-block :: bash
167
167
168
- cd testapps/on_device_unit_tests
168
+ cd testapps/on_device_unit_tests
169
169
170
170
- Run the build of the apk via the freshly installed copy of python-for-android
171
- by running a similar command than below::
171
+ by running a similar command than below
172
172
173
- .. code-block:: bash
173
+ .. code-block :: bash
174
174
175
- python3 setup.py apk \
176
- --ndk-dir=/media/DEVEL/Android/android-ndk-r20 \
177
- --sdk-dir=/media/DEVEL/Android/android-sdk-linux \
178
- --android-api=27 \
179
- --arch=arm64-v8a \
180
- --debug
175
+ python3 setup.py apk \
176
+ --ndk-dir=/media/DEVEL/Android/android-ndk-r20 \
177
+ --sdk-dir=/media/DEVEL/Android/android-sdk-linux \
178
+ --android-api=27 \
179
+ --arch=arm64-v8a \
180
+ --debug
181
181
182
182
183
183
Things that you should know:
@@ -207,7 +207,7 @@ Using buildozer with a custom app
207
207
208
208
p4a.source_dir = /home/user/p4a_pull_requests/p4a-feature-fix-numpy
209
209
210
- - Run you buildozer command as usual, eg .::
210
+ - Run you buildozer command as usual, e.g .::
211
211
212
212
buildozer android debug p4a --dist-name=dist-test-feature-fix-numpy
213
213
@@ -223,4 +223,4 @@ Using buildozer with a custom app
223
223
.. tip :: this method it's useful for developing pull requests since you can
224
224
edit `p4a.source_dir ` to point to your python-for-android fork and you
225
225
can test any branch you want only switching branches with:
226
- `git checkout <branch-name> ` from inside your python-for-android fork
226
+ `git checkout <branch-name> ` from inside your python-for-android fork
0 commit comments