diff --git a/setup.py b/setup.py index 74c3d032..e432cf94 100644 --- a/setup.py +++ b/setup.py @@ -41,10 +41,11 @@ with open(join(base_dir, package_name.replace("-", ""), "_version.py")) as f: with open(join(base_dir, "README.md")) as f: long_description = f.read().strip() +module_dir = package_name.replace("-", "") packages = [ package for package in find_packages(where=".", exclude=("test_opensearchpy*",)) - if package == package_name or package.startswith(package_name + ".") + if package == module_dir or package.startswith(module_dir + ".") ] install_requires = [ diff --git a/utils/build-dists.py b/utils/build-dists.py index dab8bd2b..11ede687 100644 --- a/utils/build-dists.py +++ b/utils/build-dists.py @@ -161,7 +161,14 @@ def test_dist(dist): ) # Uninstall the dist, see that we can't import things anymore - run(venv_python, "-m", "pip", "uninstall", "--yes", dist_name) + run( + venv_python, + "-m", + "pip", + "uninstall", + "--yes", + dist_name.replace("opensearchpy", "opensearch-py"), + ) run( venv_python, "-c",