Skip to content

Commit

Permalink
fix setup.py to include the non-Python files in installation
Browse files Browse the repository at this point in the history
  • Loading branch information
chengrunyang committed Oct 8, 2021
1 parent 1654485 commit 76d3224
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 2 deletions.
13 changes: 11 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,15 @@ The easiest way is to install using pip:
pip install oboe
```

Alternatively, if you want to customize the source code, you may install in the editable mode by first `git clone` this respository, and then do

```
pip install -e .
```

in the cloned directory.


#### Dependencies with verified versions
The Oboe systems work on Python 3.7 or later. The following libraries are required. The listed versions are the versions that are verified to work. Older versions may work but are not guaranteed.

Expand All @@ -37,10 +46,10 @@ The Oboe systems work on Python 3.7 or later. The following libraries are requir
For more detailed examples, please refer to the Jupyter notebooks in the `example` folder. A basic classification example:

```python
method = 'Oboe' # 'Oboe' or 'TensorOboe'
method = 'Oboe' # 'Oboe' or 'TensorOboe'
problem_type = 'classification'

from oboe import AutoLearner, error
from oboe import AutoLearner, error # This may take around 15 seconds at first run.

import numpy as np
from sklearn.datasets import load_iris
Expand Down
13 changes: 13 additions & 0 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,18 @@
with open("README.md", "r", encoding="utf-8") as fh:
long_description = fh.read()

def package_files(directory):
"""
Recursively find all files in a (sub)directory.
Source: https://stackoverflow.com/a/36693250
"""
paths = []
for (path, directories, filenames) in os.walk(directory):
for filename in filenames:
paths.append(os.path.join('..', path, filename))
return paths


install_requires = [
"numpy>=1.16.4",
"scipy>=1.4.1",
Expand Down Expand Up @@ -33,6 +45,7 @@
"Operating System :: OS Independent",
],
packages=setuptools.find_packages(),
package_data={'': package_files('oboe/defaults')},
install_requires=install_requires,
python_requires=">=3.7",
)

0 comments on commit 76d3224

Please sign in to comment.