Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update to pybind11-stubgen 2.x #211

Merged
merged 12 commits into from
Oct 15, 2023
2 changes: 0 additions & 2 deletions .github/workflows/dist.yml
Original file line number Diff line number Diff line change
Expand Up @@ -67,8 +67,6 @@ jobs:
matrix:
os: [windows-latest, macos-latest, ubuntu-20.04]
python_version:
- '3.6'
- '3.7'

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

pybind11-stubgen>=1.2 supports Python 3.7.
3.6 would require me to get rid of from __future__ import annotations, which would cause too much of a burden to my code.

- '3.8'
- '3.9'
- '3.10'
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ of RobotPy's various wrapper libraries, chiefly around:
* Autogenerating pybind11 wrappers around those dependencies
* Building wheels from those generated wrappers

Requires Python 3.6+
Requires Python 3.8+

Documentation
-------------
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ build-backend = "setuptools.build_meta"
write_to = "robotpy_build/version.py"

[tool.black]
target-version = ['py36']
target-version = ['py38']
extend-exclude = '''
^/robotpy_build/pybind11
^/robotpy_build/version.py
Expand Down
23 changes: 11 additions & 12 deletions robotpy_build/command/build_pyi.py
Original file line number Diff line number Diff line change
Expand Up @@ -148,18 +148,17 @@ def main():
sys.meta_path.insert(0, _PackageFinder)

# Generate pyi modules
sys.argv = [
"<dummy>",
"--no-setup-py",
"--log-level=WARNING",
"--root-module-suffix=",
"--ignore-invalid",
"defaultarg",
"-o",
cfg["out"],
] + cfg["stubs"]

pybind11_stubgen.main()
out = cfg["out"]
for stub in cfg["stubs"]:
sys.argv = [
"<dummy>",
"--root-suffix=",
"-o",
out,
stub,
]

pybind11_stubgen.main()


if __name__ == "__main__":
Expand Down
2 changes: 1 addition & 1 deletion robotpy_build/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ def prepare(self):
self.setup_kwargs = self.project_dict.get("metadata", {})
self.setup_kwargs["zip_safe"] = False
self.setup_kwargs["include_package_data"] = True
self.setup_kwargs["python_requires"] = ">=3.6"
self.setup_kwargs["python_requires"] = ">=3.8"

self._generate_long_description()

Expand Down
7 changes: 2 additions & 5 deletions setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,6 @@ classifiers =
Intended Audience :: Developers
License :: OSI Approved :: BSD License
Programming Language :: Python :: 3 :: Only
Programming Language :: Python :: 3.6
Programming Language :: Python :: 3.7
Programming Language :: Python :: 3.8
Programming Language :: Python :: 3.9
Programming Language :: Python :: 3.10
Expand All @@ -37,11 +35,10 @@ install_requires =
toposort
pyyaml >= 5.1
patch == 1.*
pybind11-stubgen ~= 0.16
dataclasses; python_version < '3.7'
pybind11-stubgen ~= 2.3
delocate; platform_system == 'Darwin'
distro; platform_system == 'Linux'
python_requires = >=3.6
python_requires = >=3.8
auscompgeek marked this conversation as resolved.
Show resolved Hide resolved

[options.entry_points]
console_scripts =
Expand Down