requirements fix

This commit is contained in:
Zen 2021-05-13 08:56:14 +03:00
parent 67a0028819
commit ed20b91fe5
2 changed files with 14 additions and 2 deletions

View file

@ -5,3 +5,4 @@ tqdm
psutil
scipy
matplotlib
setuptools_rust

View file

@ -1,8 +1,19 @@
#!/usr/bin/env python3
import setuptools
from setuptools_rust import Binding, RustExtension
import sys
try:
from setuptools_rust import Binding, RustExtension
except ImportError:
import subprocess
errno = subprocess.call([sys.executable, "-m", "pip", "install", "setuptools-rust"])
if errno:
print("Please install setuptools-rust package")
raise SystemExit(errno)
else:
from setuptools_rust import Binding, RustExtension
# TODO: rewrite it in rust
REQUIRES = [
"numpy",