mirror of
https://github.com/home-assistant/core.git
synced 2026-09-10 10:06:19 -05:00
Move install_requires to setup.cfg (#65095)
This commit is contained in:
committed by
Paulus Schoutsen
parent
8e38b7624e
commit
4eb787b619
@@ -1,5 +1,6 @@
|
||||
#!/usr/bin/env python3
|
||||
"""Generate an updated requirements_all.txt."""
|
||||
import configparser
|
||||
import difflib
|
||||
import importlib
|
||||
import os
|
||||
@@ -167,10 +168,9 @@ def explore_module(package, explore_children):
|
||||
|
||||
def core_requirements():
|
||||
"""Gather core requirements out of setup.py."""
|
||||
reqs_raw = re.search(
|
||||
r"REQUIRES = \[(.*?)\]", Path("setup.py").read_text(), re.S
|
||||
).group(1)
|
||||
return [x[1] for x in re.findall(r"(['\"])(.*?)\1", reqs_raw)]
|
||||
parser = configparser.ConfigParser()
|
||||
parser.read("setup.cfg")
|
||||
return parser["options"]["install_requires"].strip().split("\n")
|
||||
|
||||
|
||||
def gather_recursive_requirements(domain, seen=None):
|
||||
|
||||
Reference in New Issue
Block a user