From 4ae77312b7f36d75cb19e3f85e612c11b55035a9 Mon Sep 17 00:00:00 2001 From: Vinicius Moreira Date: Thu, 10 Feb 2022 11:23:15 -0300 Subject: [PATCH] [setup] improvement: able to install bauh with python/pip without enforcing requirements --- CHANGELOG.md | 3 +++ setup.py | 7 +++++-- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index a43f0337..7287f455 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -11,6 +11,9 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). - preventing AUR's installed packages from not being mapped in cases the communication with the API fails - code refactoring (String formatting method) +- Setup + - able to install bauh with python/pip without enforcing requirements through the environment variable `BAUH_SETUP_NO_REQS=1` + ### Fixes - Arch - silent crash when handling and displaying transaction sub-status diff --git a/setup.py b/setup.py index 6b6302d4..920927b9 100644 --- a/setup.py +++ b/setup.py @@ -14,8 +14,11 @@ URL = "https://github.com/vinifmor/" + NAME file_dir = os.path.dirname(os.path.abspath(__file__)) -with open(file_dir + '/requirements.txt', 'r') as f: - requirements = [line.strip() for line in f.readlines() if line] +if os.getenv('BAUH_SETUP_NO_REQS'): + requirements = [] +else: + with open(f'{file_dir}/requirements.txt', 'r') as f: + requirements = [line.strip() for line in f.readlines() if line] with open(file_dir + '/{}/__init__.py'.format(NAME), 'r') as f: