Skip to content

Commit 51950e6

Browse files
authored
Update to pybind11-stubgen 2.x (#211)
* Update to pybind11-stubgen 1.0.dev1 * Drop Python 3.6 and 3.7 support * Remove removed ignore-invalid option * Update all the pybind11-stubgen options * Run stubgen on each module * Update to pybind11-stubgen 1.2 * Update to pybind11-stubgen 2.3 * Allow newer pybind11-stubgen versions * setup: Bump python_requires to 3.8 * Remove redundant dataclasses dep * Bump black target version
1 parent 7f1ab4e commit 51950e6

File tree

6 files changed

+16
-22
lines changed

6 files changed

+16
-22
lines changed

.github/workflows/dist.yml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -67,8 +67,6 @@ jobs:
6767
matrix:
6868
os: [windows-latest, macos-latest, ubuntu-20.04]
6969
python_version:
70-
- '3.6'
71-
- '3.7'
7270
- '3.8'
7371
- '3.9'
7472
- '3.10'

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ of RobotPy's various wrapper libraries, chiefly around:
99
* Autogenerating pybind11 wrappers around those dependencies
1010
* Building wheels from those generated wrappers
1111

12-
Requires Python 3.6+
12+
Requires Python 3.8+
1313

1414
Documentation
1515
-------------

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ build-backend = "setuptools.build_meta"
66
write_to = "robotpy_build/version.py"
77

88
[tool.black]
9-
target-version = ['py36']
9+
target-version = ['py38']
1010
extend-exclude = '''
1111
^/robotpy_build/pybind11
1212
^/robotpy_build/version.py

robotpy_build/command/build_pyi.py

Lines changed: 11 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -148,18 +148,17 @@ def main():
148148
sys.meta_path.insert(0, _PackageFinder)
149149

150150
# Generate pyi modules
151-
sys.argv = [
152-
"<dummy>",
153-
"--no-setup-py",
154-
"--log-level=WARNING",
155-
"--root-module-suffix=",
156-
"--ignore-invalid",
157-
"defaultarg",
158-
"-o",
159-
cfg["out"],
160-
] + cfg["stubs"]
161-
162-
pybind11_stubgen.main()
151+
out = cfg["out"]
152+
for stub in cfg["stubs"]:
153+
sys.argv = [
154+
"<dummy>",
155+
"--root-suffix=",
156+
"-o",
157+
out,
158+
stub,
159+
]
160+
161+
pybind11_stubgen.main()
163162

164163

165164
if __name__ == "__main__":

robotpy_build/setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ def prepare(self):
111111
self.setup_kwargs = self.project_dict.get("metadata", {})
112112
self.setup_kwargs["zip_safe"] = False
113113
self.setup_kwargs["include_package_data"] = True
114-
self.setup_kwargs["python_requires"] = ">=3.6"
114+
self.setup_kwargs["python_requires"] = ">=3.8"
115115

116116
self._generate_long_description()
117117

setup.cfg

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,6 @@ classifiers =
1212
Intended Audience :: Developers
1313
License :: OSI Approved :: BSD License
1414
Programming Language :: Python :: 3 :: Only
15-
Programming Language :: Python :: 3.6
16-
Programming Language :: Python :: 3.7
1715
Programming Language :: Python :: 3.8
1816
Programming Language :: Python :: 3.9
1917
Programming Language :: Python :: 3.10
@@ -37,11 +35,10 @@ install_requires =
3735
toposort
3836
pyyaml >= 5.1
3937
patch == 1.*
40-
pybind11-stubgen ~= 0.16
41-
dataclasses; python_version < '3.7'
38+
pybind11-stubgen ~= 2.3
4239
delocate; platform_system == 'Darwin'
4340
distro; platform_system == 'Linux'
44-
python_requires = >=3.6
41+
python_requires = >=3.8
4542

4643
[options.entry_points]
4744
console_scripts =

0 commit comments

Comments
 (0)