kizniche / Mycodo

An environmental monitoring and regulation system
http://kylegabriel.com/projects/
GNU General Public License v3.0
3k stars 500 forks source link

Set python jsonschema version to 4.17.3 to avoid 4.18.x rust dependency #1331

Closed running-codebase closed 1 year ago

running-codebase commented 1 year ago

When I installed Mycodo on a 32bit raspberry pi from both the latest release and master I see the following python dependency exception:

Collecting rpds-py>=0.7.1 (from jsonschema->Flask_RESTX==1.1.0->-r /home/pi/Mycodo/install/requirements.txt (line 16))
  Downloading rpds_py-0.9.2.tar.gz (16 kB)
  Installing build dependencies: started
  Installing build dependencies: finished with status 'done'
  Getting requirements to build wheel: started
  Getting requirements to build wheel: finished with status 'done'
  Preparing metadata (pyproject.toml): started
  Preparing metadata (pyproject.toml): finished with status 'error'
  error: subprocess-exited-with-error

  × Preparing metadata (pyproject.toml) did not run successfully.
  │ exit code: 1
  ╰─> [6 lines of output]

      Cargo, the Rust package manager, is not installed or is not on PATH.
      This package requires Rust and Cargo to compile extensions. Install it through
      the system's package manager or via https://rustup.rs/

      Checking for Rust toolchain....
      [end of output]

  note: This error originates from a subprocess, and is likely not a problem with pip.
error: metadata-generation-failed

× Encountered error while generating package metadata.
╰─> See above for output.

note: This is an issue with the package mentioned above, not pip.

rpds-py is a dependency of jsonschema which is a dependency of flask-restx.

In version 4.18.x jsonschema added rust as a build dependency. Others had a similar issue here: https://github.com/python-jsonschema/jsonschema/issues/1143

Also wanted to throw out a thank you for all the work you have put into this project! It has been very interesting to work through your build instructions this last while. Keep it up and let me know if you have any questions.

kizniche commented 1 year ago

Thanks for the work and PR! I'll review shortly.

kizniche commented 1 year ago

Could you possibly add a short comment on the new requirements.txt line explaining why it's there, not to update the version, etc. so it's not accidentally changed?