diff --git a/.github/workflows/finder-python.yml b/.github/workflows/finder-python.yml index 344d6549..5a6b170c 100644 --- a/.github/workflows/finder-python.yml +++ b/.github/workflows/finder-python.yml @@ -5,10 +5,12 @@ on: push: paths: - 'finder/python/**' + - '.github/workflows/finder-python.yml' branches: [ main ] pull_request: paths: - 'finder/python/**' + - '.github/workflows/finder-python.yml' branches: [ main ] permissions: @@ -32,10 +34,17 @@ jobs: - name: Install dependencies run: | python -m pip install --upgrade pip - pip install pylint pytest Appium-Python-Client + python -m pip install build pylint pytest twine Appium-Python-Client - name: Analyzing the code with pylint run: pylint tests/ appium_flutter_finder/ working-directory: finder/python - name: Run tests run: pytest tests/** working-directory: finder/python + - name: Build distributions + run: | + python -m build + python -m twine check dist/* + ls dist/appium_flutter_finder-*.tar.gz + ls dist/appium_flutter_finder-*.whl + working-directory: finder/python diff --git a/finder/python/README.md b/finder/python/README.md index 18c32eba..2412c451 100644 --- a/finder/python/README.md +++ b/finder/python/README.md @@ -10,20 +10,20 @@ Supported Python version follows appium python client. ``` 2. Install from source, via [PyPi](https://pypi.org). From ['Appium-Flutter-Finder'](https://pypi.org/project/Appium-Flutter-Finder/), -download and unarchive the source tarball (Appium-Flutter-Finder-X.X.tar.gz). +download and unarchive the source tarball (`appium_flutter_finder-X.X.tar.gz`). ```shell - tar -xvf Appium-Flutter-Finder-X.X.tar.gz - cd Appium-Flutter-Finder-X.X - python setup.py install + tar -xvf appium_flutter_finder-X.X.tar.gz + cd appium_flutter_finder-X.X + python -m pip install . ``` -3. Install from source via [GitHub](https://github.com/appium/python-client). +3. Install from source via [GitHub](https://github.com/appium/appium-flutter-driver). ```shell - git clone git@github.com:appium/python-client.git - cd python-client - python setup.py install + git clone git@github.com:appium/appium-flutter-driver.git + cd appium-flutter-driver/finder/python + python -m pip install . ``` # How to use @@ -31,18 +31,17 @@ Examples can be found out [here](../../example/python/example.py). # Release -``` -pip install twine -``` - -``` -python setup.py sdist -twine upload dist/Appium-Flutter-Finder-X.X.tar.gz +```shell +python -m pip install --upgrade build twine +python -m build +python -m twine check dist/* +python -m twine upload dist/appium_flutter_finder-* ``` # Changelog - 0.8.1 - Relax the Appium-Python-Client upper version to accept v6 + - Migrate package metadata and builds to `pyproject.toml` - 0.8.0 - Update the limit of python appium client version - 0.7.0 diff --git a/finder/python/pyproject.toml b/finder/python/pyproject.toml new file mode 100644 index 00000000..35afd4d7 --- /dev/null +++ b/finder/python/pyproject.toml @@ -0,0 +1,48 @@ +[build-system] +requires = ["setuptools>=77"] +build-backend = "setuptools.build_meta" + +[project] +name = "Appium-Flutter-Finder" +version = "0.8.1" +description = "An extension of finder for Appium flutter" +readme = "README.md" +license = "MIT" +authors = [ + {name = "Kazuaki Matsuo", email = "fly.49.89.over@gmail.com"}, +] +keywords = [ + "appium", + "flutter", + "python client", + "mobile automation", +] +classifiers = [ + "Development Status :: 5 - Production/Stable", + "Programming Language :: Python", + "Programming Language :: Python :: 3.7", + "Programming Language :: Python :: 3.8", + "Programming Language :: Python :: 3.9", + "Programming Language :: Python :: 3.10", + "Programming Language :: Python :: 3.11", + "Programming Language :: Python :: 3.12", + "Programming Language :: Python :: 3.13", + "Programming Language :: Python :: 3.14", + "Environment :: Console", + "Environment :: MacOS X", + "Environment :: Win32 (MS Windows)", + "Intended Audience :: Developers", + "Intended Audience :: Other Audience", + "Operating System :: OS Independent", + "Topic :: Software Development :: Quality Assurance", + "Topic :: Software Development :: Testing", +] +dependencies = [ + "Appium-Python-Client>=2.0.0,<7", +] + +[project.urls] +Homepage = "https://github.com/appium/appium-flutter-driver" + +[tool.setuptools.packages.find] +include = ["appium_flutter_finder*"] diff --git a/finder/python/setup.py b/finder/python/setup.py deleted file mode 100644 index 23fb97e1..00000000 --- a/finder/python/setup.py +++ /dev/null @@ -1,42 +0,0 @@ -#!/usr/bin/env python - -import io -import os - -from setuptools import find_packages, setup - -setup( - name='Appium-Flutter-Finder', - version='0.8.1', - description='An extension of finder for Appium flutter', - long_description=io.open(os.path.join(os.path.dirname('__file__'), 'README.md'), encoding='utf-8').read(), - long_description_content_type='text/markdown', - keywords=[ - 'appium', - 'flutter', - 'python client', - 'mobile automation' - ], - author='Kazuaki Matsuo', - author_email='fly.49.89.over@gmail.com', - url='https://github.com/appium/appium-flutter-driver', - packages=find_packages(include=['appium_flutter_finder*']), - license='MIT', - classifiers=[ - 'Development Status :: 5 - Production/Stable', - 'Programming Language :: Python', - 'Programming Language :: Python :: 3.7', - 'Programming Language :: Python :: 3.8', - 'Programming Language :: Python :: 3.9', - 'Environment :: Console', - 'Environment :: MacOS X', - 'Environment :: Win32 (MS Windows)', - 'Intended Audience :: Developers', - 'Intended Audience :: Other Audience', - 'License :: OSI Approved :: MIT License', - 'Operating System :: OS Independent', - 'Topic :: Software Development :: Quality Assurance', - 'Topic :: Software Development :: Testing' - ], - install_requires=['Appium-Python-Client >= 2.0.0, < 7'] -)