install mycfg stub along with the package
This commit is contained in:
parent
9cd93e5c05
commit
fe0521b6dc
5 changed files with 9 additions and 2 deletions
|
@ -6,7 +6,7 @@ except ImportError:
|
|||
import warnings
|
||||
warnings.warn("mycfg package isn't found! That might result in issues")
|
||||
|
||||
from . import fake_mycfg as mycfg # type: ignore[no-redef]
|
||||
from . import mycfg_stub as mycfg # type: ignore[no-redef]
|
||||
import sys
|
||||
sys.modules['mycfg'] = mycfg
|
||||
del sys
|
||||
|
|
8
setup.py
8
setup.py
|
@ -23,7 +23,13 @@ def main():
|
|||
# package_dir={'': ''},
|
||||
packages=find_packages(),
|
||||
package_data={
|
||||
'my': ['py.typed'],
|
||||
'my': [
|
||||
# for mypy
|
||||
'py.typed',
|
||||
|
||||
# empty dir, necessary for proper dynamic imports
|
||||
'mycfg_stub/repos/.gitkeep',
|
||||
],
|
||||
},
|
||||
|
||||
python_requires='>=3.5', # depends on the modules though..
|
||||
|
|
1
tox.ini
1
tox.ini
|
@ -12,6 +12,7 @@ commands =
|
|||
# TODO ??
|
||||
# python -m pytest {posargs}
|
||||
python3 -c 'import my; print(my.__path__)'
|
||||
python3 -c 'import my; import mycfg.repos' # shouldn't fail at least
|
||||
# TODO run demo.py? just make sure with_my is a bit cleverer?
|
||||
# TODO e.g. under CI, rely on installing
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue