Skip to content

Commit 87ad7d3

Browse files
committed
🚚 Rename setup_test_app.py to setup.py
Because reducing filename to `setup.py` will make our cli arguments shorter and source code cleaner
1 parent 605feb3 commit 87ad7d3

File tree

6 files changed

+10
-11
lines changed

6 files changed

+10
-11
lines changed

Makefile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,13 +37,13 @@ rebuild_updated_recipes: virtualenv
3737

3838
testapps/arm64-v8a: virtualenv
3939
. $(ACTIVATE) && cd testapps/on_device_unit_tests/ && \
40-
python setup_test_app.py apk --sdk-dir $(ANDROID_SDK_HOME) --ndk-dir $(ANDROID_NDK_HOME) \
40+
python setup.py apk --sdk-dir $(ANDROID_SDK_HOME) --ndk-dir $(ANDROID_NDK_HOME) \
4141
--requirements libffi,sdl2,pyjnius,kivy,python3,openssl,requests,sqlite3,setuptools,numpy \
4242
--arch=arm64-v8a
4343

4444
testapps/armeabi-v7a: virtualenv
4545
. $(ACTIVATE) && cd testapps/on_device_unit_tests/ && \
46-
python setup_test_app.py apk --sdk-dir $(ANDROID_SDK_HOME) --ndk-dir $(ANDROID_NDK_HOME) \
46+
python setup.py apk --sdk-dir $(ANDROID_SDK_HOME) --ndk-dir $(ANDROID_NDK_HOME) \
4747
--arch=armeabi-v7a
4848

4949
clean:

ci/rebuild_updated_recipes.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,6 @@ def build(target_python, requirements):
5252
"""
5353
if not requirements:
5454
return
55-
testapp = 'setup_test_app.py'
5655
android_sdk_home = os.environ['ANDROID_SDK_HOME']
5756
android_ndk_home = os.environ['ANDROID_NDK_HOME']
5857
requirements.add(target_python.name)
@@ -61,7 +60,7 @@ def build(target_python, requirements):
6160
with current_directory('testapps/on_device_unit_tests/'):
6261
# iterates to stream the output
6362
for line in sh.python(
64-
testapp, 'apk', '--sdk-dir', android_sdk_home,
63+
'setup.py', 'apk', '--sdk-dir', android_sdk_home,
6564
'--ndk-dir', android_ndk_home, '--requirements',
6665
requirements, _err_to_out=True, _iter=True):
6766
print(line)

doc/source/testing_pull_requests.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -172,7 +172,7 @@ Installing python-for-android using the github's branch of the pull request
172172

173173
.. code-block:: bash
174174

175-
python3 setup_test_app.py apk \
175+
python3 setup.py apk \
176176
--ndk-dir=/media/DEVEL/Android/android-ndk-r20 \
177177
--sdk-dir=/media/DEVEL/Android/android-sdk-linux \
178178
--android-api=27 \
@@ -183,7 +183,7 @@ Installing python-for-android using the github's branch of the pull request
183183
Things that you should know:
184184

185185
- In the example above, we override some variables that are set in
186-
`setup_test_app.py`, you could also override them by editing this file
186+
`setup.py`, you could also override them by editing this file
187187
- be sure to at least edit the following arguments when running the above
188188
command, since the default set in there it's unlikely that match your
189189
installation:

testapps/on_device_unit_tests/README.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ It currently supports three app `modes`:
1515
The main tests are for the recipes built in the apk. Each module (or
1616
other tool) is at least imported and subject to some basic check.
1717

18-
This test app can be build via `setup_test_app.py` or via buildozer. In both
18+
This test app can be build via `setup.py` or via buildozer. In both
1919
cases it will build a basic kivy app with a set of tests defined via the
2020
`requirements` keyword (specified at build time).
2121

@@ -26,7 +26,7 @@ permissions in your device to use such app).
2626
Building the app with python-for-android
2727
========================================
2828

29-
You can use the provided file `setup_test_app.py`. Check our `Makefile
29+
You can use the provided file `setup.py`. Check our `Makefile
3030
<https://github.com/kivy/python-for-android/blob/develop/Makefile>`__ to guess
3131
how to build the test app, or also you can look at `testing pull requests documentation
3232
<https://github.com/kivy/python-for-android/blob/develop/doc/source/testing_pull_requests.rst>`__,

testapps/on_device_unit_tests/test_app/main.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,9 @@
1414
- A unittest app (webview bootstrap)
1515
- A non-gui unittests app
1616
17-
If you install/build this app via the `setup_test_app.py` file, a file named
17+
If you install/build this app via the `setup.py` file, a file named
1818
`app_requirements.txt` will be generated which will contain the requirements
19-
that we passed to the `setup_test_app.py` via arguments, which will determine
19+
that we passed to the `setup.py` via arguments, which will determine
2020
the unittests that this app will run.
2121
2222
.. note:: This app is made to be working on desktop and on an android device.
@@ -27,7 +27,7 @@
2727
these on desktop just by editing the file `app_requirements.txt`,
2828
which should be located at the same location than this file. This
2929
`app_requirements.txt` file, it's autogenerated when the
30-
`setup_test_app.py` is ran, so in certain circumstances, you may need
30+
`setup.py` is ran, so in certain circumstances, you may need
3131
to create it. Also be aware that each `python-for-android` recipe
3232
that you want to test should be in a new line, taking into account the
3333
case of the recipe.

0 commit comments

Comments
 (0)