|
11 | 11 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
12 | 12 | # See the License for the specific language governing permissions and |
13 | 13 | # limitations under the License. |
14 | | -import io |
15 | | -import os |
| 14 | + |
| 15 | +try: |
| 16 | + # Python 3.11+ |
| 17 | + import tomllib |
| 18 | +except Exception: |
| 19 | + # for older versions |
| 20 | + import tomli as tomllib |
| 21 | + |
| 22 | +with open("pyproject.toml", "rb") as f: |
| 23 | + pyproject = tomllib.load(f) |
| 24 | + project = pyproject["project"] |
16 | 25 |
|
17 | 26 | from setuptools import find_packages, setup |
18 | 27 |
|
19 | 28 | from appium.common.helper import library_version |
20 | 29 |
|
| 30 | + |
21 | 31 | setup( |
22 | | - name='Appium-Python-Client', |
| 32 | + name=project["name"], |
23 | 33 | version=library_version(), |
24 | | - description='Python client for Appium', |
25 | | - long_description=io.open(os.path.join(os.path.dirname('__file__'), 'README.md'), encoding='utf-8').read(), |
26 | | - long_description_content_type='text/markdown', |
27 | | - keywords=['appium', 'selenium', 'selenium 4', 'python client', 'mobile automation'], |
28 | | - author='Isaac Murchie', |
29 | | - |
30 | | - maintainer='Kazuaki Matsuo, Mykola Mokhnach, Mori Atsushi', |
31 | | - url='http://appium.io/', |
| 34 | + description=project["description"], |
| 35 | + keywords=project["keywords"], |
| 36 | + author=project["authors"][0]["name"], |
| 37 | + author_email=project["authors"][0]["email"], |
| 38 | + maintainer=project["maintainers"][0]["name"], |
| 39 | + url=project["urls"]["Homepage"], |
32 | 40 | package_data={'appium': ['py.typed']}, |
33 | 41 | packages=find_packages(include=['appium*']), |
34 | | - license='Apache 2.0', |
35 | | - classifiers=[ |
36 | | - 'Development Status :: 5 - Production/Stable', |
37 | | - 'Programming Language :: Python', |
38 | | - 'Programming Language :: Python :: 3.9', |
39 | | - 'Programming Language :: Python :: 3.10', |
40 | | - 'Programming Language :: Python :: 3.11', |
41 | | - 'Programming Language :: Python :: 3.12', |
42 | | - 'Programming Language :: Python :: 3.13', |
43 | | - 'Environment :: Console', |
44 | | - 'Environment :: MacOS X', |
45 | | - 'Environment :: Win32 (MS Windows)', |
46 | | - 'Intended Audience :: Developers', |
47 | | - 'Intended Audience :: Other Audience', |
48 | | - 'License :: OSI Approved :: Apache Software License', |
49 | | - 'Operating System :: OS Independent', |
50 | | - 'Topic :: Software Development :: Quality Assurance', |
51 | | - 'Topic :: Software Development :: Testing', |
52 | | - ], |
53 | | - install_requires=['selenium ~= 4.26, < 5.0'], |
| 42 | + license=project["license"]["text"], |
| 43 | + classifiers=project['classifiers'], |
| 44 | + install_requires=project['dependencies'], |
54 | 45 | ) |
0 commit comments