Skip to content

Commit

Permalink
"Solving issue scorelab#939 on setup.py"
Browse files Browse the repository at this point in the history
  • Loading branch information
AmulyaShetty11 committed Dec 8, 2023
1 parent 772ee4e commit d1026b2
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
Empty file added 10
Empty file.
12 changes: 9 additions & 3 deletions components/core/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,10 @@
import inspect
import platform
from setuptools import setup
from pip.req import parse_requirements
try:
from pip._internal.req import parse_requirements
except ImportError:
from pip.req import parse_requirements

EMAIL_CONF = 'email.conf'
DL_CONF = 'dl.conf'
Expand All @@ -19,8 +22,11 @@ def read(file_name):
requirements_path = os.path.join(base_dir, 'requirements.txt')

install_reqs = parse_requirements(requirements_path, session=False)

requirements = [str(ir.req) for ir in install_reqs]
requirements = list(requirements_path)
try:
requirements = [str(ir.req) for ir in install_reqs]
except:
requirements = [str(ir.requirement) for ir in install_reqs]

### Set configs ###
if platform.system() == 'Linux':
Expand Down

0 comments on commit d1026b2

Please sign in to comment.