Prepare Namespace package (#1543)
* Update __init__.py * Update setup.py
This commit is contained in:
parent
bd168819f2
commit
8035c10f37
|
@ -60,4 +60,13 @@ else:
|
|||
'Callback',
|
||||
'data_loader'
|
||||
]
|
||||
|
||||
# necessary for regular bolts imports. Skip exception since bolts is not always installed
|
||||
try:
|
||||
from pytorch_lightning import bolts
|
||||
except ImportError:
|
||||
pass
|
||||
# __call__ = __all__
|
||||
|
||||
# for compatibility with namespace packages
|
||||
__import__('pkg_resources').declare_namespace(__name__)
|
||||
|
|
4
setup.py
4
setup.py
|
@ -3,7 +3,7 @@
|
|||
import os
|
||||
from io import open
|
||||
# Always prefer setuptools over distutils
|
||||
from setuptools import setup, find_packages
|
||||
from setuptools import setup, find_namespace_packages
|
||||
|
||||
try:
|
||||
import builtins
|
||||
|
@ -57,7 +57,7 @@ setup(
|
|||
url=pytorch_lightning.__homepage__,
|
||||
download_url='https://github.com/PyTorchLightning/pytorch-lightning',
|
||||
license=pytorch_lightning.__license__,
|
||||
packages=find_packages(exclude=['tests', 'tests/*', 'benchmarks']),
|
||||
packages=find_namespace_packages(exclude=['tests', 'tests/*', 'benchmarks']),
|
||||
|
||||
long_description=load_long_describtion(),
|
||||
long_description_content_type='text/markdown',
|
||||
|
|
Loading…
Reference in New Issue