-
Notifications
You must be signed in to change notification settings - Fork 729
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
alexioannides
committed
Oct 2, 2018
1 parent
46bb373
commit 0cdc4bd
Showing
7 changed files
with
273 additions
and
77 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
[[source]] | ||
url = "https://pypi.org/simple" | ||
verify_ssl = true | ||
name = "pypi" | ||
|
||
[packages] | ||
|
||
[dev-packages] | ||
pyspark = "==2.3.1" | ||
ipython = "*" | ||
"flake8" = "*" | ||
|
||
[requires] | ||
python_version = "3.6" |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
#!/usr/bin/env bash | ||
|
||
# check to see if pipenv is installed | ||
if [ -x "$(which pipenv)" ] | ||
then | ||
# check that there Pipfile exists in root directory | ||
if [ ! -e Pipfile ] | ||
then | ||
echo 'ERROR - cannot find Pipfile' | ||
exit 1 | ||
fi | ||
|
||
# use Pipenv to create a requirement.txt file | ||
echo '... creating requirements.txt from Pipfile' | ||
pipenv lock -r > requirements.txt | ||
|
||
# install packages to a temporary directory and zip it | ||
pip3 install -r requirements.txt --target ./packages | ||
|
||
# check to see if there are any external dependencies | ||
# if not then create an empty file to see zip with | ||
if [ -z "$(ls -A packages)" ] | ||
then | ||
touch packages/empty.txt | ||
fi | ||
|
||
# zip dependencies | ||
if [ ! -d packages ] | ||
then | ||
echo 'ERROR - pip failed to import dependencies' | ||
exit 1 | ||
fi | ||
|
||
cd packages | ||
zip -9mrv packages.zip . | ||
mv packages.zip .. | ||
cd .. | ||
|
||
# remove temporary directory and requirements.txt | ||
rm -rf packages | ||
rm requirements.txt | ||
|
||
# add local modules | ||
echo '... adding all modules from local utils package' | ||
zip -ru9 packages.zip dependencies -x dependencies/__pycache__/\* | ||
|
||
exit 0 | ||
else | ||
echo 'ERROR - pipenv is not installed --> run pip3 install pipenv to load pipenv into global site packages or install via a system package manager.' | ||
exit 1 | ||
fi |
Binary file not shown.
Oops, something went wrong.