Closed hexagonrecursion closed 3 years ago
This might not be fixable with the current API: you have to know the file name in order to resolve relative paths.
Never mind. I figured it out
import requirements
list(requirements.parse(Path('../r-bug.txt').open(encoding='utf8')))
Given a file r-bug.txt with the following contents
and a file foo.txt in the same directory with the following contents
pip successfully installs requests even if the current directory is not the parent directory of r-bug.txt:
but requirements fails to find foo.txt