I'm new to the Python project tooling and currently finding my ways around it. I'd like to standardize a set of Python projects and to that end I'm doing the following:
pyscaffold
to generate project templates i.e. conda install pyscaffold && putup my_project
.python setup.py test
python setup.py sdist bdist_wheel
Provided that I have set the PYTHONPATH
to a shared drive /dev/shared/dist/Lib/site-packages/
and where Lib/site-packages/
is the suffix needed by Python AFAIK. How can I have the standardized projects built to output distributions either binary or source to that folder so that pip install my_project
or for that matter building dependent projects will pick my packages from there?
You can use the -t
(target) flag to install to a folder. So for instance:
mkdir target_folder
TARGET=target_folder
python -m pip install -t $TARGET requests
or using a wheel/dist that you've generated:
python -m pip install -t $TARGET my_package.tar.gz
This should also work for a mounted directory