Skip to content
18 changes: 18 additions & 0 deletions pythonforandroid/recipes/mysql-connector-python/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
from pythonforandroid.recipe import CompiledComponentsPythonRecipe


class MySQLConnectorPythonRecipe(CompiledComponentsPythonRecipe):

name = 'mysql-connector-python'
version = '8.3.0'
url = (
f'https://dev.mysql.com/get/Downloads/'
f'Connector-J/mysql-connector-j-{version}.tar.gz'
Copy link
Member

@AndreMiras AndreMiras Feb 26, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oops remove that line, we will get there I promise 😅
I've messed up the URL too, the prefix with "Connector-J" should be "Connector-Python" as well.
For example a full working URL would be, but we need to use the {version} template obviously
https://dev.mysql.com/get/Downloads/Connector-Python/mysql-connector-python-8.3.0-src.tar.gz

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

😂no problem we will fix it!

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We're not far from getting this merged, would you mind looking this up? We simply need to get that URL right.
Don't forget to check the linter locally before pushing too

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How can i test it locally?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For the linting, running flake8 should be enough.

python -m venv venv
venv/bin/pip install flake8
venv/bin/flake8 pythonforandroid/

f'Connector-J/mysql-connector-python-{version}.tar.gz'
)
call_hostpython_via_targetpython = False

depends = ['python3', 'setuptools']


recipe = MySQLConnectorPythonRecipe()