Skip to content

Instantly share code, notes, and snippets.

@jesboat
Last active June 5, 2020 02:50
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 jesboat/f46979e5a5974e2b64c6a1fc0df37850 to your computer and use it in GitHub Desktop.
Save jesboat/f46979e5a5974e2b64c6a1fc0df37850 to your computer and use it in GitHub Desktop.
#!/bin/bash
# These are the versions of the things I had installed
# when I noticed the issue
pkgs=(
# pyre + dependency tree
pyre_check==0.0.46
libcst==0.3.6
PyYAML==5.3.1
typing_extensions==3.7.4.2
typing_inspect==0.6.0
mypy_extensions==0.4.3
pyre_extensions==0.0.18
psutil==5.7.0
pywatchman==1.4.1
# virtualenv includes these by default
pip==20.1.1
wheel==0.34.2
setuptools==46.1.3
)
virtualenv venv1
(. venv1/bin/activate && pip install "${pkgs[@]}")
mkdir empty1 empty2
echo
echo
echo
echo "At the prompts, enter Y for create watchman config, 'empty1' for source directory"
echo
echo
echo
(. venv1/bin/activate && pyre init)
python3 <<EOF
import json
with open('.pyre_configuration', 'r') as f:
config = json.load(f)
config['source_directories'] = ['empty1', 'empty2']
config['search_path'] = '$(pwd)/venv1/lib/python3.7/site-packages'
with open('.pyre_configuration', 'w') as f:
json.dump(config, f)
EOF
# XXX next line may be unnecessary
rm -rf .pyre
date
(. venv1/bin/activate && time pyre check)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment