Permalink
Browse files

'python -m pip' all the things

Explicit is better than implicit.
  • Loading branch information...
crwood committed Jan 23, 2019
1 parent 72e60ae commit 5bab957095f8224f91f60ff3ac0cf7277490f1b9
Showing with 41 additions and 40 deletions.
  1. +17 −17 Makefile
  2. +5 −5 README.rst
  3. +9 −9 make.bat
  4. +3 −2 scripts/maybe_downgrade_pyqt.py
  5. +2 −2 scripts/maybe_rebuild_libsodium.py
  6. +5 −5 tox.ini
@@ -226,13 +226,13 @@ frozen-tahoe:
source build/venv-tahoe/bin/activate && \
pushd build/tahoe-lafs && \
python setup.py update_version && \
pip install --find-links=https://tahoe-lafs.org/deps/ . && \
python -m pip install --find-links=https://tahoe-lafs.org/deps/ . && \
case `uname` in \
Darwin) python ../../scripts/maybe_rebuild_libsodium.py ;; \
esac && \
pip install packaging && \
pip install pyinstaller==3.4 && \
pip list && \
python -m pip install packaging && \
python -m pip install pyinstaller==3.4 && \
python -m pip list && \
export PYTHONHASHSEED=1 && \
pyinstaller pyinstaller.spec && \
rm -rf dist/Tahoe-LAFS/cryptography-2.4.2-py2.7.egg-info && \
@@ -242,7 +242,7 @@ frozen-tahoe:
mv build/tahoe-lafs/dist/Tahoe-LAFS dist

install:
pip3 install --upgrade .
python3 -m pip install --upgrade .

pyinstaller:
if [ -f dist/Tahoe-LAFS.zip ] ; then \
@@ -252,17 +252,17 @@ pyinstaller:
fi;
python3 -m virtualenv --clear --python=python3.6 build/venv-gridsync
source build/venv-gridsync/bin/activate && \
pip install --upgrade pip && \
pip install -r requirements/requirements-hashes.txt && \
pip install . && \
python -m pip install --upgrade pip && \
python -m pip install -r requirements/requirements-hashes.txt && \
python -m pip install . && \
case `uname` in \
Darwin) \
python scripts/maybe_rebuild_libsodium.py && \
python scripts/maybe_downgrade_pyqt.py \
;; \
esac && \
pip install pyinstaller==3.4 && \
pip list && \
python -m pip install pyinstaller==3.4 && \
python -m pip list && \
export PYTHONHASHSEED=1 && \
python -m PyInstaller -y misc/gridsync.spec

@@ -274,17 +274,17 @@ py2app:
fi;
python3 -m virtualenv --clear --python=python3.6 build/venv-py2app
source build/venv-py2app/bin/activate && \
pip install --upgrade pip && \
pip install -r requirements/requirements-hashes.txt && \
python -m pip install --upgrade pip && \
python -m pip install -r requirements/requirements-hashes.txt && \
case `uname` in \
Darwin) \
python scripts/maybe_rebuild_libsodium.py && \
python scripts/maybe_downgrade_pyqt.py \
;; \
esac && \
pip install . && \
pip install py2app && \
pip list && \
python -m pip install . && \
python -m pip install py2app && \
python -m pip list && \
python setup.py py2app && \
python scripts/strip_py2app_bundle.py
cp -r gridsync/resources dist/Gridsync.app/Contents/MacOS
@@ -294,7 +294,7 @@ py2app:
dmg:
python3 -m virtualenv --clear --python=python2 build/venv-dmg
source build/venv-dmg/bin/activate && \
pip install dmgbuild && \
python -m pip install dmgbuild && \
python misc/call_dmgbuild.py

# https://developer.apple.com/library/archive/technotes/tn2206/_index.html
@@ -339,4 +339,4 @@ pypi-release:
twine upload --verbose dist/gridsync-*.*

uninstall:
pip3 uninstall -y gridsync
python3 -m pip uninstall -y gridsync
@@ -114,12 +114,12 @@ The following series of steps (run from the top level of the Gridsync source tre

sudo apt-get install build-essential libffi-dev libssl-dev python python-dev python3 python3-dev virtualenv
virtualenv --python=python2 ./venv2
./venv2/bin/pip install --upgrade setuptools pip
./venv2/bin/pip install tahoe-lafs
./venv2/bin/python -m pip install --upgrade setuptools pip
./venv2/bin/python -m pip install tahoe-lafs
virtualenv --python=python3 ./venv3
./venv3/bin/pip install --upgrade setuptools pip
./venv3/bin/pip install -r requirements/requirements-hashes.txt
./venv3/bin/pip install .
./venv3/bin/python -m pip install --upgrade setuptools pip
./venv3/bin/python -m pip install -r requirements/requirements-hashes.txt
./venv3/bin/python -m pip install .
PATH=$PATH:./venv2/bin ./venv3/bin/gridsync


@@ -67,17 +67,17 @@ call .\build\venv-tahoe\Scripts\activate
::call powershell -Command "(New-Object Net.WebClient).DownloadFile('https://tahoe-lafs.org/downloads/tahoe-lafs-1.11.0.zip', '.\build\tahoe-lafs.zip')"
::call C:\Python27\python.exe -m zipfile -e .\build\tahoe-lafs.zip .\build
::call move .\build\tahoe-lafs-1.11.0 .\build\tahoe-lafs
call pip install --upgrade setuptools pip
call python -m pip install --upgrade setuptools pip
call git clone https://github.com/tahoe-lafs/tahoe-lafs.git .\build\tahoe-lafs
call git --git-dir=build\tahoe-lafs\.git --work-tree=build\tahoe-lafs checkout tahoe-lafs-1.13.0
::call copy .\misc\tahoe.spec .\build\tahoe-lafs
call pushd .\build\tahoe-lafs
call python setup.py update_version
call pip install .
call pip install packaging
call python -m pip install .
call python -m pip install packaging
:: Adding --no-use-pep517 suggested by https://github.com/pypa/pip/issues/6163
call pip install --no-use-pep517 pyinstaller==3.4
call pip list
call python -m pip install --no-use-pep517 pyinstaller==3.4
call python -m pip list
call set PYTHONHASHSEED=1
call pyinstaller pyinstaller.spec
call python -m zipfile -c dist\Tahoe-LAFS.zip dist\Tahoe-LAFS
@@ -97,11 +97,11 @@ if exist .\dist\Tahoe-LAFS.zip (
call %PYTHON3% -m venv --clear .\build\venv-gridsync
call .\build\venv-gridsync\Scripts\activate
call python -m pip install --upgrade setuptools pip
call pip install -r .\requirements\requirements-hashes.txt
call pip install .
call python -m pip install -r .\requirements\requirements-hashes.txt
call python -m pip install .
:: Adding --no-use-pep517 suggested by https://github.com/pypa/pip/issues/6163
call pip install --no-use-pep517 pyinstaller==3.4
call pip list
call python -m pip install --no-use-pep517 pyinstaller==3.4
call python -m pip list
call set PYTHONHASHSEED=1
call pyinstaller -y --clean misc\gridsync.spec
call set PYTHONHASHSEED=
@@ -17,10 +17,11 @@
if (major, minor) < (10, 10):
print("Older Mac detected ({}); "
"Downgrading SIP, PyQt5...".format(version))
subprocess.call(['pip', 'install', 'SIP==4.19.2', 'PyQt5==5.8.2'])
subprocess.call([
'python', 'm', 'pip', 'install', 'SIP==4.19.2', 'PyQt5==5.8.2'])
# As of version 5.11, a "private" SIP module is provided by PyQt5, replacing
# the standalone "SIP" library. Unfortunately, py2app seems unable to detect
# the vendored version, so install the standalone SIP 4.19.8 library for now.
# See https://www.riverbankcomputing.com/pipermail/pyqt/2018-June/040421.html
else:
subprocess.call(['pip', 'install', 'SIP==4.19.8'])
subprocess.call(['python', '-m', 'pip', 'install', 'SIP==4.19.8'])
@@ -20,5 +20,5 @@
# XXX Keep pinned to 1.2.1 for now; version 1.3.0 raises "AttributeError:
# cffi library '_sodium' has no function, constant or global variable named
# 'crypto_aead_chacha20poly1305_ietf_keybytes'"
subprocess.call(['pip', 'install', '--force-reinstall', '--no-deps',
'--no-binary', 'PyNaCl', 'PyNaCl==1.2.1'])
subprocess.call(['python', '-m', 'pip', 'install', '--force-reinstall',
'--no-deps', '--no-binary', 'PyNaCl', 'PyNaCl==1.2.1'])
10 tox.ini
@@ -16,11 +16,11 @@ deps =
pytest-twisted
whitelist_externals = xvfb-run
commands =
pyqt57: pip install PyQt5==5.7.1
pyqt58: pip install PyQt5==5.8.2
pyqt59: pip install PyQt5==5.9.2
pyqt510: pip install PyQt5==5.10.1
pyqt511: pip install PyQt5==5.11.2
pyqt57: python -m pip install PyQt5==5.7.1
pyqt58: python -m pip install PyQt5==5.8.2
pyqt59: python -m pip install PyQt5==5.9.2
pyqt510: python -m pip install PyQt5==5.10.1
pyqt511: python -m pip install PyQt5==5.11.2
# Needed for older Macs
mac: python scripts/maybe_rebuild_libsodium.py
mac: python scripts/maybe_downgrade_pyqt.py

0 comments on commit 5bab957

Please sign in to comment.