Skip to content

Commit 3773feb

Browse files
tempozcopybara-github
authored andcommitted
Fix deprecated use of namespace_packages in python/dist/setup.py (#18235)
Uses implicit namespaces instead of explicit, as per https://peps.python.org/pep-0420/ Fixes a warning otherwise output during build. Closes #18235 COPYBARA_INTEGRATE_REVIEW=#18235 from tempoz:tempoz-fix-deprecated-use-of-namespace-packages 85067b6 PiperOrigin-RevId: 700426731
1 parent 9dc5aaa commit 3773feb

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

python/dist/setup.py

+2-3
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
import os
1313
import sys
1414

15-
from setuptools import setup, Extension, find_packages
15+
from setuptools import setup, Extension, find_namespace_packages
1616

1717

1818
def GetVersion():
@@ -59,8 +59,7 @@ def GetVersion():
5959
'Programming Language :: Python :: 3.12',
6060
'Programming Language :: Python :: 3.13',
6161
],
62-
namespace_packages=['google'],
63-
packages=find_packages(),
62+
packages=find_namespace_packages(include=['google*']),
6463
install_requires=[],
6564
ext_modules=[
6665
Extension(

0 commit comments

Comments
 (0)