Skip to content
This repository was archived by the owner on Mar 26, 2026. It is now read-only.

Commit d0775d2

Browse files
committed
add constraints file
1 parent d402180 commit d0775d2

1 file changed

Lines changed: 20 additions & 0 deletions

File tree

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
{% from '_pypi_packages.j2' import pypi_packages %}
2+
# We use the constraints file for the latest Python version
3+
# (currently this file) to check that the latest
4+
# major versions of dependencies are supported in setup.py.
5+
# List all library dependencies and extras in this file.
6+
# Require the latest major version be installed for each dependency.
7+
# e.g., if setup.py has "google-cloud-foo >= 1.14.0, < 2.0.0",
8+
# Then this file should have google-cloud-foo>=1
9+
google-api-core>=2
10+
google-auth>=2
11+
proto-plus>=1
12+
protobuf>=6
13+
{% for package_tuple, package_info in pypi_packages.items() %}
14+
{# Quick check to make sure `package_info.package_name` is not the package being generated so we don't circularly include this package in its own constraints file. #}
15+
{% if api.naming.warehouse_package_name != package_info.package_name %}
16+
{% if api.requires_package(package_tuple) %}
17+
{{ package_info.package_name }}>={{ (package_info.upper_bound.split(".")[0] | int) - 1 }}
18+
{% endif %}
19+
{% endif %}
20+
{% endfor %}

0 commit comments

Comments
 (0)