Skip to content

Commit

Permalink
Update setup.py to correctly pick up Python files
Browse files Browse the repository at this point in the history
And also re-update package name in utils/build-dists.py so that it is
uninstalled successfully

Signed-off-by: Rushi Agrawal <[email protected]>
  • Loading branch information
rushiagr authored and VijayanB committed Sep 20, 2021
1 parent 4e7cd3a commit e4d0cc6
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
3 changes: 2 additions & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,10 +41,11 @@
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 = [
Expand Down
9 changes: 8 additions & 1 deletion utils/build-dists.py
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down

0 comments on commit e4d0cc6

Please sign in to comment.