diff --git a/.gitignore b/.gitignore index 531059a..2357621 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,6 @@ __pycache__/ *.pyc saida.txt -venv \ No newline at end of file +venv +.vscode +.env \ No newline at end of file diff --git a/.vscode/settings.json b/.vscode/settings.json index 29b0621..580b237 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -1,3 +1,3 @@ { - "python.pythonPath": "venv/bin/python3.5" + "python.pythonPath": "/usr/bin/python3" } \ No newline at end of file diff --git a/Pipfile b/Pipfile new file mode 100644 index 0000000..543c427 --- /dev/null +++ b/Pipfile @@ -0,0 +1,13 @@ +[[source]] +name = "pypi" +url = "https://pypi.org/simple" +verify_ssl = true + +[dev-packages] + +[packages] +lark-parser = "*" +argparse = "*" + +[requires] +python_version = "3.6" diff --git a/Pipfile.lock b/Pipfile.lock new file mode 100644 index 0000000..7602a34 --- /dev/null +++ b/Pipfile.lock @@ -0,0 +1,37 @@ +{ + "_meta": { + "hash": { + "sha256": "1cfbf8f04df7572f26259170c877c39f658b4ec44eaa93389e8c80f5d2ffeddf" + }, + "pipfile-spec": 6, + "requires": { + "python_version": "3.6" + }, + "sources": [ + { + "name": "pypi", + "url": "https://pypi.org/simple", + "verify_ssl": true + } + ] + }, + "default": { + "argparse": { + "hashes": [ + "sha256:62b089a55be1d8949cd2bc7e0df0bddb9e028faefc8c32038cc84862aefdd6e4", + "sha256:c31647edb69fd3d465a847ea3157d37bed1f95f19760b11a47aa91c04b666314" + ], + "index": "pypi", + "version": "==1.4.0" + }, + "lark-parser": { + "hashes": [ + "sha256:3cc504f98dcfe8dbe747bbfe966dbe6f126ce4234402ed98147020843d52eda9", + "sha256:642fb3cea6938975f7713767068b8e1d6f494c1a175d5202a95f1b991b7205ff" + ], + "index": "pypi", + "version": "==0.7.7" + } + }, + "develop": {} +} diff --git a/paint_code.sh b/paint_code.sh index 69f7880..a0de6bd 100755 --- a/paint_code.sh +++ b/paint_code.sh @@ -1,11 +1,14 @@ -echo "instalando ferramentas necessarias..." +#!/bin/bash +echo "\n_________instalando ferramentas necessarias..._________\n" sudo apt-get -yqq install python3-pip python3-tk -echo "instalando virtualenv..." -sudo pip3 install virtualenv -virtualenv venv --python=python3 -source venv/bin/activate -echo "instalando depedencias do PaintCode..." -pip install lark-parser argparse -cd src/ -python main.py --file testes/example-frac2.pc +echo "\n_________instalando pipenv..." +if sudo pip install pipenv +then + echo "\n_________instalando depedencias do PaintCode..._________\n" + pipenv install + pipenv shell +else + echo "\n_________Erro ao instalar pipenv_________\n" + exit 1 +fi