Skip to content

Commit

Permalink
fix:update_requirements (#19)
Browse files Browse the repository at this point in the history
* fix:update_requirements

* fix:requirements  from file
  • Loading branch information
JarbasAl authored Oct 16, 2024
1 parent 7b86743 commit bda5bd3
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 4 deletions.
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
ovos-utils >= 0.1.0
ovos-bus-client>=0.0.9
ovos-workshop>=0.0.16
ovos-workshop>=0.0.16,<2.0.0
tutubo>=2.0.2
18 changes: 15 additions & 3 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
from os.path import dirname, join

from setuptools import setup
import os

URL = "https://github.com/OpenVoiceOS/skill-ovos-youtube-music"
SKILL_CLAZZ = "YoutubeMusicSkill" # needs to match __init__.py class name
Expand Down Expand Up @@ -55,6 +56,19 @@ def get_version():
return version


def get_requirements(requirements_filename: str):
requirements_file = path.join(path.abspath(path.dirname(__file__)),
requirements_filename)
with open(requirements_file, 'r', encoding='utf-8') as r:
requirements = r.readlines()
requirements = [r.strip() for r in requirements if r.strip()
and not r.strip().startswith("#")]
if 'MYCROFT_LOOSE_REQUIREMENTS' in os.environ:
print('USING LOOSE REQUIREMENTS!')
requirements = [r.replace('==', '>=').replace('~=', '>=') for r in requirements]
return requirements


setup(
name=PYPI_NAME,
version=get_version(),
Expand All @@ -67,9 +81,7 @@ def get_version():
author_email='[email protected]',
license='Apache-2.0',
include_package_data=True,
install_requires=["ovos-plugin-manager>=0.0.1a3",
"tutubo",
"ovos_workshop~=0.0,>=0.0.5"],
install_requires=get_requirements("requirements.txt"),
keywords='ovos skill plugin',
entry_points={'ovos.plugin.skill': PLUGIN_ENTRY_POINT}
)

0 comments on commit bda5bd3

Please sign in to comment.