Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ the Selenium Python binding update might affect the Appium Python Client behavio
For example, some changes in the Selenium binding could break the Appium client.

> **Note**
> We strongly recommend you manage dependencies with version management tools such as
> We strongly recommend you manage dependencies with version management tools such as
> [uv](https://docs.astral.sh/uv/) to keep compatible version combinations.


Expand Down Expand Up @@ -450,7 +450,7 @@ You have two methods to extend the read timeout.

```bash
make install-uv
exec $SHELL
exec $SHELL
make sync-dev
```

Expand Down Expand Up @@ -533,7 +533,7 @@ Follow the below steps.
```bash
uv pip install setuptools
uv pip install twine
uv pip install git+https://github.com/vaab/gitchangelog.git # Getting via GitHub repository is necessary for Python 3.7
uv pip install gitchangelog
# Type the new version number and 'yes' if you can publish it
# You can test the command with DRY_RUN
DRY_RUN=1 ./release.sh
Expand Down
46 changes: 37 additions & 9 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,20 +1,41 @@
[project]
name = "Appium-Python-Client"
dynamic = [
"version",
"description",
"readme",
"license",
"authors",
"maintainers",
"keywords",
"classifiers"
description = "Python client for Appium"
readme = "README.md"
license = "Apache-2.0"
license-files = ["LICENSE"]
authors = [
{name = "Isaac Murchie", email = "isaac@saucelabs.com"},
]
maintainers = [
{name = "Kazuaki Matsuo"},
{name = "Mykola Mokhnach"},
{name = "Mori Atsushi"},
]
keywords = ["appium", "selenium", "python client", "mobile automation"]
classifiers = [
"Development Status :: 5 - Production/Stable",
"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",
"Environment :: Console",
"License :: OSI Approved :: Apache Software License",
"Topic :: Software Development :: Testing",
]
requires-python = ">=3.9"
dependencies = [
"selenium>=4.26,<5.0",
"typing-extensions~=4.13",
]
dynamic = ["version"]

[project.urls]
Homepage = "http://appium.io/"
Repository = "https://github.com/appium/python-client"
Issues = "https://github.com/appium/python-client/issues"
Changelog = "https://github.com/appium/python-client/blob/master/CHANGELOG.rst"

[tool.uv]
dev-dependencies = [
Expand All @@ -39,5 +60,12 @@ source = "regex"
path = "appium/version.py"
pattern = "(?P<version>\\d+\\.\\d+\\.\\d+)"

[tool.hatch.build]
exclude = [
"test/",
"script/",
"release.sh"
]

[tool.hatch.build.targets.wheel]
packages = ["appium"]
5 changes: 3 additions & 2 deletions script/release.py
Original file line number Diff line number Diff line change
Expand Up @@ -71,9 +71,10 @@ def tag_and_generate_changelog(new_version_num):


def upload_sdist(new_version_num):
wheel_file = 'dist/appium_python_client-{}-py3-none-any.whl'.format(new_version_num)
push_file = 'dist/appium_python_client-{}.tar.gz'.format(new_version_num)
try:
call_bash_script('uv run twine upload "{}"'.format(push_file))
call_bash_script(f"uv run twine upload '{wheel_file}' '{push_file}'")
except Exception as e:
print(
'Failed to upload {} to pypi. Please fix the original error and push it again later. Original error: {}'.format(
Expand All @@ -99,7 +100,7 @@ def ensure_publication(new_version_num):


def build_sdist():
call_bash_script('uv run python setup.py sdist')
call_bash_script('uv build')


def build() -> None:
Expand Down
55 changes: 24 additions & 31 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,44 +11,37 @@
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
import io
import os

# FIXME: Remove this setup.py completely.
Copy link
Contributor

Choose a reason for hiding this comment

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

should we also have a TODO to remove release.py? I assume all uv-specific steps could be moved to a makefile script instead

Copy link
Member Author

Choose a reason for hiding this comment

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

I assume release.py itself can be removed without major version update. I'm still modifying for it so still haven't ended with comment

# Then, we should bump the major version since the package will not include setup.py.

try:
# Python 3.11+
import tomllib
except Exception:
# for older versions
import tomli as tomllib

with open('pyproject.toml', 'rb') as f:
pyproject = tomllib.load(f)
project = pyproject['project']

from setuptools import find_packages, setup

from appium.common.helper import library_version

setup(
name='Appium-Python-Client',
name=project['name'],
version=library_version(),
description='Python client for Appium',
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', 'selenium', 'selenium 4', 'python client', 'mobile automation'],
author='Isaac Murchie',
author_email='isaac@saucelabs.com',
maintainer='Kazuaki Matsuo, Mykola Mokhnach, Mori Atsushi',
url='http://appium.io/',
description=project['description'],
keywords=project['keywords'],
author=project['authors'][0]['name'],
author_email=project['authors'][0]['email'],
maintainer=', '.join([maintainer['name'] for maintainer in project['maintainers']]),
url=project['urls']['Homepage'],
package_data={'appium': ['py.typed']},
packages=find_packages(include=['appium*']),
license='Apache 2.0',
classifiers=[
'Development Status :: 5 - Production/Stable',
'Programming Language :: Python',
'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',
'Environment :: Console',
'Environment :: MacOS X',
'Environment :: Win32 (MS Windows)',
'Intended Audience :: Developers',
'Intended Audience :: Other Audience',
'License :: OSI Approved :: Apache Software License',
'Operating System :: OS Independent',
'Topic :: Software Development :: Quality Assurance',
'Topic :: Software Development :: Testing',
],
install_requires=['selenium ~= 4.26, < 5.0'],
license=project['license']['text'],
classifiers=project['classifiers'],
install_requires=project['dependencies'],
)