Added cache to improve speed

Signed-off-by: Dimitris Zlatanidis <d.zlatanidis@gmail.com>
This commit is contained in:
Dimitris Zlatanidis 2022-05-03 19:01:07 +03:00
parent 8831c8cf7e
commit 62f5e31671

View file

@ -22,6 +22,7 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>.
from functools import lru_cache
from slpkg.utils import Utils
from slpkg.splitting import split_package
from slpkg.__metadata__ import MetaData as _meta_
@ -202,9 +203,10 @@ class Requires:
if line[18:].strip():
return self._req_fix(line)
@lru_cache
def _req_fix(self, line):
"""Fix slacky and salix requirements because many dependencies splitting
with "," and others with "|"
"""Fix slacky and salix requirements because many dependencies
splitting with "," and others with "|"
"""
deps = []
for dep in line[18:].strip().split(","):