Skip to content
Snippets Groups Projects
Commit 25ed85d7 authored by mehtank's avatar mehtank
Browse files

Simplify for library-only plugin

parent 358baf10
No related merge requests found
......@@ -28,21 +28,10 @@ def get_version_and_cmdclass():
spec.loader.exec_module(module)
return module.__version__, module.get_cmdclass(pkg_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} = {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 = {"rocolib.libdir": f"{plugin_name} = {pkg_path}.library"}
for path in "library components composables ports".split():
entry_points.update(mkentries(plugin_name, path))
setup(
name='roco' + plugin_name,
......@@ -64,5 +53,5 @@ setup(
'License :: OSI Approved :: GNU Lesser General Public License v3 (LGPLv3)',
'Programming Language :: Python :: 3',
],
entry_points=entry_points,
entry_points= {"rocolib.libraries": f"{plugin_name} = {pkg_path}.library"},
)
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