|
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 | +# FIXME: Remove this setup.py completely. |
| 16 | +# Then, we should bump the major version since the package will not include setup.py. |
| 17 | + |
| 18 | +try: |
| 19 | + # Python 3.11+ |
| 20 | + import tomllib |
| 21 | +except Exception: |
| 22 | + # for older versions |
| 23 | + import tomli as tomllib |
| 24 | + |
| 25 | +with open('pyproject.toml', 'rb') as f: |
| 26 | + pyproject = tomllib.load(f) |
| 27 | + project = pyproject['project'] |
16 | 28 |
|
17 | 29 | from setuptools import find_packages, setup |
18 | 30 |
|
19 | 31 | from appium.common.helper import library_version |
20 | 32 |
|
21 | 33 | setup( |
22 | | - name='Appium-Python-Client', |
| 34 | + name=project['name'], |
23 | 35 | 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/', |
| 36 | + description=project['description'], |
| 37 | + keywords=project['keywords'], |
| 38 | + author=project['authors'][0]['name'], |
| 39 | + author_email=project['authors'][0]['email'], |
| 40 | + maintainer=', '.join([maintainer['name'] for maintainer in project['maintainers']]), |
| 41 | + url=project['urls']['Homepage'], |
32 | 42 | package_data={'appium': ['py.typed']}, |
33 | 43 | 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'], |
| 44 | + license=project['license']['text'], |
| 45 | + classifiers=project['classifiers'], |
| 46 | + install_requires=project['dependencies'], |
54 | 47 | ) |
0 commit comments