Skip to content

Commit

Permalink
Update setup.py according to dependences upgrades (#215)
Browse files Browse the repository at this point in the history
* Update setup.py

`setuptools` updated  module `setuptools.Distribution` in PEP 517 backend patch to be `distutils.core.Distribution`, and the original is deprecated.
Modify `setup.py` usage accordingly.

* Pin amazonlinux unittest image to 2 instead of latest 2023

* Add torch version requirement
  • Loading branch information
weiliw-amz authored May 5, 2023
1 parent 03dc11b commit fed8502
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/pytest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ jobs:
python-version: ["3.7", "3.8", "3.9", "3.10"]

runs-on: ubuntu-latest
container: amazonlinux:latest
container: amazonlinux:2

steps:
- uses: actions/checkout@v1
Expand Down
4 changes: 2 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -115,14 +115,14 @@ def get_blas_lib_dir(cls):
install_requires = numpy_requires + [
'scipy>=1.4.1',
'scikit-learn>=0.24.1',
'torch>=1.8.0',
'torch>=1.8.0,<2.0.0',
'sentencepiece>=0.1.86,!=0.1.92', # 0.1.92 results in error for transformers
'transformers>=4.1.1; python_version<"3.9"',
'transformers>=4.4.2; python_version>="3.9"'
]

# Fetch Numpy before building Numpy-dependent extension, if Numpy required version was not installed
setuptools.dist.Distribution().fetch_build_eggs(numpy_requires)
setuptools.distutils.core.Distribution().fetch_build_eggs(numpy_requires)
blas_lib, blas_dir = BlasHelper.get_blas_lib_dir()

# Get extra manual compile args if any
Expand Down

0 comments on commit fed8502

Please sign in to comment.