|
1 | | -#!/usr/bin/env python |
2 | | -"""Setup script to install the ``arduino-cli-cmake-wrapper`` package.""" |
3 | | - |
4 | | -import re |
5 | | -from pathlib import Path |
6 | | - |
7 | | -from setuptools import find_packages |
| 1 | +# setup.py is kept to support legacy builds |
| 2 | +# https://setuptools.pypa.io/en/latest/userguide/pyproject_config.html |
8 | 3 | from setuptools import setup |
9 | 4 |
|
10 | | - |
11 | | -def read(*names, **kwargs): |
12 | | - """Read file and return contents as a string.""" |
13 | | - with Path(__file__).parent.joinpath(*names).open( |
14 | | - encoding=kwargs.get('encoding', 'utf8') |
15 | | - ) as fh: |
16 | | - return fh.read() |
17 | | - |
18 | | - |
19 | | -setup( |
20 | | - name='arduino-cli-cmake-wrapper', |
21 | | - use_scm_version={ |
22 | | - 'local_scheme': 'dirty-tag', |
23 | | - 'write_to': 'src/arduino_cli_cmake_wrapper/_version.py', |
24 | | - 'fallback_version': '0.0.0', |
25 | | - }, |
26 | | - license='Apache-2.0', |
27 | | - description='Arduino Cmake toolchain leveraging ``arduino-cli`` via python wrapper script', |
28 | | - long_description='{}\n{}'.format( |
29 | | - re.compile('^.. start-badges.*^.. end-badges', re.M | re.S).sub( |
30 | | - '', read('README.rst') |
31 | | - ), |
32 | | - re.sub(':[a-z]+:`~?(.*?)`', r'``\1``', read('CHANGELOG.rst')), |
33 | | - ), |
34 | | - author='Sterling Lewis Peet', |
35 | | - |
36 | | - url='https://github.com/SterlingPeet/arduino-cli-cmake-wrapper', |
37 | | - packages=find_packages('src'), |
38 | | - package_dir={'': 'src'}, |
39 | | - py_modules=[path.stem for path in Path('src').glob('*.py')], |
40 | | - include_package_data=True, |
41 | | - zip_safe=False, |
42 | | - classifiers=[ |
43 | | - # complete classifier list: http://pypi.python.org/pypi?%3Aaction=list_classifiers |
44 | | - 'Development Status :: 5 - Production/Stable', |
45 | | - 'Intended Audience :: Developers', |
46 | | - 'License :: OSI Approved :: Apache Software License', |
47 | | - 'Operating System :: Unix', |
48 | | - 'Operating System :: POSIX', |
49 | | - 'Operating System :: Microsoft :: Windows', |
50 | | - 'Programming Language :: Python', |
51 | | - 'Programming Language :: Python :: 3', |
52 | | - 'Programming Language :: Python :: 3 :: Only', |
53 | | - 'Programming Language :: Python :: 3.8', |
54 | | - 'Programming Language :: Python :: 3.9', |
55 | | - 'Programming Language :: Python :: 3.10', |
56 | | - 'Programming Language :: Python :: 3.11', |
57 | | - 'Programming Language :: Python :: 3.12', |
58 | | - 'Programming Language :: Python :: Implementation :: CPython', |
59 | | - 'Programming Language :: Python :: Implementation :: PyPy', |
60 | | - 'Topic :: Utilities', |
61 | | - ], |
62 | | - project_urls={ |
63 | | - 'Documentation': 'https://arduino-cli-cmake-wrapper.readthedocs.io/', |
64 | | - 'Changelog': 'https://arduino-cli-cmake-wrapper.readthedocs.io/en/latest/changelog.html', |
65 | | - 'Issue Tracker': 'https://github.com/SterlingPeet/arduino-cli-cmake-wrapper/issues', |
66 | | - }, |
67 | | - keywords=[ |
68 | | - # eg: 'keyword1', 'keyword2', 'keyword3', |
69 | | - ], |
70 | | - python_requires='>=3.7', |
71 | | - install_requires=[ |
72 | | - # eg: 'aspectlib==1.1.1', 'six>=1.7', |
73 | | - ], |
74 | | - extras_require={ |
75 | | - # eg: |
76 | | - # "rst": ["docutils>=0.11"], |
77 | | - # ":python_version=='3.8'": ["backports.zoneinfo"], |
78 | | - }, |
79 | | - setup_requires=[ |
80 | | - 'setuptools_scm>=3.3.1', |
81 | | - ], |
82 | | - entry_points={ |
83 | | - 'console_scripts': [ |
84 | | - 'arduino-cli-wrapper = arduino_cli_cmake_wrapper.cli:main', |
85 | | - ] |
86 | | - }, |
87 | | -) |
| 5 | +# Configuration is in pyproject.toml |
| 6 | +setup() |
0 commit comments