Skip to content

Commit

Permalink
feat: Introduce compatibility with native namespace packages (#1852)
Browse files Browse the repository at this point in the history
  • Loading branch information
parthea authored Nov 8, 2023
1 parent 8ede788 commit ef2094a
Show file tree
Hide file tree
Showing 6 changed files with 6 additions and 12 deletions.
3 changes: 1 addition & 2 deletions gapic/templates/setup.py.j2
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ with io.open(readme_filename, encoding="utf-8") as readme_file:

packages = [
package
for package in setuptools.PEP420PackageFinder.find()
for package in setuptools.find_namespace_packages()
if package.startswith("{{ api.naming.namespace_packages|first }}")
]

Expand Down Expand Up @@ -83,7 +83,6 @@ setuptools.setup(
platforms="Posix; MacOS X; Windows",
packages=packages,
python_requires=">=3.7",
namespace_packages=namespaces,
install_requires=dependencies,
include_package_data=True,
zip_safe=False,
Expand Down
3 changes: 1 addition & 2 deletions tests/integration/goldens/asset/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@

packages = [
package
for package in setuptools.PEP420PackageFinder.find()
for package in setuptools.find_namespace_packages()
if package.startswith("google")
]

Expand Down Expand Up @@ -86,7 +86,6 @@
platforms="Posix; MacOS X; Windows",
packages=packages,
python_requires=">=3.7",
namespace_packages=namespaces,
install_requires=dependencies,
include_package_data=True,
zip_safe=False,
Expand Down
3 changes: 1 addition & 2 deletions tests/integration/goldens/credentials/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@

packages = [
package
for package in setuptools.PEP420PackageFinder.find()
for package in setuptools.find_namespace_packages()
if package.startswith("google")
]

Expand Down Expand Up @@ -83,7 +83,6 @@
platforms="Posix; MacOS X; Windows",
packages=packages,
python_requires=">=3.7",
namespace_packages=namespaces,
install_requires=dependencies,
include_package_data=True,
zip_safe=False,
Expand Down
3 changes: 1 addition & 2 deletions tests/integration/goldens/eventarc/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@

packages = [
package
for package in setuptools.PEP420PackageFinder.find()
for package in setuptools.find_namespace_packages()
if package.startswith("google")
]

Expand Down Expand Up @@ -84,7 +84,6 @@
platforms="Posix; MacOS X; Windows",
packages=packages,
python_requires=">=3.7",
namespace_packages=namespaces,
install_requires=dependencies,
include_package_data=True,
zip_safe=False,
Expand Down
3 changes: 1 addition & 2 deletions tests/integration/goldens/logging/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@

packages = [
package
for package in setuptools.PEP420PackageFinder.find()
for package in setuptools.find_namespace_packages()
if package.startswith("google")
]

Expand Down Expand Up @@ -83,7 +83,6 @@
platforms="Posix; MacOS X; Windows",
packages=packages,
python_requires=">=3.7",
namespace_packages=namespaces,
install_requires=dependencies,
include_package_data=True,
zip_safe=False,
Expand Down
3 changes: 1 addition & 2 deletions tests/integration/goldens/redis/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@

packages = [
package
for package in setuptools.PEP420PackageFinder.find()
for package in setuptools.find_namespace_packages()
if package.startswith("google")
]

Expand Down Expand Up @@ -83,7 +83,6 @@
platforms="Posix; MacOS X; Windows",
packages=packages,
python_requires=">=3.7",
namespace_packages=namespaces,
install_requires=dependencies,
include_package_data=True,
zip_safe=False,
Expand Down

0 comments on commit ef2094a

Please sign in to comment.