|
| 1 | +# coding=utf-8 |
| 2 | + |
| 3 | +######################################################################################################################## |
| 4 | +### Do not forget to adjust the following variables to your own plugin. |
| 5 | + |
| 6 | +# The plugin's identifier, has to be unique |
| 7 | +plugin_identifier = "filamentreload" |
| 8 | + |
| 9 | +# The plugin's python package, should be "octoprint_<plugin identifier>", has to be unique |
| 10 | +plugin_package = "octoprint_filamentreload" |
| 11 | + |
| 12 | +# The plugin's human readable name. Can be overwritten within OctoPrint's internal data via __plugin_name__ in the |
| 13 | +# plugin module |
| 14 | +plugin_name = "Octoprint-FilamentReload" |
| 15 | + |
| 16 | +# The plugin's version. Can be overwritten within OctoPrint's internal data via __plugin_version__ in the plugin module |
| 17 | +plugin_version = "1.0.0" |
| 18 | + |
| 19 | +# The plugin's description. Can be overwritten within OctoPrint's internal data via __plugin_description__ in the plugin |
| 20 | +# module |
| 21 | +plugin_description = """A revamped and rewritten filament monitor that pauses the print when your filament runs out""" |
| 22 | + |
| 23 | +# The plugin's author. Can be overwritten within OctoPrint's internal data via __plugin_author__ in the plugin module |
| 24 | +plugin_author = "Connor Huffine" |
| 25 | + |
| 26 | +# The plugin's author's mail address. |
| 27 | +plugin_author_email = "[email protected]" |
| 28 | + |
| 29 | +# The plugin's homepage URL. Can be overwritten within OctoPrint's internal data via __plugin_url__ in the plugin module |
| 30 | +plugin_url = "https://github.com/kontakt/Octoprint-Filament-Reloaded" |
| 31 | + |
| 32 | +# The plugin's license. Can be overwritten within OctoPrint's internal data via __plugin_license__ in the plugin module |
| 33 | +plugin_license = "AGPLv3" |
| 34 | + |
| 35 | +# Any additional requirements besides OctoPrint should be listed here |
| 36 | +plugin_requires = [] |
| 37 | + |
| 38 | +### -------------------------------------------------------------------------------------------------------------------- |
| 39 | +### More advanced options that you usually shouldn't have to touch follow after this point |
| 40 | +### -------------------------------------------------------------------------------------------------------------------- |
| 41 | + |
| 42 | +# Additional package data to install for this plugin. The subfolders "templates", "static" and "translations" will |
| 43 | +# already be installed automatically if they exist. |
| 44 | +plugin_additional_data = [] |
| 45 | + |
| 46 | +# Any additional python packages you need to install with your plugin that are not contains in <plugin_package>.* |
| 47 | +plugin_addtional_packages = [] |
| 48 | + |
| 49 | +# Any python packages within <plugin_package>.* you do NOT want to install with your plugin |
| 50 | +plugin_ignored_packages = [] |
| 51 | + |
| 52 | +# Additional parameters for the call to setuptools.setup. If your plugin wants to register additional entry points, |
| 53 | +# define dependency links or other things like that, this is the place to go. Will be merged recursively with the |
| 54 | +# default setup parameters as provided by octoprint_setuptools.create_plugin_setup_parameters using |
| 55 | +# octoprint.util.dict_merge. |
| 56 | +# |
| 57 | +# Example: |
| 58 | +# plugin_requires = ["someDependency==dev"] |
| 59 | +# additional_setup_parameters = {"dependency_links": ["https://github.com/someUser/someRepo/archive/master.zip#egg=someDependency-dev"]} |
| 60 | +additional_setup_parameters = {} |
| 61 | + |
| 62 | +######################################################################################################################## |
| 63 | + |
| 64 | +from setuptools import setup |
| 65 | + |
| 66 | +try: |
| 67 | + import octoprint_setuptools |
| 68 | +except: |
| 69 | + print("Could not import OctoPrint's setuptools, are you sure you are running that under " |
| 70 | + "the same python installation that OctoPrint is installed under?") |
| 71 | + import sys |
| 72 | + sys.exit(-1) |
| 73 | + |
| 74 | +setup_parameters = octoprint_setuptools.create_plugin_setup_parameters( |
| 75 | + identifier=plugin_identifier, |
| 76 | + package=plugin_package, |
| 77 | + name=plugin_name, |
| 78 | + version=plugin_version, |
| 79 | + description=plugin_description, |
| 80 | + author=plugin_author, |
| 81 | + mail=plugin_author_email, |
| 82 | + url=plugin_url, |
| 83 | + license=plugin_license, |
| 84 | + requires=plugin_requires, |
| 85 | + additional_packages=plugin_addtional_packages, |
| 86 | + ignored_packages=plugin_ignored_packages, |
| 87 | + additional_data=plugin_additional_data |
| 88 | +) |
| 89 | + |
| 90 | +if len(additional_setup_parameters): |
| 91 | + from octoprint.util import dict_merge |
| 92 | + setup_parameters = dict_merge(setup_parameters, additional_setup_parameters) |
| 93 | + |
| 94 | +setup(**setup_parameters) |
0 commit comments