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

Add environment variable so binaries work; tweak install script #461

Open
wants to merge 1 commit 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
1 change: 1 addition & 0 deletions Vagrantfile
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
# "--natdnsproxy1", "on",
# ]
config.vm.network "private_network", ip: "192.168.10.200"
config.vm.provision :shell, :inline => "echo 'export PYTHONPATH=/vagrant' > /etc/profile.d/vagrant.sh; chmod +x /etc/profile.d/vagrant.sh"
config.vm.provision :shell, :inline => "apt-get update -q && cd /vagrant && ./setup.sh"

# Share ports 5000 - 5009
Expand Down
13 changes: 8 additions & 5 deletions setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -178,10 +178,10 @@ fi
color '35;1' 'Ensuring setuptools and pip versions...'
# Need up-to-date pyparsing or upgrading pip will break pip
# https://github.com/pypa/packaging/issues/94
pip install 'pyparsing==2.2.0'
pip install -i https://pypi.python.org/simple 'pyparsing==2.2.0'
# If python-setuptools is actually the old 'distribute' fork of setuptools,
# then the first 'pip install setuptools' will be a no-op.
pip install 'pip==9.0.1' 'setuptools==34.3.1'
pip install -i https://pypi.python.org/simple 'pip==9.0.1' 'setuptools==34.3.1'
hash pip # /usr/bin/pip might now be /usr/local/bin/pip
pip install 'pip==9.0.1' 'setuptools==34.3.1'

Expand All @@ -198,9 +198,12 @@ cd "$src_dir"
color '35;1' 'Removing .pyc files...' # they might be stale
find . -name \*.pyc -delete

color '35;1' 'Temporarily removing python-chardet (to resolve conflict, will re-install in next step)'
apt-get remove -y python-chardet

color '35;1' 'Installing dependencies from pip...'
SODIUM_INSTALL=system pip install -r requirements.txt
pip install -e .
SODIUM_INSTALL=system pip install --disable-pip-version-check -r requirements.txt
pip install --disable-pip-version-check -e .

color '35;1' 'Finished installing dependencies.'

Expand Down Expand Up @@ -274,7 +277,7 @@ if ! $prod; then
fi
fi

mysqld_safe &
# mysqld_safe & # I think 'upstart' does this for us?
sleep 10

env NYLAS_ENV=dev bin/create-db
Expand Down