Skip to content

Instantly share code, notes, and snippets.

@eliorc
Last active July 27, 2022 07:29
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save eliorc/6318da3771b3db64eb6206c43c861e82 to your computer and use it in GitHub Desktop.
Save eliorc/6318da3771b3db64eb6206c43c861e82 to your computer and use it in GitHub Desktop.
Adding to PYTHONPATH with .pth files
#!/usr/bin/env sh
# Add current folder to PYTHONPATH
CURRENT_FOLDER=$(pwd)
SITE_PACKAGES_FOLDER="$(ls -d $(poetry env info -p)/lib/python*/site-packages/)project_dir.pth"
echo "$CURRENT_FOLDER" > "$SITE_PACKAGES_FOLDER"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment