Debian Codegraph @

setup.py

raw symbols SCIP
1 #!/usr/bin/env python3
2
3 import subprocess
4 import sys
5
6 from setuptools import Command, setup
7
8
9 class VersionCheckCommand(Command):
10 """Make sure git tag and version match before uploading"""
11
12 user_options = []
13
14 def initialize_options(self):
15 """Abstract method that is required to be overwritten"""
16
17 def finalize_options(self):
18 """Abstract method that is required to be overwritten"""
19
20 def run(self):
21 version = self.distribution.get_version()
22 version_git = (
23 subprocess.check_output(['git', 'describe', '--tags', '--always'])
24 .rstrip()
25 .decode('utf-8')
26 )
27 if version != version_git:
28 print(
29 'ERROR: Release version mismatch! setup.py (%s) does not match git (%s)'
30 % (version, version_git)
31 )
32 sys.exit(1)
33 print('Upload using: twine upload --sign dist/sdkmanager-%s.tar.gz' % version)
34
35
36 with open("README.md", "r") as fh:
37 long_description = fh.read()
38
39 setup(
40 name='sdkmanager',
41 version='0.7.1',
42 description='Android SDK Manager',
43 long_description=long_description,
44 long_description_content_type='text/markdown',
45 author='The F-Droid Project',
46 author_email='[email protected]',
47 url='https://gitlab.com/fdroid/sdkmanager',
48 license='AGPL-3.0',
49 py_modules=['sdkmanager'],
50 entry_points={'console_scripts': ['sdkmanager=sdkmanager:main']},
51 python_requires='>=3.8',
52 cmdclass={'versioncheck': VersionCheckCommand},
53 install_requires=[
54 "argcomplete",
55 "requests > 2.12.2, != 2.18.0",
56 'looseversion; python_version>="3.12"',
57 ],
58 extras_require={'test': ['defusedxml', 'requests-cache']},
59 classifiers=[
60 'Development Status :: 4 - Beta',
61 'Intended Audience :: Developers',
62 'Intended Audience :: Information Technology',
63 'Intended Audience :: System Administrators',
64 'Intended Audience :: Telecommunications Industry',
65 'License :: OSI Approved :: GNU Affero General Public License v3 or later (AGPLv3+)',
66 'Operating System :: MacOS :: MacOS X',
67 'Operating System :: POSIX',
68 'Operating System :: POSIX :: Linux',
69 'Operating System :: Unix',
70 'Programming Language :: Python :: 3',
71 'Programming Language :: Python :: 3.8',
72 'Programming Language :: Python :: 3.9',
73 'Programming Language :: Python :: 3.10',
74 'Programming Language :: Python :: 3.11',
75 'Programming Language :: Python :: 3.12',
76 'Programming Language :: Python :: 3.13',
77 'Programming Language :: Python :: 3.14',
78 'Programming Language :: Python :: 3.15',
79 'Programming Language :: Python :: Implementation :: CPython',
80 'Topic :: Software Development',
81 'Topic :: Utilities',
82 ],
83 )