setup.py: use native implicit namespace package (#78773)
gitea/godo.js/pipeline/head This commit looks good
Details
gitea/godo.js/pipeline/head This commit looks good
Details
As specified on https://packaging.python.org/en/latest/guides/packaging-namespace-packages/
This commit is contained in:
parent
8c09ab833a
commit
2545b9ede1
8
setup.py
8
setup.py
|
@ -7,7 +7,7 @@ import subprocess
|
||||||
from distutils.cmd import Command
|
from distutils.cmd import Command
|
||||||
from distutils.command.build import build as _build
|
from distutils.command.build import build as _build
|
||||||
from distutils.command.sdist import sdist as _sdist
|
from distutils.command.sdist import sdist as _sdist
|
||||||
from setuptools import setup, find_packages
|
from setuptools import setup, find_namespace_packages
|
||||||
from xstatic.pkg import godo as xs
|
from xstatic.pkg import godo as xs
|
||||||
|
|
||||||
|
|
||||||
|
@ -89,11 +89,7 @@ setup(
|
||||||
license=xs.LICENSE,
|
license=xs.LICENSE,
|
||||||
url=xs.HOMEPAGE,
|
url=xs.HOMEPAGE,
|
||||||
platforms=xs.PLATFORMS,
|
platforms=xs.PLATFORMS,
|
||||||
packages=find_packages(),
|
packages=find_namespace_packages(include=['xstatic.*', 'xstatic.pkg.*']),
|
||||||
namespace_packages=[
|
|
||||||
'xstatic',
|
|
||||||
'xstatic.pkg',
|
|
||||||
],
|
|
||||||
include_package_data=True,
|
include_package_data=True,
|
||||||
package_data={
|
package_data={
|
||||||
'xstatic.pkg.godo': ['data/*'],
|
'xstatic.pkg.godo': ['data/*'],
|
||||||
|
|
|
@ -1 +0,0 @@
|
||||||
__import__('pkg_resources').declare_namespace(__name__)
|
|
|
@ -1 +0,0 @@
|
||||||
__import__('pkg_resources').declare_namespace(__name__)
|
|
Loading…
Reference in New Issue