Skip to content
This repository has been archived by the owner on Jan 17, 2023. It is now read-only.

Stop using pip parse_requirements #94

Merged
Merged
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
7 changes: 2 additions & 5 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,6 @@

from setuptools import setup, find_packages
from setuptools.command.test import test as TestCommand
from pip.req import parse_requirements

from nordicsemi import version

Expand Down Expand Up @@ -77,10 +76,8 @@
build_dir = os.environ.get("NRFUTIL_BUILD_DIR", "./{}".format(version.NRFUTIL_VERSION))
description = """A Python package that includes the nrfutil utility and the nordicsemi library"""

# parse_requirements() returns generator of pip.req.InstallRequirement objects
install_reqs = parse_requirements("requirements.txt", session=False)
# reqs is a list of requirements as strings
reqs = [str(ir.req) for ir in install_reqs]
with open("requirements.txt") as reqs_file:
reqs = reqs_file.readlines()

class NoseTestCommand(TestCommand):
def finalize_options(self):
Expand Down