@@ -9,11 +9,11 @@ import io
99import os
1010import re
1111
12- import setuptools # type: ignore
12+ import setuptools # type: ignore
1313
1414package_root = os.path.abspath(os.path.dirname(__file__))
1515
16- name = ' {{ api.naming.warehouse_package_name }}'
16+ name = " {{ api.naming.warehouse_package_name }}"
1717
1818{% set warehouse_description = api .naming .warehouse_package_name .replace ('-' ,' ' )|title %}
1919
@@ -22,9 +22,9 @@ description = "{{ warehouse_description }} API client library"
2222
2323version = None
2424
25- with open(os.path.join(package_root, ' {{ package_path }}/gapic_version.py' )) as fp:
25+ with open(os.path.join(package_root, " {{ package_path }}/gapic_version.py" )) as fp:
2626 version_candidates = re.findall(r"(?<=\")\d+.\d+.\d+(?=\")", fp.read())
27- assert ( len(version_candidates) == 1)
27+ assert len(version_candidates) == 1
2828 version = version_candidates[0]
2929
3030if version[0] == "0":
@@ -52,14 +52,16 @@ dependencies = [
5252 {% endif %}
5353 {% endfor %}
5454]
55- extras = {
5655{% if rest_async_io_enabled %}
56+ extras = {
5757 "async_rest": [
5858 "google-api-core[grpc] >= 2.21.0, < 3.0.0",
59- "google-auth[aiohttp] >= 2.35.0, <3 .0.0 "
59+ "google-auth[aiohttp] >= 2.35.0, <3 .0.0 " ,
6060 ],
61- {% endif %}
6261}
62+ {% else %}
63+ extras = {}
64+ {% endif %}
6365url = " https: //github.com /googleapis /google-cloud-python /tree /main /packages /{{ api.naming.warehouse_package_name }} "
6466
6567package_root = os.path.abspath(os.path.dirname(__file__))
@@ -68,11 +70,7 @@ readme_filename = os.path.join(package_root, "README.rst")
6870with io.open(readme_filename, encoding=" utf-8 " ) as readme_file:
6971 readme = readme_file.read()
7072
71- packages = [
72- package
73- for package in setuptools.find_namespace_packages()
74- if package.startswith(" {{ api.naming.namespace_packages|first }} " )
75- ]
73+ packages = [package for package in setuptools.find_namespace_packages() if package.startswith(" {{ api.naming.namespace_packages|first }} " )]
7674
7775setuptools.setup(
7876 name=name,
0 commit comments