From 73f8a8be36f273221c8c5a3446d212b6dd08d982 Mon Sep 17 00:00:00 2001 From: JonnyWong16 <9099342+JonnyWong16@users.noreply.github.com> Date: Wed, 21 Dec 2022 12:40:00 -0800 Subject: [PATCH] Fix parsing requirements in setup.py (#1075) --- setup.py | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/setup.py b/setup.py index 341b3d8f1..0e53acd0b 100644 --- a/setup.py +++ b/setup.py @@ -3,6 +3,7 @@ """ Install PlexAPI """ +from pkg_resources import parse_requirements try: from setuptools import setup except ImportError: @@ -14,12 +15,8 @@ readme = open('README.rst', 'r').read() # Get requirements -requirements = [] with open('requirements.txt') as handle: - for line in handle.readlines(): - if not line.startswith('#'): - package = line.strip().split('=', 1)[0] - requirements.append(package) + requirements = [str(req) for req in parse_requirements(handle)] setup( name='PlexAPI',