Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update bin path and other install fixes #119

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 9 additions & 11 deletions install-bashhub.sh
Original file line number Diff line number Diff line change
Expand Up @@ -102,11 +102,9 @@ download_and_install_env() {
PYTHON=$(which $python_command)
echo "Using Python path $PYTHON"

VERSION=20.10.0
VERSION_URL="https://github.com/pypa/get-virtualenv/raw/$VERSION/public/virtualenv.pyz"
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Using this version and the specific version url is intentional. Is the update needed to support newer versions of Python?

# Alternatively use latest url for most recent that should be 2.7-3.9+
LATEST_URL="https://bootstrap.pypa.io/virtualenv/2.7/virtualenv.pyz"
curl -OL $VERSION_URL
# Use latest url for most recent that should be 2.7-3.9+
LATEST_URL=" https://bootstrap.pypa.io/virtualenv.pyz"
curl -OL $LATEST_URL
# Create the first "bootstrap" environment.
$PYTHON virtualenv.pyz -q env
rm virtualenv.pyz
Expand Down Expand Up @@ -264,26 +262,26 @@ setup_bashhub_files() {

# install our packages. bashhub and dependencies.
echo "Pulling down a few dependencies...(this may take a moment)"
../env/bin/pip -qq install .
../env/local/bin/pip -qq install .

# Check if we already have a config. If not run setup.
if [ -e $backup_config ]; then
cp "$backup_config" "$bashhub_config"
rm "$backup_config"

if ! ../env/bin/bashhub util update_system_info; then
if ! ../env/local/bin/bashhub util update_system_info; then
# Run setup if we run into any issues updating our system info
../env/bin/bashhub setup
../env/local/bin/bashhub setup
fi
else
# Setup our config file
../env/bin/bashhub setup
../env/local/bin/bashhub setup
fi

# Wire up our bin directory
mkdir -p ~/.bashhub/bin
ln -sf ../env/bin/bashhub ~/.bashhub/bin/bashhub
ln -sf ../env/bin/bh ~/.bashhub/bin/bh
ln -sf ../env/local/bin/bashhub ~/.bashhub/bin/bashhub
ln -sf ../env/local/bin/bh ~/.bashhub/bin/bh

# Clean up what we downloaded
cd ~/.bashhub
Expand Down
8 changes: 3 additions & 5 deletions setup.py
Original file line number Diff line number Diff line change
@@ -1,13 +1,11 @@
from setuptools import setup, find_packages
import install_bashhub
import sys

exec (open('bashhub/version.py').read())
from bashhub.version import __version__

tests_require = ['pytest>=3.3.1']

setup(name='bashhub',
version='__version__',
version=__version__,
description='Bashhub.com python client',
url='https://github.com/rcaloras/bashhub-client',
author='Ryan Caloras',
Expand All @@ -19,7 +17,7 @@
'requests==2.23.0', 'jsonpickle==2.0.0', 'click==6.7',
'npyscreen==4.10.5', 'python-dateutil==2.8.1',
'pymongo==3.10.1', 'inflection==0.3.1', 'humanize==1.0.0',
'future==0.18.3', 'mock==3.0.5'
'future==0.18.2', 'mock==3.0.5'
],
tests_require=tests_require,
extras_require={'test': tests_require},
Expand Down