Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add python env executables, pre-commit, and pyyaml #270

Merged
merged 2 commits into from
Nov 18, 2024
Merged

Add python env executables, pre-commit, and pyyaml #270

merged 2 commits into from
Nov 18, 2024

Conversation

dhower-qc
Copy link
Collaborator

No description provided.

Copy link
Collaborator

@AFOliveira AFOliveira left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I did a dummy python script on the rakefile

desc "Run Python with YAML import"
task :run_python do
  puts "Executing Python code..."
  python_code = <<~PYTHON
    import yaml
    import sys
    print("Python executing...", flush=True)
  PYTHON
  
  root_dir = File.expand_path('.')
  venv_python = File.join(root_dir, '.home', '.venv', 'bin', 'python3')
  
  puts "Using Python at: #{venv_python}"
  result = system venv_python, "-c", python_code
  if !result
    puts "Python command failed with exit code: #{$?.exitstatus}"
  end
end

It's working just fine! Thanks!

Executing Python code...
Using Python at: /home/afonsoo/derek/riscv-unified-db/.home/.venv/bin/python3
Python executing...

@dhower-qc dhower-qc merged commit 11b54fe into main Nov 18, 2024
3 checks passed
@dhower-qc dhower-qc deleted the python branch November 18, 2024 15:00
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