Skip to content

Commit

Permalink
Fixes Bears-R-Us#2966: pip install from tar error (Bears-R-Us#2968)
Browse files Browse the repository at this point in the history
This PR fixes Bears-R-Us#2966 where `import arkouda` would be unable to find `akscipy` and result in a `ModuleNotFound` error

Apparently all subfolders must be explicitly listed in the `setup.py`, so our packages line should look something like
```python
packages=['arkouda', 'arkouda.akscipy', 'arkouda.akscipy.special']
```
To avoid having to list these all out individually (and avoid this happening in the future if we forget to modify this line), we can use `find_packages` from `setuptools`

To reproduce the error hokiegeek2 encountered, I created a clean conda environment, made a tar of my arkouda directory (up to date with upstream/master), ran `pip install arkouda.tar`, and attempted to import arkouda. I verified that after modifying the `setup.py`, I was able import arkouda and verified the functionality was accesible by calling `ak.akscipy.special.xlogy`

To avoid this issue in the future we can just

Co-authored-by: Pierce Hayes <pierce314159@users.noreply.github.com>
  • Loading branch information
stress-tess and Pierce Hayes authored Feb 13, 2024
1 parent 23b69cc commit e5c2717
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from setuptools import setup
from setuptools import setup, find_packages
from os import path
import versioneer

@@ -115,7 +115,7 @@
#
# py_modules=["my_module"],
#
packages=["arkouda"], # Required
packages=find_packages(), # Required

# Specify which Python versions you support. In contrast to the
# 'Programming Language' classifiers above, 'pip install' will check this

0 comments on commit e5c2717

Please sign in to comment.