File tree Expand file tree Collapse file tree 4 files changed +10
-7
lines changed Expand file tree Collapse file tree 4 files changed +10
-7
lines changed Original file line number Diff line number Diff line change @@ -24,7 +24,7 @@ def find_extra_reqs(options):
24
24
for package in search_packages_info (all_pkgs ):
25
25
log .debug ('installed package: %s (at %s)' , package ['name' ],
26
26
package ['location' ])
27
- for f in package .get ('files' , []) or [] :
27
+ for f in package .get ('files' , []):
28
28
path = os .path .realpath (os .path .join (package ['location' ], f ))
29
29
installed_files [path ] = package ['name' ]
30
30
package_path = common .is_package_file (path )
Original file line number Diff line number Diff line change 1
- pip >= 6.0
2
1
packaging
2
+ pip >= 6.0
Original file line number Diff line number Diff line change 10
10
with open (path .join (here , 'CHANGELOG.rst' ), encoding = 'utf-8' ) as f :
11
11
long_description += f .read ()
12
12
13
+ # This is not usual, but this project needs both install_requires
14
+ # and requirements.txt and we'd like to not duplicate them
15
+ with open (path .join (here , 'requirements.txt' ), encoding = 'utf-8' ) as f :
16
+ requirements = [s .strip () for s in f .readlines ()]
17
+
13
18
from pip_check_reqs import __version__
14
19
15
20
setup (
38
43
'pip-extra-reqs=pip_check_reqs.find_extra_reqs:main' ,
39
44
],
40
45
},
41
- install_requires = [
42
- 'packaging' ,
43
- 'pip' ,
44
- ],
46
+ install_requires = requirements
45
47
)
Original file line number Diff line number Diff line change @@ -69,7 +69,8 @@ def test_find_extra_reqs(monkeypatch):
69
69
pretend .call_recorder (lambda a , session = None : requirements ))
70
70
71
71
class options :
72
- ignore_reqs = lambda x , y : False
72
+ def ignore_reqs (x , y ):
73
+ return False
73
74
options = options ()
74
75
75
76
result = find_extra_reqs .find_extra_reqs (options )
You can’t perform that action at this time.
0 commit comments