Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 2 additions & 3 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
from importlib.util import module_from_spec, spec_from_file_location
from pathlib import Path

from pkg_resources import parse_requirements
from setuptools import find_packages, setup

_PATH_ROOT = os.path.dirname(__file__)
Expand All @@ -20,8 +19,8 @@ def _load_py_module(fname, pkg="litai"):


def _load_requirements(path_dir: str = _PATH_ROOT, file_name: str = "requirements.txt") -> list:
reqs = parse_requirements(open(os.path.join(path_dir, file_name)).readlines())
return list(map(str, reqs))
with open(os.path.join(path_dir, file_name)) as f:
return [line.split("#")[0].strip() for line in f if line.strip() and not line.startswith("#")]


about = _load_py_module("__about__.py")
Expand Down