Skip to content

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

Merged
kizniche merged 2 commits intokizniche:masterfrom
running-codebase:fix/flask-restx-python-dependency-issue
Aug 21, 2023
Merged

Set python jsonschema version to 4.17.3 to avoid 4.18.x rust dependency#1331
kizniche merged 2 commits intokizniche:masterfrom
running-codebase:fix/flask-restx-python-dependency-issue

Conversation

@running-codebase
Copy link
Copy Markdown
Contributor

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:
python-jsonschema/jsonschema#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
Copy link
Copy Markdown
Owner

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

@kizniche
Copy link
Copy Markdown
Owner

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?

@kizniche kizniche merged commit afbfa17 into kizniche:master Aug 21, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants