Skip to content

Commit

Permalink
switching numpy version by python version (#50)
Browse files Browse the repository at this point in the history
* switching numpy version by python version

* Require numpy<=1.19.5 for python<=3.6

Co-authored-by: Matúš Žilinec <zilinec.m@gmail.com>
  • Loading branch information
Gldkslfmsd and mzilinec authored Mar 8, 2021
1 parent 874ae4a commit ccdccb7
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion setup.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,15 @@
from setuptools import setup, find_packages
import sys

with open("README.md", "r", encoding="utf-8") as fh:
long_description = fh.read()

if sys.version_info[:2] >= (3,7):
numpy_version = "numpy"
else:
# Later numpy versions are incompatible with Python <= 3.6
numpy_version = "numpy<=1.19.5"

setup(
name='SLTev',
version='1.1.5',
Expand All @@ -13,7 +20,7 @@
packages=['SLTev',],
data_files = [ ('SLTev', ['SLTev/mwerSegmenter']) ],
include_package_data=True,
install_requires=['numpy==1.19.5', 'gitpython', 'sacremoses', 'sacrebleu', 'gitdir', 'jiwer', 'filelock'],
install_requires=[numpy_version, 'gitpython', 'sacremoses', 'sacrebleu', 'gitdir', 'jiwer', 'filelock'],
url="https://github.com/ELITR/SLTev.git",
classifiers=[
"Programming Language :: Python :: 3.6",
Expand Down

0 comments on commit ccdccb7

Please sign in to comment.