🐛 Fix installing by calling find_namespace_packages in setup.py

Turns out just removing __init__.py is not enough for native namespace
packages. We also need to (explicitly) call setuptools.find_namespace_packages()
for setup.py to find the package...

https://packaging.python.org/en/latest/guides/packaging-namespace-packages/#native-namespace-packages

Fixes gh-77.
pull/81/head
Mike Gerber 2 years ago
parent c4ab7c9a7c
commit f668963a2e

@ -1,5 +1,5 @@
from io import open from io import open
from setuptools import find_packages, setup from setuptools import find_namespace_packages, find_packages, setup
with open("requirements.txt") as fp: with open("requirements.txt") as fp:
install_requires = fp.read() install_requires = fp.read()
@ -16,7 +16,8 @@ setup(
long_description_content_type="text/markdown", long_description_content_type="text/markdown",
keywords="qurator ocr", keywords="qurator ocr",
license="Apache", license="Apache",
packages=find_packages(exclude=["*.tests", "*.tests.*", "tests.*", "tests"]), packages=find_namespace_packages(include=["qurator.*"])
+ find_packages(exclude=["*.tests", "*.tests.*", "tests.*", "tests"]),
install_requires=install_requires, install_requires=install_requires,
tests_require=tests_require, tests_require=tests_require,
package_data={ package_data={

Loading…
Cancel
Save