Allow building Mycroft with loose requirements
parent
c89a8f63ad
commit
466d39fd40
4
setup.py
4
setup.py
|
@ -13,6 +13,7 @@
|
||||||
# limitations under the License.
|
# limitations under the License.
|
||||||
#
|
#
|
||||||
from setuptools import setup, find_packages
|
from setuptools import setup, find_packages
|
||||||
|
import os
|
||||||
import os.path
|
import os.path
|
||||||
|
|
||||||
BASEDIR = os.path.abspath(os.path.dirname(__file__))
|
BASEDIR = os.path.abspath(os.path.dirname(__file__))
|
||||||
|
@ -44,6 +45,9 @@ def required(requirements_file):
|
||||||
""" Read requirements file and remove comments and empty lines. """
|
""" Read requirements file and remove comments and empty lines. """
|
||||||
with open(os.path.join(BASEDIR, requirements_file), 'r') as f:
|
with open(os.path.join(BASEDIR, requirements_file), 'r') as f:
|
||||||
requirements = f.read().splitlines()
|
requirements = f.read().splitlines()
|
||||||
|
if 'MYCROFT_LOOSE_REQUIREMENTS' in os.environ:
|
||||||
|
print('USING LOOSE REQUIREMENTS!')
|
||||||
|
requirements = [r.replace('==', '>=') for r in requirements]
|
||||||
return [pkg for pkg in requirements
|
return [pkg for pkg in requirements
|
||||||
if pkg.strip() and not pkg.startswith("#")]
|
if pkg.strip() and not pkg.startswith("#")]
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue