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

fix: use native namespace to avoid pkg_resources warnings #1176

Merged
merged 12 commits into from
Nov 9, 2023
2 changes: 2 additions & 0 deletions .coveragerc
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
[run]
branch = True
omit =
.nox/*
google/__init__.py
google/cloud/__init__.py

Expand All @@ -32,6 +33,7 @@ exclude_lines =
# Ignore abstract methods
raise NotImplementedError
omit =
.nox/*
*/gapic/*.py
*/proto/*.py
*/core/*.py
Expand Down
22 changes: 0 additions & 22 deletions google/__init__.py

This file was deleted.

22 changes: 0 additions & 22 deletions google/cloud/__init__.py

This file was deleted.

6 changes: 6 additions & 0 deletions owlbot.py
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,12 @@
export DUAL_REGION_LOC_1
export DUAL_REGION_LOC_2""")

s.replace(
".coveragerc",
"omit =",
"""omit =
.nox/*""")

python.py_samples(skip_readmes=True)

s.shell.run(["nox", "-s", "blacken"], hide_output=False)
10 changes: 3 additions & 7 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,14 +54,11 @@
# Only include packages under the 'google' namespace. Do not include tests,
# benchmarks, etc.
packages = [
package for package in setuptools.find_packages() if package.startswith("google")
package
for package in setuptools.find_namespace_packages()
if package.startswith("google")
]

# Determine which namespaces are needed.
namespaces = ["google"]
if "google.cloud" in packages:
namespaces.append("google.cloud")


setuptools.setup(
name=name,
Expand All @@ -88,7 +85,6 @@
],
platforms="Posix; MacOS X; Windows",
packages=packages,
namespace_packages=namespaces,
install_requires=dependencies,
extras_require=extras,
python_requires=">=3.7",
Expand Down