Skip to content

Commit

Permalink
Setup.py (#4)
Browse files Browse the repository at this point in the history
* added setup.py

* fix requirements
  • Loading branch information
builderjer authored Mar 31, 2023
1 parent b7f7f0a commit 95a17a5
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,17 @@ def get_version():
version += f"a{alpha}"
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,
Expand All @@ -67,6 +78,7 @@ def get_version():
package_dir={SKILL_PKG: ""},
package_data={SKILL_PKG: find_resource_files()},
packages=[SKILL_PKG],
install_requires=get_requirements('requirements.txt'),
include_package_data=True,
keywords='ovos skill plugin',
entry_points={'ovos.plugin.skill': PLUGIN_ENTRY_POINT}
Expand Down

0 comments on commit 95a17a5

Please sign in to comment.