telldus / tellstick-server-plugins

Plugins for TellStick Server
14 stars 8 forks source link

Require extra libraries? #16

Open atchoo78 opened 1 year ago

atchoo78 commented 1 year ago

Hi,

I’m working on a plugin that requires a library. I placed a "requirements.txt" in the plugin root with the name of the library. If I install it on the local server, it downloads the library and everything works. But if I try to


./tellstick.sh build-plugin plugins/myplugin

I get an error message (with a long error trace log…I just copied the bottom half):


  File "***/site-packages/sdk/plugin.py", line 95, in run
    requirements = self.__downloadRequirements(prebuiltPackages)
  File "***/site-packages/sdk/plugin.py", line 171, in __downloadRequirements
    cmd = DownloadCommand()
  File "***/site-packages/pip/_internal/cli/req_command.py", line 261, in __init__
    super().__init__(*args, **kw)
TypeError: __init__() missing 2 required positional arguments: 'name' and 'summary'
Registered VCS backend: bzr Registered VCS backend: git Registered VCS backend: hg Registered VCS backend: svn running telldus_plugin
Could not build plugin

I know it’s possible to accomplish somehow. The LIFX plugin by @mickeprag also has a requirements.txt, and imports the lifx-sdk python lib just fine. How do I proceed? Give me your l337est commands 😀

atchoo78 commented 1 year ago
install_requires=[’Some_Python_Package’]

in setup.py seemed to work. Although this seems to be the official way:

packages=['My plugin.egg', ’Your_Module.egg', ’Some_other.egg'] 

**requirements.txt:**
Someone else. I’m tired of debugging.