Consider support pyproject.toml #2292#2503
Merged
ryanmelt merged 1 commit intoOpenC3:mainfrom Nov 5, 2025
Merged
Conversation
8aaeb78 to
72e7162
Compare
72e7162 to
a660b1f
Compare
markjmiller
commented
Nov 3, 2025
| gemspec_filename = Dir['*.gemspec'][0] | ||
| gemspec = File.read(gemspec_filename) | ||
| gemspec.gsub!('plugin.txt', 'plugin.txt requirements.txt') | ||
| gemspec.gsub!(/s\.files = Dir\.glob.*\n/) do |match| |
Contributor
Author
There was a problem hiding this comment.
Weird formatting but needed to get the indentation in the generated file right.
ryanmelt
approved these changes
Nov 5, 2025
Member
|
Nice change. I think the plugin.txt replacement will be a little messy if you generate two or more targets, but the existing code has a similar issue. Will just require some manual fixing by the plugin author. |
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #2503 +/- ##
==========================================
- Coverage 79.63% 79.63% -0.01%
==========================================
Files 658 658
Lines 50420 50427 +7
Branches 736 736
==========================================
+ Hits 40154 40159 +5
- Misses 10186 10188 +2
Partials 80 80
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Allows
pyproject.tomlto be used for installing a Python package and its dependencies. Currently, onlyrequirements.txtis supported. Note that this change does not modify the generator to produce apyproject.tomlinstead ofrequirements.txt. Rather, it enables users to create their ownpyproject.tomlwhich the system will prefer during plugin installation. Defaulting to generatingpyproject.tomlshould be considered in the future, though.Plugin Generator
When a target is generated with
openc3.sh cli generate target FOO --python, the generated gemspec file will now include:Instead of just:
The means a
pyproject.tomlfile, if it exists, will be preferred for installing requirements. Otherwise, default to the current behavior of usingrequirements.txt.Plugin install
If a
pyproject.tomlfile exists, set thepip_argsto use it. If it doesn't exist, default to the current behavior of usingrequirements.txt.Validation
requirements.txtand made apyproject.tomlfile.requirements.txtand confirmed logs mentioned that in logs instead ofpyproject.toml