aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAnthony DiGirolamo <tonymd@google.com>2021-07-23 15:47:17 -0700
committerCQ Bot Account <pigweed-scoped@luci-project-accounts.iam.gserviceaccount.com>2021-08-19 21:00:28 +0000
commitd14a0eef6256f0f5aeea390edfbf6f235fdfe39e (patch)
tree46d81f0734eb2d13db14da5bdc72cc70a29fc186
parent7b62e93287f40f80a66b6866f3dca8d48fba2983 (diff)
downloadpigweed-d14a0eef6256f0f5aeea390edfbf6f235fdfe39e.tar.gz
python: setup.py -> setup.cfg
Move all Python package definitions into setup.cfg files. A stub setup.py file remains to support `pip install --editable` it only runs `setuptools.setup()`. The package definition is pulled from the setup.cfg. Each pyproject.toml file is required to specify the build system for the given python package. In Pigweed's case so far it always specifies Setuptools. See this page for details: https://setuptools.readthedocs.io/en/latest/build_meta.html?highlight=pyproject.toml#how-to-use-it Change-Id: Ieb52ffc46b34ff1693cbfe9b95996cf9add644d1 Reviewed-on: https://pigweed-review.googlesource.com/c/pigweed/pigweed/+/54560 Pigweed-Auto-Submit: Anthony DiGirolamo <tonymd@google.com> Commit-Queue: Auto-Submit <auto-submit@pigweed.google.com.iam.gserviceaccount.com> Reviewed-by: Wyatt Hepler <hepler@google.com>
-rw-r--r--docs/python_build.rst38
-rw-r--r--pw_allocator/py/pyproject.toml16
-rw-r--r--pw_allocator/py/setup.cfg27
-rw-r--r--pw_allocator/py/setup.py16
-rw-r--r--pw_arduino_build/py/pyproject.toml16
-rw-r--r--pw_arduino_build/py/setup.cfg41
-rw-r--r--pw_arduino_build/py/setup.py35
-rw-r--r--pw_bloat/py/pyproject.toml16
-rw-r--r--pw_bloat/py/setup.cfg27
-rw-r--r--pw_bloat/py/setup.py14
-rw-r--r--pw_build/py/pyproject.toml16
-rw-r--r--pw_build/py/setup.cfg35
-rw-r--r--pw_build/py/setup.py24
-rw-r--r--pw_cli/py/pyproject.toml16
-rw-r--r--pw_cli/py/setup.cfg29
-rw-r--r--pw_cli/py/setup.py14
-rw-r--r--pw_console/py/pyproject.toml16
-rw-r--r--pw_console/py/setup.cfg47
-rw-r--r--pw_console/py/setup.py41
-rw-r--r--pw_cpu_exception_cortex_m/py/pyproject.toml16
-rw-r--r--pw_cpu_exception_cortex_m/py/setup.cfg27
-rw-r--r--pw_cpu_exception_cortex_m/py/setup.py18
-rw-r--r--pw_docgen/py/pyproject.toml16
-rw-r--r--pw_docgen/py/setup.cfg35
-rw-r--r--pw_docgen/py/setup.py25
-rw-r--r--pw_doctor/py/pyproject.toml16
-rw-r--r--pw_doctor/py/setup.cfg26
-rw-r--r--pw_doctor/py/setup.py15
-rw-r--r--pw_env_setup/py/pyproject.toml16
-rw-r--r--pw_env_setup/py/setup.cfg36
-rw-r--r--pw_env_setup/py/setup.py27
-rw-r--r--pw_hdlc/py/pyproject.toml16
-rw-r--r--pw_hdlc/py/setup.cfg32
-rw-r--r--pw_hdlc/py/setup.py20
-rw-r--r--pw_log_tokenized/py/pyproject.toml16
-rw-r--r--pw_log_tokenized/py/setup.cfg26
-rw-r--r--pw_log_tokenized/py/setup.py13
-rw-r--r--pw_module/py/pyproject.toml16
-rw-r--r--pw_module/py/setup.cfg26
-rw-r--r--pw_module/py/setup.py13
-rw-r--r--pw_package/py/pyproject.toml16
-rw-r--r--pw_package/py/setup.cfg27
-rw-r--r--pw_package/py/setup.py16
-rw-r--r--pw_presubmit/py/pyproject.toml16
-rw-r--r--pw_presubmit/py/setup.cfg31
-rw-r--r--pw_presubmit/py/setup.py21
-rw-r--r--pw_protobuf/py/pyproject.toml16
-rw-r--r--pw_protobuf/py/setup.cfg31
-rw-r--r--pw_protobuf/py/setup.py20
-rw-r--r--pw_protobuf_compiler/py/pyproject.toml16
-rw-r--r--pw_protobuf_compiler/py/setup.cfg27
-rw-r--r--pw_protobuf_compiler/py/setup.py18
-rw-r--r--pw_status/py/pyproject.toml16
-rw-r--r--pw_status/py/setup.cfg26
-rw-r--r--pw_status/py/setup.py13
-rw-r--r--pw_stm32cube_build/py/pyproject.toml16
-rw-r--r--pw_stm32cube_build/py/setup.cfg31
-rw-r--r--pw_stm32cube_build/py/setup.py16
-rw-r--r--pw_tls_client/py/pyproject.toml16
-rw-r--r--pw_tls_client/py/setup.cfg27
-rw-r--r--pw_tls_client/py/setup.py12
-rw-r--r--pw_tokenizer/py/pyproject.toml16
-rw-r--r--pw_tokenizer/py/setup.cfg26
-rw-r--r--pw_tokenizer/py/setup.py15
-rw-r--r--pw_toolchain/py/pyproject.toml16
-rw-r--r--pw_toolchain/py/setup.cfg26
-rw-r--r--pw_toolchain/py/setup.py9
-rw-r--r--pw_trace/py/pyproject.toml16
-rw-r--r--pw_trace/py/setup.cfg26
-rw-r--r--pw_trace/py/setup.py15
-rw-r--r--pw_trace_tokenized/py/pyproject.toml16
-rw-r--r--pw_trace_tokenized/py/setup.cfg30
-rw-r--r--pw_trace_tokenized/py/setup.py20
-rw-r--r--pw_unit_test/py/pyproject.toml16
-rw-r--r--pw_unit_test/py/setup.cfg27
-rw-r--r--pw_unit_test/py/setup.py18
-rw-r--r--pw_watch/py/pyproject.toml16
-rw-r--r--pw_watch/py/setup.cfg27
-rw-r--r--pw_watch/py/setup.py22
-rw-r--r--targets/lm3s6965evb_qemu/py/pyproject.toml16
-rw-r--r--targets/lm3s6965evb_qemu/py/setup.cfg31
-rw-r--r--targets/lm3s6965evb_qemu/py/setup.py21
-rw-r--r--targets/stm32f429i_disc1/py/pyproject.toml16
-rw-r--r--targets/stm32f429i_disc1/py/setup.cfg34
-rw-r--r--targets/stm32f429i_disc1/py/setup.py31
85 files changed, 1385 insertions, 484 deletions
diff --git a/docs/python_build.rst b/docs/python_build.rst
index 59496da8d..f260fe5f4 100644
--- a/docs/python_build.rst
+++ b/docs/python_build.rst
@@ -176,11 +176,15 @@ modules. A module's Python package is nested under a ``py/`` directory (see
:ref:`docs-module-structure`).
.. code-block::
+ :caption: Example layout of a Pigweed Python package.
+ :name: python-file-tree
module_name/
├── py/
│   ├── BUILD.gn
+ │   ├── setup.cfg
│   ├── setup.py
+ │   ├── pyproject.toml
│   ├── package_name/
│   │ ├── module_a.py
│   │ ├── module_b.py
@@ -195,6 +199,37 @@ modules. A module's Python package is nested under a ``py/`` directory (see
The ``BUILD.gn`` declares this package in GN. For upstream Pigweed, a presubmit
check in ensures that all Python files are listed in a ``BUILD.gn``.
+Pigweed prefers to define Python packages using ``setup.cfg`` files. In the
+above file tree ``setup.py`` and ``pyproject.toml`` files are stubs with the
+following content:
+
+.. code-block::
+ :caption: setup.py
+ :name: setup-py-stub
+
+ import setuptools # type: ignore
+ setuptools.setup() # Package definition in setup.cfg
+
+.. code-block::
+ :caption: pyproject.toml
+ :name: pyproject-toml-stub
+
+ [build-system]
+ requires = ['setuptools', 'wheel']
+ build-backend = 'setuptools.build_meta'
+
+The stub ``setup.py`` file is there to support running ``pip install --editable``.
+
+Each ``pyproject.toml`` file is required to specify which build system should be
+used for the given Python package. In Pigweed's case it always specifies using
+setuptools.
+
+.. seealso::
+
+ - ``setup.cfg`` examples at `Configuring setup() using setup.cfg files`_
+ - ``pyproject.toml`` background at `Build System Support - How to use it?`_
+
+
.. _module-pw_build-python-target:
pw_python_package targets
@@ -314,3 +349,6 @@ See also
- :ref:`module-pw_build-python`
- :ref:`module-pw_build`
- :ref:`docs-build-system`
+
+.. _Configuring setup() using setup.cfg files: https://ipython.readthedocs.io/en/stable/interactive/reference.html#embedding
+.. _Build System Support - How to use it?: https://setuptools.readthedocs.io/en/latest/build_meta.html?highlight=pyproject.toml#how-to-use-it
diff --git a/pw_allocator/py/pyproject.toml b/pw_allocator/py/pyproject.toml
new file mode 100644
index 000000000..798b747ec
--- /dev/null
+++ b/pw_allocator/py/pyproject.toml
@@ -0,0 +1,16 @@
+# Copyright 2021 The Pigweed Authors
+#
+# Licensed under the Apache License, Version 2.0 (the "License"); you may not
+# use this file except in compliance with the License. You may obtain a copy of
+# the License at
+#
+# https://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS, 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.
+[build-system]
+requires = ['setuptools', 'wheel']
+build-backend = 'setuptools.build_meta'
diff --git a/pw_allocator/py/setup.cfg b/pw_allocator/py/setup.cfg
new file mode 100644
index 000000000..4f1a6fdb3
--- /dev/null
+++ b/pw_allocator/py/setup.cfg
@@ -0,0 +1,27 @@
+# Copyright 2021 The Pigweed Authors
+#
+# Licensed under the Apache License, Version 2.0 (the "License"); you may not
+# use this file except in compliance with the License. You may obtain a copy of
+# the License at
+#
+# https://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS, 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.
+[metadata]
+name = pw_allocator
+version = 0.0.1
+author = Pigweed Authors
+author_email = pigweed-developers@googlegroups.com
+description = Pigweed heap allocator
+
+[options]
+packages = find:
+zip_safe = False
+install_requires = pw_cli
+
+[options.package_data]
+pw_allocator = py.typed
diff --git a/pw_allocator/py/setup.py b/pw_allocator/py/setup.py
index 1031fc760..7a82dcf7e 100644
--- a/pw_allocator/py/setup.py
+++ b/pw_allocator/py/setup.py
@@ -1,4 +1,4 @@
-# Copyright 2020 The Pigweed Authors
+# Copyright 2021 The Pigweed Authors
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may not
# use this file except in compliance with the License. You may obtain a copy of
@@ -15,16 +15,4 @@
import setuptools # type: ignore
-setuptools.setup(
- name='pw_allocator',
- version='0.0.1',
- author='Pigweed Authors',
- author_email='pigweed-developers@googlegroups.com',
- description='Pigweed heap allocator',
- packages=setuptools.find_packages(),
- package_data={'pw_allocator': ['py.typed']},
- zip_safe=False,
- install_requires=[
- 'pw_cli',
- ],
-)
+setuptools.setup() # Package definition in setup.cfg
diff --git a/pw_arduino_build/py/pyproject.toml b/pw_arduino_build/py/pyproject.toml
new file mode 100644
index 000000000..798b747ec
--- /dev/null
+++ b/pw_arduino_build/py/pyproject.toml
@@ -0,0 +1,16 @@
+# Copyright 2021 The Pigweed Authors
+#
+# Licensed under the Apache License, Version 2.0 (the "License"); you may not
+# use this file except in compliance with the License. You may obtain a copy of
+# the License at
+#
+# https://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS, 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.
+[build-system]
+requires = ['setuptools', 'wheel']
+build-backend = 'setuptools.build_meta'
diff --git a/pw_arduino_build/py/setup.cfg b/pw_arduino_build/py/setup.cfg
new file mode 100644
index 000000000..05f6d2a00
--- /dev/null
+++ b/pw_arduino_build/py/setup.cfg
@@ -0,0 +1,41 @@
+# Copyright 2021 The Pigweed Authors
+#
+# Licensed under the Apache License, Version 2.0 (the "License"); you may not
+# use this file except in compliance with the License. You may obtain a copy of
+# the License at
+#
+# https://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS, 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.
+[metadata]
+name = pw_arduino_build
+version = 0.0.1
+author = Pigweed Authors
+author_email = pigweed-developers@googlegroups.com
+description = Target-specific python scripts for the arduino target
+
+[options]
+packages = find:
+zip_safe = False
+install_requires =
+ pyserial>=3.5,<4.0
+ coloredlogs
+ parameterized
+
+[options.entry_points]
+console_scripts =
+ arduino_builder = pw_arduino_build.__main__:main
+ teensy_detector = pw_arduino_build.teensy_detector:main
+ arduino_unit_test_runner = pw_arduino_build.unit_test_runner:main
+ arduino_test_server = pw_arduino_build.unit_test_server:main
+ arduino_test_client = pw_arduino_build.unit_test_client:main
+
+[options.package_data]
+pw_arduino_build =
+ core_patches/teensy/01-teensyduino_1.53-cpp17.diff
+ core_patches/teensy/02-teensy4_nonstatic_flash_functions.diff
+ py.typed
diff --git a/pw_arduino_build/py/setup.py b/pw_arduino_build/py/setup.py
index 528ca95ff..484362f6a 100644
--- a/pw_arduino_build/py/setup.py
+++ b/pw_arduino_build/py/setup.py
@@ -1,4 +1,4 @@
-# Copyright 2019 The Pigweed Authors
+# Copyright 2021 The Pigweed Authors
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may not
# use this file except in compliance with the License. You may obtain a copy of
@@ -15,35 +15,4 @@
import setuptools # type: ignore
-setuptools.setup(
- name='pw_arduino_build',
- version='0.0.1',
- author='Pigweed Authors',
- author_email='pigweed-developers@googlegroups.com',
- description='Target-specific python scripts for the arduino target',
- packages=setuptools.find_packages(),
- package_data={
- 'pw_arduino_build': [
- 'core_patches/teensy/01-teensyduino_1.53-cpp17.diff',
- 'core_patches/teensy/02-teensy4_nonstatic_flash_functions.diff',
- 'py.typed',
- ]
- },
- zip_safe=False,
- entry_points={
- 'console_scripts': [
- 'arduino_builder = pw_arduino_build.__main__:main',
- 'teensy_detector = pw_arduino_build.teensy_detector:main',
- 'arduino_unit_test_runner = '
- ' pw_arduino_build.unit_test_runner:main',
- 'arduino_test_server = '
- ' pw_arduino_build.unit_test_server:main',
- 'arduino_test_client = '
- ' pw_arduino_build.unit_test_client:main',
- ]
- },
- install_requires=[
- 'pyserial>=3.5,<4.0',
- 'coloredlogs',
- 'parameterized',
- ])
+setuptools.setup() # Package definition in setup.cfg
diff --git a/pw_bloat/py/pyproject.toml b/pw_bloat/py/pyproject.toml
new file mode 100644
index 000000000..798b747ec
--- /dev/null
+++ b/pw_bloat/py/pyproject.toml
@@ -0,0 +1,16 @@
+# Copyright 2021 The Pigweed Authors
+#
+# Licensed under the Apache License, Version 2.0 (the "License"); you may not
+# use this file except in compliance with the License. You may obtain a copy of
+# the License at
+#
+# https://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS, 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.
+[build-system]
+requires = ['setuptools', 'wheel']
+build-backend = 'setuptools.build_meta'
diff --git a/pw_bloat/py/setup.cfg b/pw_bloat/py/setup.cfg
new file mode 100644
index 000000000..42d9a47a2
--- /dev/null
+++ b/pw_bloat/py/setup.cfg
@@ -0,0 +1,27 @@
+# Copyright 2021 The Pigweed Authors
+#
+# Licensed under the Apache License, Version 2.0 (the "License"); you may not
+# use this file except in compliance with the License. You may obtain a copy of
+# the License at
+#
+# https://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS, 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.
+[metadata]
+name = pw_bloat
+version = 0.0.1
+author = Pigweed Authors
+author_email = pigweed-developers@googlegroups.com
+description = Tools for generating binary size report cards
+
+[options]
+packages = find:
+zip_safe = False
+install_requires = pw_cli
+
+[options.package_data]
+pw_bloat = py.typed
diff --git a/pw_bloat/py/setup.py b/pw_bloat/py/setup.py
index 73c2a7e21..7fef9f77f 100644
--- a/pw_bloat/py/setup.py
+++ b/pw_bloat/py/setup.py
@@ -1,4 +1,4 @@
-# Copyright 2019 The Pigweed Authors
+# Copyright 2021 The Pigweed Authors
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may not
# use this file except in compliance with the License. You may obtain a copy of
@@ -15,14 +15,4 @@
import setuptools # type: ignore
-setuptools.setup(
- name='pw_bloat',
- version='0.0.1',
- author='Pigweed Authors',
- author_email='pigweed-developers@googlegroups.com',
- description='Tools for generating binary size report cards',
- packages=setuptools.find_packages(),
- package_data={'pw_bloat': ['py.typed']},
- zip_safe=False,
- install_requires=['pw_cli'],
-)
+setuptools.setup() # Package definition in setup.cfg
diff --git a/pw_build/py/pyproject.toml b/pw_build/py/pyproject.toml
new file mode 100644
index 000000000..798b747ec
--- /dev/null
+++ b/pw_build/py/pyproject.toml
@@ -0,0 +1,16 @@
+# Copyright 2021 The Pigweed Authors
+#
+# Licensed under the Apache License, Version 2.0 (the "License"); you may not
+# use this file except in compliance with the License. You may obtain a copy of
+# the License at
+#
+# https://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS, 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.
+[build-system]
+requires = ['setuptools', 'wheel']
+build-backend = 'setuptools.build_meta'
diff --git a/pw_build/py/setup.cfg b/pw_build/py/setup.cfg
new file mode 100644
index 000000000..6b2f45d93
--- /dev/null
+++ b/pw_build/py/setup.cfg
@@ -0,0 +1,35 @@
+# Copyright 2021 The Pigweed Authors
+#
+# Licensed under the Apache License, Version 2.0 (the "License"); you may not
+# use this file except in compliance with the License. You may obtain a copy of
+# the License at
+#
+# https://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS, 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.
+[metadata]
+name = pw_build
+version = 0.0.1
+author = Pigweed Authors
+author_email = pigweed-developers@googlegroups.com
+description = Python scripts that support the GN build
+
+[options]
+packages = find:
+zip_safe = False
+install_requires =
+ wheel
+ pw_cli
+ pw_env_setup
+ pw_presubmit
+
+[options.entry_points]
+console_scripts =
+ copy_from_cipd = pw_build.copy_from_cipd:main
+
+[options.package_data]
+pw_build = py.typed
diff --git a/pw_build/py/setup.py b/pw_build/py/setup.py
index 50388a597..a8fc27435 100644
--- a/pw_build/py/setup.py
+++ b/pw_build/py/setup.py
@@ -1,4 +1,4 @@
-# Copyright 2020 The Pigweed Authors
+# Copyright 2021 The Pigweed Authors
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may not
# use this file except in compliance with the License. You may obtain a copy of
@@ -15,24 +15,4 @@
import setuptools # type: ignore
-setuptools.setup(
- name='pw_build',
- version='0.0.1',
- author='Pigweed Authors',
- author_email='pigweed-developers@googlegroups.com',
- description='Python scripts that support the GN build',
- packages=setuptools.find_packages(),
- package_data={'pw_build': ['py.typed']},
- zip_safe=False,
- install_requires=[
- 'wheel',
- 'pw_cli',
- 'pw_env_setup',
- 'pw_presubmit',
- ],
- entry_points={
- 'console_scripts': [
- 'copy_from_cipd = pw_build.copy_from_cipd:main',
- ],
- },
-)
+setuptools.setup() # Package definition in setup.cfg
diff --git a/pw_cli/py/pyproject.toml b/pw_cli/py/pyproject.toml
new file mode 100644
index 000000000..798b747ec
--- /dev/null
+++ b/pw_cli/py/pyproject.toml
@@ -0,0 +1,16 @@
+# Copyright 2021 The Pigweed Authors
+#
+# Licensed under the Apache License, Version 2.0 (the "License"); you may not
+# use this file except in compliance with the License. You may obtain a copy of
+# the License at
+#
+# https://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS, 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.
+[build-system]
+requires = ['setuptools', 'wheel']
+build-backend = 'setuptools.build_meta'
diff --git a/pw_cli/py/setup.cfg b/pw_cli/py/setup.cfg
new file mode 100644
index 000000000..be8343850
--- /dev/null
+++ b/pw_cli/py/setup.cfg
@@ -0,0 +1,29 @@
+# Copyright 2021 The Pigweed Authors
+#
+# Licensed under the Apache License, Version 2.0 (the "License"); you may not
+# use this file except in compliance with the License. You may obtain a copy of
+# the License at
+#
+# https://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS, 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.
+[metadata]
+name = pw_cli
+version = 0.0.1
+author = Pigweed Authors
+author_email = pigweed-developers@googlegroups.com
+description = Pigweed swiss-army knife
+
+[options]
+packages = find:
+zip_safe = False
+
+[options.entry_points]
+console_scripts = pw = pw_cli.__main__:main
+
+[options.package_data]
+pw_cli = py.typed
diff --git a/pw_cli/py/setup.py b/pw_cli/py/setup.py
index 19827b33d..73ab7458c 100644
--- a/pw_cli/py/setup.py
+++ b/pw_cli/py/setup.py
@@ -1,4 +1,4 @@
-# Copyright 2019 The Pigweed Authors
+# Copyright 2021 The Pigweed Authors
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may not
# use this file except in compliance with the License. You may obtain a copy of
@@ -15,14 +15,4 @@
import setuptools # type: ignore
-setuptools.setup(
- name='pw_cli',
- version='0.0.1',
- author='Pigweed Authors',
- author_email='pigweed-developers@googlegroups.com',
- description='Pigweed swiss-army knife',
- packages=setuptools.find_packages(),
- package_data={'pw_cli': ['py.typed']},
- zip_safe=False,
- entry_points={'console_scripts': ['pw = pw_cli.__main__:main']},
-)
+setuptools.setup() # Package definition in setup.cfg
diff --git a/pw_console/py/pyproject.toml b/pw_console/py/pyproject.toml
new file mode 100644
index 000000000..798b747ec
--- /dev/null
+++ b/pw_console/py/pyproject.toml
@@ -0,0 +1,16 @@
+# Copyright 2021 The Pigweed Authors
+#
+# Licensed under the Apache License, Version 2.0 (the "License"); you may not
+# use this file except in compliance with the License. You may obtain a copy of
+# the License at
+#
+# https://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS, 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.
+[build-system]
+requires = ['setuptools', 'wheel']
+build-backend = 'setuptools.build_meta'
diff --git a/pw_console/py/setup.cfg b/pw_console/py/setup.cfg
new file mode 100644
index 000000000..e2ec2f93e
--- /dev/null
+++ b/pw_console/py/setup.cfg
@@ -0,0 +1,47 @@
+# Copyright 2021 The Pigweed Authors
+#
+# Licensed under the Apache License, Version 2.0 (the "License"); you may not
+# use this file except in compliance with the License. You may obtain a copy of
+# the License at
+#
+# https://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS, 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.
+[metadata]
+name = pw_console
+version = 0.0.1
+author = Pigweed Authors
+author_email = pigweed-developers@googlegroups.com
+description = Pigweed interactive console
+
+[options]
+packages = find:
+zip_safe = False
+install_requires =
+ ipython
+ jinja2
+ prompt_toolkit
+ ptpython>=3.0.18
+ pw_cli
+ pw_tokenizer
+ pygments
+ pygments-style-dracula
+ pygments-style-tomorrow
+ pyperclip
+
+[options.entry_points]
+console_scripts = pw-console = pw_console.__main__:main
+pygments.styles =
+ pigweed-code = pw_console.pigweed_code_style:PigweedCodeStyle
+ pigweed-code-light = pw_console.pigweed_code_style:PigweedCodeLightStyle
+
+[options.package_data]
+pw_console =
+ docs/user_guide.rst
+ py.typed
+ templates/keybind_list.jinja
+ templates/repl_output.jinja
diff --git a/pw_console/py/setup.py b/pw_console/py/setup.py
index 669192cae..7308b8c47 100644
--- a/pw_console/py/setup.py
+++ b/pw_console/py/setup.py
@@ -15,43 +15,4 @@
import setuptools # type: ignore
-setuptools.setup(
- name='pw_console',
- version='0.0.1',
- author='Pigweed Authors',
- author_email='pigweed-developers@googlegroups.com',
- description='Pigweed interactive console',
- packages=setuptools.find_packages(),
- package_data={
- 'pw_console': [
- 'docs/user_guide.rst',
- 'py.typed',
- 'templates/keybind_list.jinja',
- 'templates/repl_output.jinja',
- ]
- },
- zip_safe=False,
- entry_points={
- 'console_scripts': [
- 'pw-console = pw_console.__main__:main',
- ],
- 'pygments.styles': [
- 'pigweed-code = '
- 'pw_console.pigweed_code_style:PigweedCodeStyle',
- 'pigweed-code-light = '
- 'pw_console.pigweed_code_style:PigweedCodeLightStyle',
- ],
- },
- install_requires=[
- 'ipython',
- 'jinja2',
- 'prompt_toolkit',
- 'ptpython>=3.0.18',
- 'pw_cli',
- 'pw_tokenizer',
- 'pygments',
- 'pygments-style-dracula',
- 'pygments-style-tomorrow',
- 'pyperclip',
- ],
-)
+setuptools.setup() # Package definition in setup.cfg
diff --git a/pw_cpu_exception_cortex_m/py/pyproject.toml b/pw_cpu_exception_cortex_m/py/pyproject.toml
new file mode 100644
index 000000000..798b747ec
--- /dev/null
+++ b/pw_cpu_exception_cortex_m/py/pyproject.toml
@@ -0,0 +1,16 @@
+# Copyright 2021 The Pigweed Authors
+#
+# Licensed under the Apache License, Version 2.0 (the "License"); you may not
+# use this file except in compliance with the License. You may obtain a copy of
+# the License at
+#
+# https://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS, 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.
+[build-system]
+requires = ['setuptools', 'wheel']
+build-backend = 'setuptools.build_meta'
diff --git a/pw_cpu_exception_cortex_m/py/setup.cfg b/pw_cpu_exception_cortex_m/py/setup.cfg
new file mode 100644
index 000000000..eb4f8f4c0
--- /dev/null
+++ b/pw_cpu_exception_cortex_m/py/setup.cfg
@@ -0,0 +1,27 @@
+# Copyright 2021 The Pigweed Authors
+#
+# Licensed under the Apache License, Version 2.0 (the "License"); you may not
+# use this file except in compliance with the License. You may obtain a copy of
+# the License at
+#
+# https://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS, 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.
+[metadata]
+name = pw_cpu_exception_cortex_m
+version = 0.0.1
+author = Pigweed Authors
+author_email = pigweed-developers@googlegroups.com
+description = Tools for analyzing dumped ARM Cortex-M CPU exceptions
+
+[options]
+packages = find:
+zip_safe = False
+install_requires = protobuf; pw_cli; pw_protobuf_compiler
+
+[options.package_data]
+pw_cpu_exception_cortex_m = py.typed
diff --git a/pw_cpu_exception_cortex_m/py/setup.py b/pw_cpu_exception_cortex_m/py/setup.py
index 9cc3e8efa..cbbf5d37b 100644
--- a/pw_cpu_exception_cortex_m/py/setup.py
+++ b/pw_cpu_exception_cortex_m/py/setup.py
@@ -1,4 +1,4 @@
-# Copyright 2020 The Pigweed Authors
+# Copyright 2021 The Pigweed Authors
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may not
# use this file except in compliance with the License. You may obtain a copy of
@@ -15,18 +15,4 @@
import setuptools # type: ignore
-setuptools.setup(
- name='pw_cpu_exception_cortex_m',
- version='0.0.1',
- author='Pigweed Authors',
- author_email='pigweed-developers@googlegroups.com',
- description='Tools for analyzing dumped ARM Cortex-M CPU exceptions',
- packages=setuptools.find_packages(),
- package_data={'pw_cpu_exception_cortex_m': ['py.typed']},
- zip_safe=False,
- install_requires=[
- 'protobuf',
- 'pw_cli',
- 'pw_protobuf_compiler',
- ],
-)
+setuptools.setup() # Package definition in setup.cfg
diff --git a/pw_docgen/py/pyproject.toml b/pw_docgen/py/pyproject.toml
new file mode 100644
index 000000000..798b747ec
--- /dev/null
+++ b/pw_docgen/py/pyproject.toml
@@ -0,0 +1,16 @@
+# Copyright 2021 The Pigweed Authors
+#
+# Licensed under the Apache License, Version 2.0 (the "License"); you may not
+# use this file except in compliance with the License. You may obtain a copy of
+# the License at
+#
+# https://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS, 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.
+[build-system]
+requires = ['setuptools', 'wheel']
+build-backend = 'setuptools.build_meta'
diff --git a/pw_docgen/py/setup.cfg b/pw_docgen/py/setup.cfg
new file mode 100644
index 000000000..d7d1293bf
--- /dev/null
+++ b/pw_docgen/py/setup.cfg
@@ -0,0 +1,35 @@
+# Copyright 2021 The Pigweed Authors
+#
+# Licensed under the Apache License, Version 2.0 (the "License"); you may not
+# use this file except in compliance with the License. You may obtain a copy of
+# the License at
+#
+# https://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS, 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.
+[metadata]
+name = pw_docgen
+version = 0.0.1
+author = Pigweed Authors
+author_email = pigweed-developers@googlegroups.com
+description = Generate Sphinx documentation
+
+[options]
+packages = find:
+zip_safe = False
+install_requires =
+ sphinx >3
+ sphinx-rtd-theme
+ Pillow >=6.2.2, <=8.2.0
+ sphinxcontrib-actdiag
+ sphinxcontrib-blockdiag
+ sphinxcontrib-nwdiag
+ sphinxcontrib-seqdiag
+ sphinxcontrib-mermaid >=0.7.1
+
+[options.package_data]
+pw_docgen = py.typed
diff --git a/pw_docgen/py/setup.py b/pw_docgen/py/setup.py
index 8fce76582..02300488c 100644
--- a/pw_docgen/py/setup.py
+++ b/pw_docgen/py/setup.py
@@ -1,4 +1,4 @@
-# Copyright 2020 The Pigweed Authors
+# Copyright 2021 The Pigweed Authors
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may not
# use this file except in compliance with the License. You may obtain a copy of
@@ -15,25 +15,4 @@
import setuptools # type: ignore
-setuptools.setup(
- name='pw_docgen',
- version='0.0.1',
- author='Pigweed Authors',
- author_email='pigweed-developers@googlegroups.com',
- description='Generate Sphinx documentation',
- packages=setuptools.find_packages(),
- package_data={'pw_docgen': ['py.typed']},
- zip_safe=False,
- install_requires=[
- 'sphinx >3',
- 'sphinx-rtd-theme',
- # Pillow 8.3.0 is broken on Windows.
- 'Pillow >=6.2.2, <=8.2.0',
- # Diagram generation modules.
- 'sphinxcontrib-actdiag',
- 'sphinxcontrib-blockdiag',
- 'sphinxcontrib-nwdiag',
- 'sphinxcontrib-seqdiag',
- 'sphinxcontrib-mermaid >=0.7.1',
- ],
-)
+setuptools.setup() # Package definition in setup.cfg
diff --git a/pw_doctor/py/pyproject.toml b/pw_doctor/py/pyproject.toml
new file mode 100644
index 000000000..798b747ec
--- /dev/null
+++ b/pw_doctor/py/pyproject.toml
@@ -0,0 +1,16 @@
+# Copyright 2021 The Pigweed Authors
+#
+# Licensed under the Apache License, Version 2.0 (the "License"); you may not
+# use this file except in compliance with the License. You may obtain a copy of
+# the License at
+#
+# https://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS, 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.
+[build-system]
+requires = ['setuptools', 'wheel']
+build-backend = 'setuptools.build_meta'
diff --git a/pw_doctor/py/setup.cfg b/pw_doctor/py/setup.cfg
new file mode 100644
index 000000000..12e5efa1e
--- /dev/null
+++ b/pw_doctor/py/setup.cfg
@@ -0,0 +1,26 @@
+# Copyright 2021 The Pigweed Authors
+#
+# Licensed under the Apache License, Version 2.0 (the "License"); you may not
+# use this file except in compliance with the License. You may obtain a copy of
+# the License at
+#
+# https://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS, 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.
+[metadata]
+name = pw_doctor
+version = 0.0.1
+author = Pigweed Authors
+author_email = pigweed-developers@googlegroups.com
+description = Environment check script for Pigweed
+
+[options]
+packages = find:
+zip_safe = False
+
+[options.package_data]
+pw_doctor = py.typed
diff --git a/pw_doctor/py/setup.py b/pw_doctor/py/setup.py
index bc8082713..d8ec21631 100644
--- a/pw_doctor/py/setup.py
+++ b/pw_doctor/py/setup.py
@@ -1,4 +1,4 @@
-# Copyright 2019 The Pigweed Authors
+# Copyright 2021 The Pigweed Authors
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may not
# use this file except in compliance with the License. You may obtain a copy of
@@ -11,17 +11,8 @@
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations under
# the License.
-"""The pw_doctor package."""
+"""pw_doctor"""
import setuptools # type: ignore
-setuptools.setup(
- name='pw_doctor',
- version='0.0.1',
- author='Pigweed Authors',
- author_email='pigweed-developers@googlegroups.com',
- description='Environment check script for Pigweed',
- packages=setuptools.find_packages(),
- package_data={'pw_doctor': ['py.typed']},
- zip_safe=False,
-)
+setuptools.setup() # Package definition in setup.cfg
diff --git a/pw_env_setup/py/pyproject.toml b/pw_env_setup/py/pyproject.toml
new file mode 100644
index 000000000..798b747ec
--- /dev/null
+++ b/pw_env_setup/py/pyproject.toml
@@ -0,0 +1,16 @@
+# Copyright 2021 The Pigweed Authors
+#
+# Licensed under the Apache License, Version 2.0 (the "License"); you may not
+# use this file except in compliance with the License. You may obtain a copy of
+# the License at
+#
+# https://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS, 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.
+[build-system]
+requires = ['setuptools', 'wheel']
+build-backend = 'setuptools.build_meta'
diff --git a/pw_env_setup/py/setup.cfg b/pw_env_setup/py/setup.cfg
new file mode 100644
index 000000000..7714c30e1
--- /dev/null
+++ b/pw_env_setup/py/setup.cfg
@@ -0,0 +1,36 @@
+# Copyright 2021 The Pigweed Authors
+#
+# Licensed under the Apache License, Version 2.0 (the "License"); you may not
+# use this file except in compliance with the License. You may obtain a copy of
+# the License at
+#
+# https://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS, 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.
+[metadata]
+name = pw_env_setup
+version = 0.0.1
+author = Pigweed Authors
+author_email = pigweed-developers@googlegroups.com
+description = Environment setup for Pigweed
+
+[options]
+packages = find:
+zip_safe = False
+
+[options.entry_points]
+console_scripts =
+ _pw_env_setup = pw_env_setup.env_setup:main
+
+[options.package_data]
+pw_env_setup =
+ py.typed
+ cargo_setup/packages.txt
+ cipd_setup/luci.json
+ cipd_setup/pigweed.json
+ virtualenv_setup/requirements.in
+ virtualenv_setup/requirements.txt
diff --git a/pw_env_setup/py/setup.py b/pw_env_setup/py/setup.py
index b50b41408..ff2824deb 100644
--- a/pw_env_setup/py/setup.py
+++ b/pw_env_setup/py/setup.py
@@ -1,4 +1,4 @@
-# Copyright 2020 The Pigweed Authors
+# Copyright 2021 The Pigweed Authors
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may not
# use this file except in compliance with the License. You may obtain a copy of
@@ -11,29 +11,8 @@
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations under
# the License.
-"""pw_env_setup package definition."""
+"""pw_env_setup"""
import setuptools # type: ignore
-setuptools.setup(
- name='pw_env_setup',
- version='0.0.1',
- author='Pigweed Authors',
- author_email='pigweed-developers@googlegroups.com',
- description='Environment setup for Pigweed',
- packages=setuptools.find_packages(),
- entry_points={
- 'console_scripts': ['_pw_env_setup = pw_env_setup.env_setup:main'],
- },
- package_data={
- 'pw_env_setup': [
- 'py.typed',
- 'cargo_setup/packages.txt',
- 'cipd_setup/luci.json',
- 'cipd_setup/pigweed.json',
- 'virtualenv_setup/requirements.in',
- 'virtualenv_setup/requirements.txt',
- ],
- },
- zip_safe=False,
-)
+setuptools.setup() # Package definition in setup.cfg
diff --git a/pw_hdlc/py/pyproject.toml b/pw_hdlc/py/pyproject.toml
new file mode 100644
index 000000000..798b747ec
--- /dev/null
+++ b/pw_hdlc/py/pyproject.toml
@@ -0,0 +1,16 @@
+# Copyright 2021 The Pigweed Authors
+#
+# Licensed under the Apache License, Version 2.0 (the "License"); you may not
+# use this file except in compliance with the License. You may obtain a copy of
+# the License at
+#
+# https://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS, 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.
+[build-system]
+requires = ['setuptools', 'wheel']
+build-backend = 'setuptools.build_meta'
diff --git a/pw_hdlc/py/setup.cfg b/pw_hdlc/py/setup.cfg
new file mode 100644
index 000000000..b3b18a3a1
--- /dev/null
+++ b/pw_hdlc/py/setup.cfg
@@ -0,0 +1,32 @@
+# Copyright 2021 The Pigweed Authors
+#
+# Licensed under the Apache License, Version 2.0 (the "License"); you may not
+# use this file except in compliance with the License. You may obtain a copy of
+# the License at
+#
+# https://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS, 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.
+[metadata]
+name = pw_hdlc
+version = 0.0.1
+author = Pigweed Authors
+author_email = pigweed-developers@googlegroups.com
+description = Tools for Encoding/Decoding data using the HDLC protocol
+
+[options]
+packages = find:
+zip_safe = False
+install_requires =
+ ipython
+ pw_console
+ pw_protobuf_compiler
+ pw_rpc
+tests_require = pw_build
+
+[options.package_data]
+pw_hdlc = py.typed
diff --git a/pw_hdlc/py/setup.py b/pw_hdlc/py/setup.py
index e2ac7e08c..bf8cfe69b 100644
--- a/pw_hdlc/py/setup.py
+++ b/pw_hdlc/py/setup.py
@@ -1,4 +1,4 @@
-# Copyright 2020 The Pigweed Authors
+# Copyright 2021 The Pigweed Authors
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may not
# use this file except in compliance with the License. You may obtain a copy of
@@ -15,20 +15,4 @@
import setuptools # type: ignore
-setuptools.setup(
- name='pw_hdlc',
- version='0.0.1',
- author='Pigweed Authors',
- author_email='pigweed-developers@googlegroups.com',
- description='Tools for Encoding/Decoding data using the HDLC protocol',
- packages=setuptools.find_packages(),
- package_data={'pw_hdlc': ['py.typed']},
- zip_safe=False,
- install_requires=[
- 'ipython',
- 'pw_console',
- 'pw_protobuf_compiler',
- 'pw_rpc',
- ],
- tests_require=['pw_build'],
-)
+setuptools.setup() # Package definition in setup.cfg
diff --git a/pw_log_tokenized/py/pyproject.toml b/pw_log_tokenized/py/pyproject.toml
new file mode 100644
index 000000000..798b747ec
--- /dev/null
+++ b/pw_log_tokenized/py/pyproject.toml
@@ -0,0 +1,16 @@
+# Copyright 2021 The Pigweed Authors
+#
+# Licensed under the Apache License, Version 2.0 (the "License"); you may not
+# use this file except in compliance with the License. You may obtain a copy of
+# the License at
+#
+# https://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS, 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.
+[build-system]
+requires = ['setuptools', 'wheel']
+build-backend = 'setuptools.build_meta'
diff --git a/pw_log_tokenized/py/setup.cfg b/pw_log_tokenized/py/setup.cfg
new file mode 100644
index 000000000..ed0cb53bb
--- /dev/null
+++ b/pw_log_tokenized/py/setup.cfg
@@ -0,0 +1,26 @@
+# Copyright 2021 The Pigweed Authors
+#
+# Licensed under the Apache License, Version 2.0 (the "License"); you may not
+# use this file except in compliance with the License. You may obtain a copy of
+# the License at
+#
+# https://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS, 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.
+[metadata]
+name = pw_log_tokenized
+version = 0.0.1
+author = Pigweed Authors
+author_email = pigweed-developers@googlegroups.com
+description = Tools for working with tokenized logs
+
+[options]
+packages = find:
+zip_safe = False
+
+[options.package_data]
+pw_log_tokenized = py.typed
diff --git a/pw_log_tokenized/py/setup.py b/pw_log_tokenized/py/setup.py
index f1ca09d00..686aeb760 100644
--- a/pw_log_tokenized/py/setup.py
+++ b/pw_log_tokenized/py/setup.py
@@ -11,17 +11,8 @@
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations under
# the License.
-"""The pw_log_tokenized package."""
+"""pw_log_tokenized"""
import setuptools # type: ignore
-setuptools.setup(
- name='pw_log_tokenized',
- version='0.0.1',
- author='Pigweed Authors',
- author_email='pigweed-developers@googlegroups.com',
- description='Tools for working with tokenized logs',
- packages=setuptools.find_packages(),
- package_data={'pw_log_tokenized': ['py.typed']},
- zip_safe=False,
-)
+setuptools.setup() # Package definition in setup.cfg
diff --git a/pw_module/py/pyproject.toml b/pw_module/py/pyproject.toml
new file mode 100644
index 000000000..798b747ec
--- /dev/null
+++ b/pw_module/py/pyproject.toml
@@ -0,0 +1,16 @@
+# Copyright 2021 The Pigweed Authors
+#
+# Licensed under the Apache License, Version 2.0 (the "License"); you may not
+# use this file except in compliance with the License. You may obtain a copy of
+# the License at
+#
+# https://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS, 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.
+[build-system]
+requires = ['setuptools', 'wheel']
+build-backend = 'setuptools.build_meta'
diff --git a/pw_module/py/setup.cfg b/pw_module/py/setup.cfg
new file mode 100644
index 000000000..22ea44da6
--- /dev/null
+++ b/pw_module/py/setup.cfg
@@ -0,0 +1,26 @@
+# Copyright 2021 The Pigweed Authors
+#
+# Licensed under the Apache License, Version 2.0 (the "License"); you may not
+# use this file except in compliance with the License. You may obtain a copy of
+# the License at
+#
+# https://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS, 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.
+[metadata]
+name = pw_module
+version = 0.0.1
+author = Pigweed Authors
+author_email = pigweed-developers@googlegroups.com
+description = Meta-module for Pigweed
+
+[options]
+packages = find:
+zip_safe = False
+
+[options.package_data]
+pw_module = py.typed
diff --git a/pw_module/py/setup.py b/pw_module/py/setup.py
index 595725279..882d2cdbd 100644
--- a/pw_module/py/setup.py
+++ b/pw_module/py/setup.py
@@ -1,4 +1,4 @@
-# Copyright 2019 The Pigweed Authors
+# Copyright 2021 The Pigweed Authors
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may not
# use this file except in compliance with the License. You may obtain a copy of
@@ -15,13 +15,4 @@
import setuptools # type: ignore
-setuptools.setup(
- name='pw_module',
- version='0.0.1',
- author='Pigweed Authors',
- author_email='pigweed-developers@googlegroups.com',
- description='Meta-module for Pigweed',
- packages=setuptools.find_packages(),
- package_data={'pw_module': ['py.typed']},
- zip_safe=False,
-)
+setuptools.setup() # Package definition in setup.cfg
diff --git a/pw_package/py/pyproject.toml b/pw_package/py/pyproject.toml
new file mode 100644
index 000000000..798b747ec
--- /dev/null
+++ b/pw_package/py/pyproject.toml
@@ -0,0 +1,16 @@
+# Copyright 2021 The Pigweed Authors
+#
+# Licensed under the Apache License, Version 2.0 (the "License"); you may not
+# use this file except in compliance with the License. You may obtain a copy of
+# the License at
+#
+# https://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS, 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.
+[build-system]
+requires = ['setuptools', 'wheel']
+build-backend = 'setuptools.build_meta'
diff --git a/pw_package/py/setup.cfg b/pw_package/py/setup.cfg
new file mode 100644
index 000000000..c26ede431
--- /dev/null
+++ b/pw_package/py/setup.cfg
@@ -0,0 +1,27 @@
+# Copyright 2021 The Pigweed Authors
+#
+# Licensed under the Apache License, Version 2.0 (the "License"); you may not
+# use this file except in compliance with the License. You may obtain a copy of
+# the License at
+#
+# https://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS, 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.
+[metadata]
+name = pw_package
+version = 0.0.1
+author = Pigweed Authors
+author_email = pigweed-developers@googlegroups.com
+description = Tools for installing optional packages
+
+[options]
+packages = find:
+zip_safe = False
+install_requires =
+
+[options.package_data]
+pw_package = py.typed
diff --git a/pw_package/py/setup.py b/pw_package/py/setup.py
index eb574be90..aac918303 100644
--- a/pw_package/py/setup.py
+++ b/pw_package/py/setup.py
@@ -1,4 +1,4 @@
-# Copyright 2020 The Pigweed Authors
+# Copyright 2021 The Pigweed Authors
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may not
# use this file except in compliance with the License. You may obtain a copy of
@@ -11,18 +11,8 @@
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations under
# the License.
-"""The pw_package package."""
+"""pw_package"""
import setuptools # type: ignore
-setuptools.setup(
- name='pw_package',
- version='0.0.1',
- author='Pigweed Authors',
- author_email='pigweed-developers@googlegroups.com',
- description='Tools for installing optional packages',
- packages=setuptools.find_packages(),
- package_data={'pw_package': ['py.typed']},
- zip_safe=False,
- install_requires=[],
-)
+setuptools.setup() # Package definition in setup.cfg
diff --git a/pw_presubmit/py/pyproject.toml b/pw_presubmit/py/pyproject.toml
new file mode 100644
index 000000000..798b747ec
--- /dev/null
+++ b/pw_presubmit/py/pyproject.toml
@@ -0,0 +1,16 @@
+# Copyright 2021 The Pigweed Authors
+#
+# Licensed under the Apache License, Version 2.0 (the "License"); you may not
+# use this file except in compliance with the License. You may obtain a copy of
+# the License at
+#
+# https://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS, 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.
+[build-system]
+requires = ['setuptools', 'wheel']
+build-backend = 'setuptools.build_meta'
diff --git a/pw_presubmit/py/setup.cfg b/pw_presubmit/py/setup.cfg
new file mode 100644
index 000000000..14652af9d
--- /dev/null
+++ b/pw_presubmit/py/setup.cfg
@@ -0,0 +1,31 @@
+# Copyright 2021 The Pigweed Authors
+#
+# Licensed under the Apache License, Version 2.0 (the "License"); you may not
+# use this file except in compliance with the License. You may obtain a copy of
+# the License at
+#
+# https://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS, 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.
+[metadata]
+name = pw_presubmit
+version = 0.0.1
+author = Pigweed Authors
+author_email = pigweed-developers@googlegroups.com
+description = Presubmit tools and a presubmit script for Pigweed
+
+[options]
+packages = find:
+zip_safe = False
+install_requires =
+ scan-build==2.0.19
+ yapf==0.31.0
+ pw_cli
+ pw_package
+
+[options.package_data]
+pw_presubmit = py.typed
diff --git a/pw_presubmit/py/setup.py b/pw_presubmit/py/setup.py
index 559f29b08..46177377a 100644
--- a/pw_presubmit/py/setup.py
+++ b/pw_presubmit/py/setup.py
@@ -1,4 +1,4 @@
-# Copyright 2019 The Pigweed Authors
+# Copyright 2021 The Pigweed Authors
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may not
# use this file except in compliance with the License. You may obtain a copy of
@@ -11,23 +11,8 @@
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations under
# the License.
-"""The pw_presubmit package."""
+"""pw_presubmit"""
import setuptools # type: ignore
-setuptools.setup(
- name='pw_presubmit',
- version='0.0.1',
- author='Pigweed Authors',
- author_email='pigweed-developers@googlegroups.com',
- description='Presubmit tools and a presubmit script for Pigweed',
- install_requires=[
- 'scan-build==2.0.19',
- 'yapf==0.31.0',
- 'pw_cli',
- 'pw_package',
- ],
- packages=setuptools.find_packages(),
- package_data={'pw_presubmit': ['py.typed']},
- zip_safe=False,
-)
+setuptools.setup() # Package definition in setup.cfg
diff --git a/pw_protobuf/py/pyproject.toml b/pw_protobuf/py/pyproject.toml
new file mode 100644
index 000000000..798b747ec
--- /dev/null
+++ b/pw_protobuf/py/pyproject.toml
@@ -0,0 +1,16 @@
+# Copyright 2021 The Pigweed Authors
+#
+# Licensed under the Apache License, Version 2.0 (the "License"); you may not
+# use this file except in compliance with the License. You may obtain a copy of
+# the License at
+#
+# https://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS, 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.
+[build-system]
+requires = ['setuptools', 'wheel']
+build-backend = 'setuptools.build_meta'
diff --git a/pw_protobuf/py/setup.cfg b/pw_protobuf/py/setup.cfg
new file mode 100644
index 000000000..d4bc72fb4
--- /dev/null
+++ b/pw_protobuf/py/setup.cfg
@@ -0,0 +1,31 @@
+# Copyright 2021 The Pigweed Authors
+#
+# Licensed under the Apache License, Version 2.0 (the "License"); you may not
+# use this file except in compliance with the License. You may obtain a copy of
+# the License at
+#
+# https://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS, 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.
+[metadata]
+name = pw_protobuf
+version = 0.0.1
+author = Pigweed Authors
+author_email = pigweed-developers@googlegroups.com
+description = Lightweight streaming protobuf implementation
+
+[options]
+packages = find:
+zip_safe = False
+install_requires = protobuf; pw_cli
+
+[options.entry_points]
+console_scripts =
+ pw_protobuf_codegen = pw_protobuf.plugin:main
+
+[options.package_data]
+pw_protobuf = py.typed
diff --git a/pw_protobuf/py/setup.py b/pw_protobuf/py/setup.py
index d55b53bf0..7d15878d6 100644
--- a/pw_protobuf/py/setup.py
+++ b/pw_protobuf/py/setup.py
@@ -1,4 +1,4 @@
-# Copyright 2019 The Pigweed Authors
+# Copyright 2021 The Pigweed Authors
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may not
# use this file except in compliance with the License. You may obtain a copy of
@@ -15,20 +15,4 @@
import setuptools # type: ignore
-setuptools.setup(
- name='pw_protobuf',
- version='0.0.1',
- author='Pigweed Authors',
- author_email='pigweed-developers@googlegroups.com',
- description='Lightweight streaming protobuf implementation',
- packages=setuptools.find_packages(),
- package_data={'pw_protobuf': ['py.typed']},
- zip_safe=False,
- entry_points={
- 'console_scripts': ['pw_protobuf_codegen = pw_protobuf.plugin:main']
- },
- install_requires=[
- 'protobuf',
- 'pw_cli',
- ],
-)
+setuptools.setup() # Package definition in setup.cfg
diff --git a/pw_protobuf_compiler/py/pyproject.toml b/pw_protobuf_compiler/py/pyproject.toml
new file mode 100644
index 000000000..798b747ec
--- /dev/null
+++ b/pw_protobuf_compiler/py/pyproject.toml
@@ -0,0 +1,16 @@
+# Copyright 2021 The Pigweed Authors
+#
+# Licensed under the Apache License, Version 2.0 (the "License"); you may not
+# use this file except in compliance with the License. You may obtain a copy of
+# the License at
+#
+# https://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS, 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.
+[build-system]
+requires = ['setuptools', 'wheel']
+build-backend = 'setuptools.build_meta'
diff --git a/pw_protobuf_compiler/py/setup.cfg b/pw_protobuf_compiler/py/setup.cfg
new file mode 100644
index 000000000..7ab6029b8
--- /dev/null
+++ b/pw_protobuf_compiler/py/setup.cfg
@@ -0,0 +1,27 @@
+# Copyright 2021 The Pigweed Authors
+#
+# Licensed under the Apache License, Version 2.0 (the "License"); you may not
+# use this file except in compliance with the License. You may obtain a copy of
+# the License at
+#
+# https://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS, 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.
+[metadata]
+name = pw_protobuf_compiler
+version = 0.0.1
+author = Pigweed Authors
+author_email = pigweed-developers@googlegroups.com
+description = Pigweed protoc wrapper
+
+[options]
+packages = find:
+zip_safe = False
+install_requires = mypy-protobuf; protobuf; pw_cli
+
+[options.package_data]
+pw_protobuf_compiler = py.typed
diff --git a/pw_protobuf_compiler/py/setup.py b/pw_protobuf_compiler/py/setup.py
index b0d865766..ee28b2297 100644
--- a/pw_protobuf_compiler/py/setup.py
+++ b/pw_protobuf_compiler/py/setup.py
@@ -1,4 +1,4 @@
-# Copyright 2019 The Pigweed Authors
+# Copyright 2021 The Pigweed Authors
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may not
# use this file except in compliance with the License. You may obtain a copy of
@@ -15,18 +15,4 @@
import setuptools # type: ignore
-setuptools.setup(
- name='pw_protobuf_compiler',
- version='0.0.1',
- author='Pigweed Authors',
- author_email='pigweed-developers@googlegroups.com',
- description='Pigweed protoc wrapper',
- packages=setuptools.find_packages(),
- package_data={'pw_protobuf_compiler': ['py.typed']},
- zip_safe=False,
- install_requires=[
- 'mypy-protobuf',
- 'protobuf',
- 'pw_cli',
- ],
-)
+setuptools.setup() # Package definition in setup.cfg
diff --git a/pw_status/py/pyproject.toml b/pw_status/py/pyproject.toml
new file mode 100644
index 000000000..798b747ec
--- /dev/null
+++ b/pw_status/py/pyproject.toml
@@ -0,0 +1,16 @@
+# Copyright 2021 The Pigweed Authors
+#
+# Licensed under the Apache License, Version 2.0 (the "License"); you may not
+# use this file except in compliance with the License. You may obtain a copy of
+# the License at
+#
+# https://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS, 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.
+[build-system]
+requires = ['setuptools', 'wheel']
+build-backend = 'setuptools.build_meta'
diff --git a/pw_status/py/setup.cfg b/pw_status/py/setup.cfg
new file mode 100644
index 000000000..5d7d08123
--- /dev/null
+++ b/pw_status/py/setup.cfg
@@ -0,0 +1,26 @@
+# Copyright 2021 The Pigweed Authors
+#
+# Licensed under the Apache License, Version 2.0 (the "License"); you may not
+# use this file except in compliance with the License. You may obtain a copy of
+# the License at
+#
+# https://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS, 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.
+[metadata]
+name = pw_status
+version = 0.0.1
+author = Pigweed Authors
+author_email = pigweed-developers@googlegroups.com
+description = Pigweed Status object
+
+[options]
+packages = find:
+zip_safe = False
+
+[options.package_data]
+pw_status = py.typed
diff --git a/pw_status/py/setup.py b/pw_status/py/setup.py
index 13faaaf85..69875d95a 100644
--- a/pw_status/py/setup.py
+++ b/pw_status/py/setup.py
@@ -1,4 +1,4 @@
-# Copyright 2020 The Pigweed Authors
+# Copyright 2021 The Pigweed Authors
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may not
# use this file except in compliance with the License. You may obtain a copy of
@@ -15,13 +15,4 @@
import setuptools # type: ignore
-setuptools.setup(
- name='pw_status',
- version='0.0.1',
- author='Pigweed Authors',
- author_email='pigweed-developers@googlegroups.com',
- description='Pigweed Status object',
- packages=setuptools.find_packages(),
- package_data={'pw_status': ['py.typed']},
- zip_safe=False,
-)
+setuptools.setup() # Package definition in setup.cfg
diff --git a/pw_stm32cube_build/py/pyproject.toml b/pw_stm32cube_build/py/pyproject.toml
new file mode 100644
index 000000000..798b747ec
--- /dev/null
+++ b/pw_stm32cube_build/py/pyproject.toml
@@ -0,0 +1,16 @@
+# Copyright 2021 The Pigweed Authors
+#
+# Licensed under the Apache License, Version 2.0 (the "License"); you may not
+# use this file except in compliance with the License. You may obtain a copy of
+# the License at
+#
+# https://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS, 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.
+[build-system]
+requires = ['setuptools', 'wheel']
+build-backend = 'setuptools.build_meta'
diff --git a/pw_stm32cube_build/py/setup.cfg b/pw_stm32cube_build/py/setup.cfg
new file mode 100644
index 000000000..620ebf4b4
--- /dev/null
+++ b/pw_stm32cube_build/py/setup.cfg
@@ -0,0 +1,31 @@
+# Copyright 2021 The Pigweed Authors
+#
+# Licensed under the Apache License, Version 2.0 (the "License"); you may not
+# use this file except in compliance with the License. You may obtain a copy of
+# the License at
+#
+# https://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS, 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.
+[metadata]
+name = pw_stm32cube_build
+version = 0.0.1
+author = Pigweed Authors
+author_email = pigweed-developers@googlegroups.com
+description = Python scripts for stm32cube targets
+
+[options]
+packages = find:
+zip_safe = False
+install_requires =
+
+[options.entry_points]
+console_scripts =
+ stm32cube_builder = pw_stm32cube_build.__main__:main
+
+[options.package_data]
+pw_stm32cube_build = py.typed
diff --git a/pw_stm32cube_build/py/setup.py b/pw_stm32cube_build/py/setup.py
index 4a4f3b331..1e2ab2a48 100644
--- a/pw_stm32cube_build/py/setup.py
+++ b/pw_stm32cube_build/py/setup.py
@@ -15,18 +15,4 @@
import setuptools # type: ignore
-setuptools.setup(
- name='pw_stm32cube_build',
- version='0.0.1',
- author='Pigweed Authors',
- author_email='pigweed-developers@googlegroups.com',
- description='Python scripts for stm32cube targets',
- packages=setuptools.find_packages(),
- package_data={'pw_stm32cube_build': ['py.typed']},
- zip_safe=False,
- entry_points={
- 'console_scripts': [
- 'stm32cube_builder = pw_stm32cube_build.__main__:main',
- ]
- },
- install_requires=[])
+setuptools.setup() # Package definition in setup.cfg
diff --git a/pw_tls_client/py/pyproject.toml b/pw_tls_client/py/pyproject.toml
new file mode 100644
index 000000000..798b747ec
--- /dev/null
+++ b/pw_tls_client/py/pyproject.toml
@@ -0,0 +1,16 @@
+# Copyright 2021 The Pigweed Authors
+#
+# Licensed under the Apache License, Version 2.0 (the "License"); you may not
+# use this file except in compliance with the License. You may obtain a copy of
+# the License at
+#
+# https://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS, 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.
+[build-system]
+requires = ['setuptools', 'wheel']
+build-backend = 'setuptools.build_meta'
diff --git a/pw_tls_client/py/setup.cfg b/pw_tls_client/py/setup.cfg
new file mode 100644
index 000000000..6a52caeb4
--- /dev/null
+++ b/pw_tls_client/py/setup.cfg
@@ -0,0 +1,27 @@
+# Copyright 2021 The Pigweed Authors
+#
+# Licensed under the Apache License, Version 2.0 (the "License"); you may not
+# use this file except in compliance with the License. You may obtain a copy of
+# the License at
+#
+# https://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS, 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.
+[metadata]
+name = pw_tls_client
+version = 0.0.1
+author = Pigweed Authors
+author_email = pigweed-developers@googlegroups.com
+description = pw_tls_client python package
+
+[options]
+packages = find:
+zip_safe = False
+install_requires = cryptography
+
+[options.package_data]
+pw_tls_client = py.typed
diff --git a/pw_tls_client/py/setup.py b/pw_tls_client/py/setup.py
index e0634339e..15092a157 100644
--- a/pw_tls_client/py/setup.py
+++ b/pw_tls_client/py/setup.py
@@ -15,14 +15,4 @@
import setuptools # type: ignore
-setuptools.setup(
- name='pw_tls_client',
- version='0.0.1',
- author='Pigweed Authors',
- author_email='pigweed-developers@googlegroups.com',
- description='pw_tls_client python package',
- packages=setuptools.find_packages(),
- package_data={'pw_tls_client': ['py.typed']},
- zip_safe=False,
- install_requires=['cryptography'],
-)
+setuptools.setup() # Package definition in setup.cfg
diff --git a/pw_tokenizer/py/pyproject.toml b/pw_tokenizer/py/pyproject.toml
new file mode 100644
index 000000000..798b747ec
--- /dev/null
+++ b/pw_tokenizer/py/pyproject.toml
@@ -0,0 +1,16 @@
+# Copyright 2021 The Pigweed Authors
+#
+# Licensed under the Apache License, Version 2.0 (the "License"); you may not
+# use this file except in compliance with the License. You may obtain a copy of
+# the License at
+#
+# https://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS, 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.
+[build-system]
+requires = ['setuptools', 'wheel']
+build-backend = 'setuptools.build_meta'
diff --git a/pw_tokenizer/py/setup.cfg b/pw_tokenizer/py/setup.cfg
new file mode 100644
index 000000000..99e075d61
--- /dev/null
+++ b/pw_tokenizer/py/setup.cfg
@@ -0,0 +1,26 @@
+# Copyright 2021 The Pigweed Authors
+#
+# Licensed under the Apache License, Version 2.0 (the "License"); you may not
+# use this file except in compliance with the License. You may obtain a copy of
+# the License at
+#
+# https://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS, 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.
+[metadata]
+name = pw_tokenizer
+version = 0.0.1
+author = Pigweed Authors
+author_email = pigweed-developers@googlegroups.com
+description = Tools for working with tokenized strings
+
+[options]
+packages = pw_tokenizer
+zip_safe = False
+
+[options.package_data]
+pw_tokenizer = py.typed
diff --git a/pw_tokenizer/py/setup.py b/pw_tokenizer/py/setup.py
index eba125e61..fd5c1e6f7 100644
--- a/pw_tokenizer/py/setup.py
+++ b/pw_tokenizer/py/setup.py
@@ -15,19 +15,8 @@
Installing pw_tokenizer with this setup.py does not include the
pw_tokenizer.proto package, since it contains a generated protobuf module. To
-access pw_tokenizer.proto, install pw_tokenizer from GN.
-"""
+access pw_tokenizer.proto, install pw_tokenizer from GN."""
import setuptools # type: ignore
-setuptools.setup(
- name='pw_tokenizer',
- version='0.0.1',
- author='Pigweed Authors',
- author_email='pigweed-developers@googlegroups.com',
- description='Tools for working with tokenized strings',
- packages=['pw_tokenizer'],
- package_data={'pw_tokenizer': ['py.typed']},
- zip_safe=False,
- extra_requires=['serial'],
-)
+setuptools.setup() # Package definition in setup.cfg
diff --git a/pw_toolchain/py/pyproject.toml b/pw_toolchain/py/pyproject.toml
new file mode 100644
index 000000000..798b747ec
--- /dev/null
+++ b/pw_toolchain/py/pyproject.toml
@@ -0,0 +1,16 @@
+# Copyright 2021 The Pigweed Authors
+#
+# Licensed under the Apache License, Version 2.0 (the "License"); you may not
+# use this file except in compliance with the License. You may obtain a copy of
+# the License at
+#
+# https://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS, 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.
+[build-system]
+requires = ['setuptools', 'wheel']
+build-backend = 'setuptools.build_meta'
diff --git a/pw_toolchain/py/setup.cfg b/pw_toolchain/py/setup.cfg
new file mode 100644
index 000000000..6ddd198d8
--- /dev/null
+++ b/pw_toolchain/py/setup.cfg
@@ -0,0 +1,26 @@
+# Copyright 2021 The Pigweed Authors
+#
+# Licensed under the Apache License, Version 2.0 (the "License"); you may not
+# use this file except in compliance with the License. You may obtain a copy of
+# the License at
+#
+# https://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS, 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.
+[metadata]
+name = pw_toolchain
+version = 0.0.1
+author = Pigweed Authors
+author_email = pigweed-developers@googlegroups.com
+description = Pigweed toolchain wrapper
+
+[options]
+packages = find:
+zip_safe = False
+
+[options.package_data]
+pw_toolchain = py.typed
diff --git a/pw_toolchain/py/setup.py b/pw_toolchain/py/setup.py
index 088fe500d..ecfac6ea9 100644
--- a/pw_toolchain/py/setup.py
+++ b/pw_toolchain/py/setup.py
@@ -15,11 +15,4 @@
import setuptools # type: ignore
-setuptools.setup(name='pw_toolchain',
- version='0.0.1',
- author='Pigweed Authors',
- author_email='pigweed-developers@googlegroups.com',
- description='Pigweed toolchain wrapper',
- packages=setuptools.find_packages(),
- package_data={'pw_toolchain': ['py.typed']},
- zip_safe=False)
+setuptools.setup() # Package definition in setup.cfg
diff --git a/pw_trace/py/pyproject.toml b/pw_trace/py/pyproject.toml
new file mode 100644
index 000000000..798b747ec
--- /dev/null
+++ b/pw_trace/py/pyproject.toml
@@ -0,0 +1,16 @@
+# Copyright 2021 The Pigweed Authors
+#
+# Licensed under the Apache License, Version 2.0 (the "License"); you may not
+# use this file except in compliance with the License. You may obtain a copy of
+# the License at
+#
+# https://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS, 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.
+[build-system]
+requires = ['setuptools', 'wheel']
+build-backend = 'setuptools.build_meta'
diff --git a/pw_trace/py/setup.cfg b/pw_trace/py/setup.cfg
new file mode 100644
index 000000000..f5dfe8144
--- /dev/null
+++ b/pw_trace/py/setup.cfg
@@ -0,0 +1,26 @@
+# Copyright 2021 The Pigweed Authors
+#
+# Licensed under the Apache License, Version 2.0 (the "License"); you may not
+# use this file except in compliance with the License. You may obtain a copy of
+# the License at
+#
+# https://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS, 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.
+[metadata]
+name = pw_trace
+version = 0.0.1
+author = Pigweed Authors
+author_email = pigweed-developers@googlegroups.com
+description = Tools for dealing with trace data
+
+[options]
+packages = find:
+zip_safe = False
+
+[options.package_data]
+pw_trace = py.typed
diff --git a/pw_trace/py/setup.py b/pw_trace/py/setup.py
index 9fa3379aa..9e3cda1f5 100644
--- a/pw_trace/py/setup.py
+++ b/pw_trace/py/setup.py
@@ -1,4 +1,4 @@
-# Copyright 2020 The Pigweed Authors
+# Copyright 2021 The Pigweed Authors
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may not
# use this file except in compliance with the License. You may obtain a copy of
@@ -11,17 +11,8 @@
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations under
# the License.
-"""The pw_trace package."""
+"""pw_trace"""
import setuptools # type: ignore
-setuptools.setup(
- name='pw_trace',
- version='0.0.1',
- author='Pigweed Authors',
- author_email='pigweed-developers@googlegroups.com',
- description='Tools for dealing with trace data',
- packages=setuptools.find_packages(),
- package_data={'pw_trace': ['py.typed']},
- zip_safe=False,
-)
+setuptools.setup() # Package definition in setup.cfg
diff --git a/pw_trace_tokenized/py/pyproject.toml b/pw_trace_tokenized/py/pyproject.toml
new file mode 100644
index 000000000..798b747ec
--- /dev/null
+++ b/pw_trace_tokenized/py/pyproject.toml
@@ -0,0 +1,16 @@
+# Copyright 2021 The Pigweed Authors
+#
+# Licensed under the Apache License, Version 2.0 (the "License"); you may not
+# use this file except in compliance with the License. You may obtain a copy of
+# the License at
+#
+# https://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS, 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.
+[build-system]
+requires = ['setuptools', 'wheel']
+build-backend = 'setuptools.build_meta'
diff --git a/pw_trace_tokenized/py/setup.cfg b/pw_trace_tokenized/py/setup.cfg
new file mode 100644
index 000000000..5a5cfb234
--- /dev/null
+++ b/pw_trace_tokenized/py/setup.cfg
@@ -0,0 +1,30 @@
+# Copyright 2021 The Pigweed Authors
+#
+# Licensed under the Apache License, Version 2.0 (the "License"); you may not
+# use this file except in compliance with the License. You may obtain a copy of
+# the License at
+#
+# https://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS, 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.
+[metadata]
+name = pw_trace_tokenized
+version = 0.0.1
+author = Pigweed Authors
+author_email = pigweed-developers@googlegroups.com
+description = pw_trace backend to tokenize trace events
+
+[options]
+packages = find:
+zip_safe = False
+install_requires =
+ pw_hdlc
+ pw_tokenizer
+ pw_trace
+
+[options.package_data]
+pw_trace_tokenized = py.typed
diff --git a/pw_trace_tokenized/py/setup.py b/pw_trace_tokenized/py/setup.py
index 0d3066be2..7deec831c 100644
--- a/pw_trace_tokenized/py/setup.py
+++ b/pw_trace_tokenized/py/setup.py
@@ -1,4 +1,4 @@
-# Copyright 2020 The Pigweed Authors
+# Copyright 2021 The Pigweed Authors
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may not
# use this file except in compliance with the License. You may obtain a copy of
@@ -11,22 +11,8 @@
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations under
# the License.
-"""The pw_trace_tokenized package."""
+"""pw_trace_tokenized"""
import setuptools # type: ignore
-setuptools.setup(
- name='pw_trace_tokenized',
- version='0.0.1',
- author='Pigweed Authors',
- author_email='pigweed-developers@googlegroups.com',
- description='pw_trace backend to tokenize trace events',
- packages=setuptools.find_packages(),
- package_data={'pw_trace_tokenized': ['py.typed']},
- zip_safe=False,
- install_requires=[
- 'pw_hdlc',
- 'pw_tokenizer',
- 'pw_trace',
- ],
-)
+setuptools.setup() # Package definition in setup.cfg
diff --git a/pw_unit_test/py/pyproject.toml b/pw_unit_test/py/pyproject.toml
new file mode 100644
index 000000000..798b747ec
--- /dev/null
+++ b/pw_unit_test/py/pyproject.toml
@@ -0,0 +1,16 @@
+# Copyright 2021 The Pigweed Authors
+#
+# Licensed under the Apache License, Version 2.0 (the "License"); you may not
+# use this file except in compliance with the License. You may obtain a copy of
+# the License at
+#
+# https://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS, 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.
+[build-system]
+requires = ['setuptools', 'wheel']
+build-backend = 'setuptools.build_meta'
diff --git a/pw_unit_test/py/setup.cfg b/pw_unit_test/py/setup.cfg
new file mode 100644
index 000000000..c73ce6922
--- /dev/null
+++ b/pw_unit_test/py/setup.cfg
@@ -0,0 +1,27 @@
+# Copyright 2021 The Pigweed Authors
+#
+# Licensed under the Apache License, Version 2.0 (the "License"); you may not
+# use this file except in compliance with the License. You may obtain a copy of
+# the License at
+#
+# https://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS, 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.
+[metadata]
+name = pw_unit_test
+version = 0.1.0
+author = Pigweed Authors
+author_email = pigweed-developers@googlegroups.com
+description = Unit tests for Pigweed projects
+
+[options]
+packages = find:
+zip_safe = False
+install_requires = pw_cli; pw_rpc; pw_unit_test_proto
+
+[options.package_data]
+pw_unit_test = py.typed
diff --git a/pw_unit_test/py/setup.py b/pw_unit_test/py/setup.py
index 7ae8df1df..a3101bfd6 100644
--- a/pw_unit_test/py/setup.py
+++ b/pw_unit_test/py/setup.py
@@ -1,4 +1,4 @@
-# Copyright 2019 The Pigweed Authors
+# Copyright 2021 The Pigweed Authors
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may not
# use this file except in compliance with the License. You may obtain a copy of
@@ -15,18 +15,4 @@
import setuptools # type: ignore
-setuptools.setup(
- name='pw_unit_test',
- version='0.1.0',
- author='Pigweed Authors',
- author_email='pigweed-developers@googlegroups.com',
- description='Unit tests for Pigweed projects',
- packages=setuptools.find_packages(),
- package_data={'pw_unit_test': ['py.typed']},
- zip_safe=False,
- install_requires=[
- 'pw_cli',
- 'pw_rpc',
- 'pw_unit_test_proto',
- ],
-)
+setuptools.setup() # Package definition in setup.cfg
diff --git a/pw_watch/py/pyproject.toml b/pw_watch/py/pyproject.toml
new file mode 100644
index 000000000..798b747ec
--- /dev/null
+++ b/pw_watch/py/pyproject.toml
@@ -0,0 +1,16 @@
+# Copyright 2021 The Pigweed Authors
+#
+# Licensed under the Apache License, Version 2.0 (the "License"); you may not
+# use this file except in compliance with the License. You may obtain a copy of
+# the License at
+#
+# https://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS, 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.
+[build-system]
+requires = ['setuptools', 'wheel']
+build-backend = 'setuptools.build_meta'
diff --git a/pw_watch/py/setup.cfg b/pw_watch/py/setup.cfg
new file mode 100644
index 000000000..504489c0b
--- /dev/null
+++ b/pw_watch/py/setup.cfg
@@ -0,0 +1,27 @@
+# Copyright 2021 The Pigweed Authors
+#
+# Licensed under the Apache License, Version 2.0 (the "License"); you may not
+# use this file except in compliance with the License. You may obtain a copy of
+# the License at
+#
+# https://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS, 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.
+[metadata]
+name = pw_watch
+version = 0.0.1
+author = Pigweed Authors
+author_email = pigweed-developers@googlegroups.com
+description = Pigweed automatic builder
+
+[options]
+packages = find:
+zip_safe = False
+install_requires = httpwatcher; pw_cli; watchdog>=2.1.0
+
+[options.package_data]
+pw_watch = py.typed
diff --git a/pw_watch/py/setup.py b/pw_watch/py/setup.py
index 2dcdb78bb..e73a002da 100644
--- a/pw_watch/py/setup.py
+++ b/pw_watch/py/setup.py
@@ -1,4 +1,4 @@
-# Copyright 2019 The Pigweed Authors
+# Copyright 2021 The Pigweed Authors
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may not
# use this file except in compliance with the License. You may obtain a copy of
@@ -15,22 +15,4 @@
import setuptools # type: ignore
-setuptools.setup(
- name='pw_watch',
- version='0.0.1',
- author='Pigweed Authors',
- author_email='pigweed-developers@googlegroups.com',
- description='Pigweed automatic builder',
- packages=setuptools.find_packages(),
- package_data={'pw_watch': ['py.typed']},
- zip_safe=False,
- install_requires=[
- 'httpwatcher',
- 'pw_cli',
- # Versions of watchdog after 0.10.3 but before 2.1.0 ignore the
- # 'recursive' argument on MacOS. This was causing us to trigger on any
- # file within the source tree, even those that should have been ignored.
- # See https://github.com/gorakhargosh/watchdog/issues/771.
- 'watchdog>=2.1.0',
- ],
-)
+setuptools.setup() # Package definition in setup.cfg
diff --git a/targets/lm3s6965evb_qemu/py/pyproject.toml b/targets/lm3s6965evb_qemu/py/pyproject.toml
new file mode 100644
index 000000000..798b747ec
--- /dev/null
+++ b/targets/lm3s6965evb_qemu/py/pyproject.toml
@@ -0,0 +1,16 @@
+# Copyright 2021 The Pigweed Authors
+#
+# Licensed under the Apache License, Version 2.0 (the "License"); you may not
+# use this file except in compliance with the License. You may obtain a copy of
+# the License at
+#
+# https://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS, 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.
+[build-system]
+requires = ['setuptools', 'wheel']
+build-backend = 'setuptools.build_meta'
diff --git a/targets/lm3s6965evb_qemu/py/setup.cfg b/targets/lm3s6965evb_qemu/py/setup.cfg
new file mode 100644
index 000000000..f38027501
--- /dev/null
+++ b/targets/lm3s6965evb_qemu/py/setup.cfg
@@ -0,0 +1,31 @@
+# Copyright 2021 The Pigweed Authors
+#
+# Licensed under the Apache License, Version 2.0 (the "License"); you may not
+# use this file except in compliance with the License. You may obtain a copy of
+# the License at
+#
+# https://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS, 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.
+[metadata]
+name = lm3s6965evb_qemu_utils
+version = 0.0.1
+author = Pigweed Authors
+author_email = pigweed-developers@googlegroups.com
+description = Target-specific python scripts for the lm3s6965evb-qemu target
+
+[options]
+packages = find:
+zip_safe = False
+install_requires = coloredlogs
+
+[options.entry_points]
+console_scripts =
+ lm3s6965evb_qemu_unit_test_runner = lm3s6965evb_qemu_utils.unit_test_runner:main
+
+[options.package_data]
+lm3s6965evb_qemu_utils = py.typed
diff --git a/targets/lm3s6965evb_qemu/py/setup.py b/targets/lm3s6965evb_qemu/py/setup.py
index 4223685ab..7842ebd4a 100644
--- a/targets/lm3s6965evb_qemu/py/setup.py
+++ b/targets/lm3s6965evb_qemu/py/setup.py
@@ -1,4 +1,4 @@
-# Copyright 2020 The Pigweed Authors
+# Copyright 2021 The Pigweed Authors
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may not
# use this file except in compliance with the License. You may obtain a copy of
@@ -15,21 +15,4 @@
import setuptools # type: ignore
-setuptools.setup(
- name='lm3s6965evb_qemu_utils',
- version='0.0.1',
- author='Pigweed Authors',
- author_email='pigweed-developers@googlegroups.com',
- description=
- 'Target-specific python scripts for the lm3s6965evb-qemu target',
- packages=setuptools.find_packages(),
- package_data={'lm3s6965evb_qemu_utils': ['py.typed']},
- zip_safe=False,
- entry_points={
- 'console_scripts': [
- 'lm3s6965evb_qemu_unit_test_runner = '
- ' lm3s6965evb_qemu_utils.unit_test_runner:main',
- ]
- },
- install_requires=['coloredlogs'],
-)
+setuptools.setup() # Package definition in setup.cfg
diff --git a/targets/stm32f429i_disc1/py/pyproject.toml b/targets/stm32f429i_disc1/py/pyproject.toml
new file mode 100644
index 000000000..798b747ec
--- /dev/null
+++ b/targets/stm32f429i_disc1/py/pyproject.toml
@@ -0,0 +1,16 @@
+# Copyright 2021 The Pigweed Authors
+#
+# Licensed under the Apache License, Version 2.0 (the "License"); you may not
+# use this file except in compliance with the License. You may obtain a copy of
+# the License at
+#
+# https://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS, 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.
+[build-system]
+requires = ['setuptools', 'wheel']
+build-backend = 'setuptools.build_meta'
diff --git a/targets/stm32f429i_disc1/py/setup.cfg b/targets/stm32f429i_disc1/py/setup.cfg
new file mode 100644
index 000000000..42a74b831
--- /dev/null
+++ b/targets/stm32f429i_disc1/py/setup.cfg
@@ -0,0 +1,34 @@
+# Copyright 2021 The Pigweed Authors
+#
+# Licensed under the Apache License, Version 2.0 (the "License"); you may not
+# use this file except in compliance with the License. You may obtain a copy of
+# the License at
+#
+# https://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS, 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.
+[metadata]
+name = stm32f429i_disc1_utils
+version = 0.0.1
+author = Pigweed Authors
+author_email = pigweed-developers@googlegroups.com
+description = Target-specific python scripts for the stm32f429i-disc1 target
+
+[options]
+packages = find:
+zip_safe = False
+install_requires = pyserial>=3.5,<4.0; coloredlogs; pw_cli
+
+[options.entry_points]
+console_scripts =
+ stm32f429i_disc1_unit_test_runner = stm32f429i_disc1_utils.unit_test_runner:main
+ stm32f429i_disc1_detector = stm32f429i_disc1_utils.stm32f429i_detector:main
+ stm32f429i_disc1_test_server = stm32f429i_disc1_utils.unit_test_server:main
+ stm32f429i_disc1_test_client = stm32f429i_disc1_utils.unit_test_client:main
+
+[options.package_data]
+stm32f429i_disc1_utils = py.typed
diff --git a/targets/stm32f429i_disc1/py/setup.py b/targets/stm32f429i_disc1/py/setup.py
index f8ab0a24e..9ce25598b 100644
--- a/targets/stm32f429i_disc1/py/setup.py
+++ b/targets/stm32f429i_disc1/py/setup.py
@@ -1,4 +1,4 @@
-# Copyright 2019 The Pigweed Authors
+# Copyright 2021 The Pigweed Authors
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may not
# use this file except in compliance with the License. You may obtain a copy of
@@ -15,31 +15,4 @@
import setuptools # type: ignore
-setuptools.setup(
- name='stm32f429i_disc1_utils',
- version='0.0.1',
- author='Pigweed Authors',
- author_email='pigweed-developers@googlegroups.com',
- description=
- 'Target-specific python scripts for the stm32f429i-disc1 target',
- packages=setuptools.find_packages(),
- package_data={'stm32f429i_disc1_utils': ['py.typed']},
- zip_safe=False,
- entry_points={
- 'console_scripts': [
- 'stm32f429i_disc1_unit_test_runner = '
- ' stm32f429i_disc1_utils.unit_test_runner:main',
- 'stm32f429i_disc1_detector = '
- ' stm32f429i_disc1_utils.stm32f429i_detector:main',
- 'stm32f429i_disc1_test_server = '
- ' stm32f429i_disc1_utils.unit_test_server:main',
- 'stm32f429i_disc1_test_client = '
- ' stm32f429i_disc1_utils.unit_test_client:main',
- ]
- },
- install_requires=[
- 'pyserial>=3.5,<4.0',
- 'coloredlogs',
- 'pw_cli',
- ],
-)
+setuptools.setup() # Package definition in setup.cfg