11
22.. _pyproject :
33
4- setup.py and pyproject.toml
5- ===========================
6-
7- setup.py
8- --------
9-
10- Projects that use robotpy-build must use the setup function provided by
11- robotpy-build. Your project's setup.py should look like this:
12-
13- .. code-block :: py
4+ pyproject.toml
5+ ==============
146
15- # !/usr/bin/env python3
16- from robotpy_build.setup import setup
17- setup()
7+ semiwrap is
188
199pyproject.toml
2010--------------
2111
22- Projects that use robotpy-build must add a ``pyproject.toml `` to the root of
12+ Projects that use semiwrap must add a ``pyproject.toml `` to the root of
2313their project as specified in `PEP 518 <https://www.python.org/dev/peps/pep-0518 >`_.
2414
2515It is recommended that projects include the standard ``build-system `` section to
26- tell pip to install robotpy-build (and any other dependencies) before starting
16+ tell pip to install semiwrap (and any other dependencies) before starting
2717a build.
2818
2919.. code-block :: toml
3020
3121 [build-system]
3222 requires = ["robotpy-build>=2020.1.0,<2021.0.0"]
3323
34- Projects must include robotpy-build specific sections in their pyproject.toml.
35- robotpy-build takes ``pyproject.toml `` and converts it to a python dictionary
24+ Projects must include semiwrap specific sections in their pyproject.toml.
25+ semiwrap takes ``pyproject.toml `` and converts it to a python dictionary
3626using ``toml.load ``. The resulting dictionary is given to pydantic, which
3727validates the structure of the dictionary against the objects described below.
3828
@@ -49,73 +39,12 @@ Optional sections:
4939* :class: `.PatchInfo ` - patch downloaded sources
5040
5141
52- .. note :: For a complete example pyproject.toml file, see ``tests/cpp/pyproject.toml.tmpl``
53-
54- .. _pyproject_overrides :
55-
56- Overrides
57- ---------
58-
59- You can define 'override' sections that will be grafted onto the configuration
60- if they match a particular platform. For example, to change the dependencies
61- for a wrapper section on Windows:
62-
63- .. code-block :: toml
64-
65- [tool.robotpy-build.wrappers."PACKAGENAME".override.os_windows]
66- depends = ["windows-thing"]
67-
68- Any element in the robotpy-build section of pyproject.toml can be overridden
69- by specifying the identical section as '.override.KEYNAME'. If the key matches
70- the current configuration, the override will be written to the original section.
71- The matched keys are generated at runtime. Current supported platform override
72- keys are:
73-
74- * ``arch_{platform_arch} ``
75- * ``os_{platform_os} ``
76- * ``platform_{platform_os}_{platform_arch} ``
77-
78- To get information about the current platform, you can run:
79-
80- .. code-block :: sh
81-
82- robotpy-build platform-info
83-
84- To show the available platforms:
85-
86- .. code-block :: sh
87-
88- robotpy-build platform-info --list
89-
90- To process a pyproject.toml and see the result of applying various overrides,
91- you can use this tool to process for the current platform:
92-
93- .. code-block :: sh
94-
95- robotpy-build show-override
96-
97- To show what would be processed for a different platform:
98-
99- .. code-block :: sh
100-
101- robotpy-build show-override -p linux-athena
102-
103- .. _platforms :
104-
105- Current supported platform/os/arch combinations are:
106-
107- * OS: windows/osx/linux
108- * Arch: x86/x86-64/armv7l/aarch64
109-
110- For ARM linux distributions we support:
42+ .. note :: For a complete example pyproject.toml file, see ``tests/cpp/*/pyproject.toml``
11143
112- * armv7l + nilrt (RoboRIO)
113- * armv7l + raspbian (Raspbian 10)
114- * aarch64 + bionic (Ubuntu 18.04)
11544
11645Reference
11746---------
11847
119- .. automodule :: robotpy_build .config.pyproject_toml
48+ .. automodule :: semiwrap .config.pyproject_toml
12049 :members:
12150 :exclude-members: __init__, Config
0 commit comments