File tree Expand file tree Collapse file tree 1 file changed +11
-2
lines changed Expand file tree Collapse file tree 1 file changed +11
-2
lines changed Original file line number Diff line number Diff line change 38
38
import setuptools
39
39
import distutils
40
40
41
- from pkg_resources import parse_requirements
41
+ import setuptools . extern . jaraco . text as text
42
42
43
43
__all__ = ['get_requires_for_build_sdist' ,
44
44
'get_requires_for_build_wheel' ,
49
49
'SetupRequirementsError' ]
50
50
51
51
52
+ def parse_requirements (strs ):
53
+ """
54
+ Yield requirement strings for each specification in `strs`.
55
+
56
+ `strs` must be a string, or a (possibly-nested) iterable thereof.
57
+ """
58
+ return text .join_continuation (map (text .drop_comment , text .yield_lines (strs )))
59
+
60
+
52
61
class SetupRequirementsError (BaseException ):
53
62
def __init__ (self , specifiers ):
54
63
self .specifiers = specifiers
55
64
56
65
57
66
class Distribution (setuptools .dist .Distribution ):
58
67
def fetch_build_eggs (self , specifiers ):
59
- specifier_list = list (map ( str , parse_requirements (specifiers ) ))
68
+ specifier_list = list (parse_requirements (specifiers ))
60
69
61
70
raise SetupRequirementsError (specifier_list )
62
71
You can’t perform that action at this time.
0 commit comments