1
1
mirror of https://github.com/OpenVoiceOS/OpenVoiceOS synced 2025-01-30 18:34:57 +01:00
2023-01-01 19:25:18 +01:00

62 lines
1.9 KiB
Diff

From 0917fee8cef66042341bfdf569167e650ba3fe23 Mon Sep 17 00:00:00 2001
From: j1nx <p.steenbergen@j1nx.nl>
Date: Sun, 1 Jan 2023 14:40:31 +0100
Subject: [PATCH 1/1] Changes to setup
---
setup.py | 19 ++++---------------
1 file changed, 4 insertions(+), 15 deletions(-)
diff --git a/setup.py b/setup.py
index dc17012..cd7ca9d 100644
--- a/setup.py
+++ b/setup.py
@@ -1,22 +1,10 @@
import os
-from distutils.command.install import install
-import pip
from setuptools import setup
BASEDIR = os.path.abspath(os.path.dirname(__file__))
-class CustomInstall(install):
- """Custom handler for the 'install' command."""
-
- def run(self):
- # uninstall lingua_franca
- # the whole purpose of this package is to replace it
- pip.main(["uninstall", "lingua_franca", "-y"])
- super().run()
-
-
def package_files(directory):
paths = []
for (path, directories, filenames) in os.walk(directory):
@@ -27,9 +15,11 @@ def package_files(directory):
def required(requirements_file):
""" Read requirements file and remove comments and empty lines. """
- with open(os.path.join(os.path.dirname(__file__), requirements_file),
- 'r') as f:
+ with open(os.path.join(BASEDIR, requirements_file), 'r') as f:
requirements = f.read().splitlines()
+ if 'MYCROFT_LOOSE_REQUIREMENTS' in os.environ:
+ print('USING LOOSE REQUIREMENTS!')
+ requirements = [r.replace('==', '>=').replace('~=', '>=') for r in requirements]
return [pkg for pkg in requirements
if pkg.strip() and not pkg.startswith("#")]
@@ -68,7 +58,6 @@ setup(
name='ovos-lingua-franca',
version=get_version(),
packages=['lingua_franca', 'lingua_franca.lang', 'lingua_franca.util'],
- cmdclass={'install': CustomInstall},
url='https://github.com/OpenVoiceOS/ovos-lingua-franca',
license='Apache2.0',
package_data={'': extra_files},
--
2.34.1