-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Overhauls packaging to use pipenv, as with the Quark-Gluon-Analysis r…
…epo.
- Loading branch information
Showing
6 changed files
with
482 additions
and
6 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,17 @@ | ||
[[source]] | ||
name = "pypi" | ||
url = "https://pypi.python.org/simple" | ||
verify_ssl = true | ||
|
||
[dev-packages] | ||
|
||
[requires] | ||
python_version = "2.7" | ||
|
||
[packages] | ||
python-gssapi = "*" | ||
paramiko = "*" | ||
bokeh = "*" | ||
dask = "*" | ||
distributed = "*" | ||
"subprocess32" = "*" |
Large diffs are not rendered by default.
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
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,5 @@ | ||
#!/bin/bash | ||
|
||
DASK_SSH="$(pipenv --venv)/lib/python2.7/site-packages/distributed/cli/dask_ssh.py" | ||
pipenv run python $DASK_SSH --scheduler tev01 --hostfile hostfile.txt --nthreads 8 | ||
|
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 |
---|---|---|
@@ -1,6 +1,37 @@ | ||
#!/bin/bash | ||
|
||
# Setup root | ||
source /phys/users/gwatts/bin/CommonScripts/configASetup.sh | ||
lsetup root | ||
easy_install-2.7 --install-dir ~/.local/lib/python2.7/site-packages pip | ||
~/.local/lib/python2.7/site-packages/pip install --upgrade --user python-gssapi paramiko bokeh dask distributed subprocess32 | ||
python package_test.py | ||
|
||
# Make sure that the user base binary directory is in the path. | ||
USER_BASE_BIN_PATH=$(python -m site --user-base)"/bin" | ||
if [[ ":$PATH:" != *":$USER_BASE_BIN_PATH:"* ]]; then | ||
echo "Warning: $USER_BASE_BIN_PATH not in PATH (necessary for use of local pipenv installation)!" | ||
# Add a command to ~/.bashrc adding the user base binary directory to the path | ||
# if such a command does not already exist. | ||
export PATH=$PATH:$USER_BASE_BIN_PATH | ||
if ! grep -s -q -F "$USER_BASE_BIN_PATH" ~/.bashrc; then | ||
echo "Do you wish to add 'export PATH=\$PATH:$USER_BASE_BIN_PATH' to your ~/.bashrc for future use (recommended)?" | ||
select yn in "Yes" "No"; do | ||
case $yn in | ||
Yes ) echo "export PATH=\$PATH:$USER_BASE_BIN_PATH" >> ~/.bashrc; break;; | ||
No ) break;; | ||
esac | ||
done | ||
fi | ||
fi | ||
|
||
# Make sure that setuptools is updated before installing pipenv. | ||
pip install -q --user -U setuptools | ||
|
||
# Install pipenv locally. | ||
pip install --user -U pipenv | ||
|
||
# Install the packages listed in the Pipfile | ||
pipenv install | ||
|
||
# Try to use the packages. | ||
pipenv run python package_test.py | ||
|
||
echo "NOTE: to use installed packages, prepend 'pipenv run' to your commands, or run 'pipenv shell' to activate the virtualenv." |
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