Skip to content

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.

3 participants