Skip to content
Snippets Groups Projects
Commit 358baf10 authored by mehtank's avatar mehtank
Browse files

Working better

parent 56aa36ad
No related merge requests found
......@@ -28,27 +28,24 @@ def get_version_and_cmdclass():
spec.loader.exec_module(module)
return module.__version__, module.get_cmdclass(pkg_path)
def mkentries(path):
def mkentries(name, path):
key = f"rocolib.{path}"
pyComponents = [ os.path.basename(f)[:-3] for f in glob(f"{pkg_path}/{path}/[!_]*.py")]
eps = []
for c in pyComponents:
eps.append(f"{c} = {path}.{c}.{c}")
return {key: eps, key+".dirs": f"dir = {path}:__init__"}
eps.append(f"{c} = {pkg_path}.{path}.{c}")
return {key: eps}
plugin_name = get_metadata("plugin_name")
version, cmdclass = get_version_and_cmdclass()
with open('requirements.txt') as f:
requirements = f.read().splitlines()
entry_points = {}
entry_points = {"rocolib.libdir": f"{plugin_name} = {pkg_path}.library"}
for path in "library components composables ports".split():
entry_points.update(mkentries(path))
entry_points.update(mkentries(plugin_name, path))
setup(
name='roco_' + plugin_name ,
name='roco' + plugin_name,
version=version,
cmdclass=cmdclass,
description=get_metadata("description"),
......@@ -56,7 +53,7 @@ setup(
author=get_metadata("author"),
license='LGPLv3',
packages=find_packages(),
package_data={'plugin.library': ['*.yaml']},
package_data={f'{pkg_path}.library': ['*.yaml']},
install_requires=requirements,
classifiers=[
'Development Status :: 4 - Beta',
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment