diff --git a/Makefile b/Makefile index b4013d6879bc5b6a8987c0b83de6b6d4f25aa1b6..548c6c7487234bc674a09d514a2d2ac83d629a8c 100644 --- a/Makefile +++ b/Makefile @@ -15,4 +15,7 @@ wheel3: schema clean: cp pi_mqtt_gpio/__init__.py.die pi_mqtt_gpio/__init__.py rm -rf .cache .eggs build *.egg-info - find pi_mqtt_gpio -type d -name __pycache__ -exec rm -rf {} \; + find pi_mqtt_gpio -type d -name __pycache__ -prune -exec rm -rf {} \; + +upload: packages + twine upload dist/* diff --git a/pi_mqtt_gpio/__init__.py b/pi_mqtt_gpio/__init__.py index f3d999a73501eb3440da5c45419d937deb7ba5a0..329e6d8a80b662d6db51283325db2c2e52285604 100644 --- a/pi_mqtt_gpio/__init__.py +++ b/pi_mqtt_gpio/__init__.py @@ -1,163 +1,4 @@ -import yaml - -CONFIG_SCHEMA = yaml.load(""" -mqtt: - type: dict - required: yes - schema: - host: - type: string - empty: no - required: no - default: localhost - port: - type: integer - min: 1 - max: 65535 - required: no - default: 1883 - user: - type: string - required: no - default: "" - password: - type: string - required: no - default: "" - client_id: - type: string - required: no - default: "" - topic_prefix: - type: string - required: no - default: "" - coerce: rstrip_slash - protocol: - type: string - required: no - empty: no - coerce: tostring - default: "3.1.1" - allowed: - - "3.1" - - "3.1.1" - status_topic: - type: string - required: no - default: status - status_payload_running: - type: string - required: no - default: running - status_payload_stopped: - type: string - required: no - default: stopped - status_payload_dead: - type: string - required: no - default: dead - -gpio_modules: - type: list - required: yes - schema: - type: dict - allow_unknown: yes - schema: - name: - type: string - required: yes - empty: no - module: - type: string - required: yes - empty: no - cleanup: - type: boolean - required: no - default: yes - -digital_inputs: - type: list - required: no - default: [] - schema: - type: dict - schema: - name: - type: string - required: yes - empty: no - module: - type: string - required: yes - empty: no - pin: - type: integer - required: yes - min: 0 - on_payload: - type: string - required: yes - empty: no - off_payload: - type: string - required: yes - empty: no - pullup: - type: boolean - required: no - default: no - pulldown: - type: boolean - required: no - default: no - retain: - type: boolean - required: no - default: no - -digital_outputs: - type: list - required: no - default: [] - schema: - type: dict - schema: - name: - type: string - required: yes - module: - type: string - required: yes - pin: - type: integer - required: yes - min: 0 - on_payload: - type: string - required: no - empty: no - off_payload: - type: string - required: no - empty: no - inverted: - type: boolean - required: no - default: no - initial: - type: string - required: no - allowed: - - high - - low - retain: - type: boolean - required: no - default: no - - -""") +import sys +print("FATAL ERROR: The file at pi_mqtt_gpio/__init__.py should be replaced us" + "ing 'make schema' before packaging.") +sys.exit(1)