This file contains information useful only for person who is trying to install projector-installer from source and/or to build own wheel file.
- Prepare environment
- Install from source
- Create python wheel file
- Install from wheel file
- Publish
- Using specific server version
For experiments, you may want to use virtual environment. To use it you have to install python3-venv package first:
sudo apt install python3-venv
Virtual environment can be created and activated using the following commands:
python3 -m venv venv
source ./venv/bin/activate
If you are running Ubuntu 18.04 or earlier distributive it is necessary to upgrade pip with command:
python3 -m pip install -U pip
To leave virtual environment use command
deactivate
# clone project-installer repository
git clone https://github.com/JetBrains/projector-installer.git
# go to source directory
cd projector-installer
# install dependencies
pip3 install -r requirements.txt
# get bundled files
python3 setup.py bundle
# do install
pip3 install .
From projector-installer source directory execute:
# install dependencies
pip3 install -r requirements.txt
# Remove old files if necessary
rm -rf dist build
# get bundled files and create wheel
python3 setup.py bundle bdist_wheel
A whl
file will be created in the dist
dir.
To install projector-installer from wheel file use command:
pip3 install projector_installer-VERSION-py3-none-any.whl
You can download a built whl
file from Releases or build it yourself.
rm -rf dist build # Remove old build files if necessary
pip3 install -r requirements.txt # install requirements if necessary
python3 setup.py bundle sdist bdist_wheel # Build required files
python3 -m twine upload --repository testpypi --verbose dist/* # Upload to https://test.pypi.org/project/projector-installer/
python3 -m twine upload dist/* # Upload to https://pypi.org/project/projector-installer/
Projector server used by installer retrieved when bundle setup command is executed. User can specify desired server distribution by modifying PROJECTOR_SERVER_URL variable in setup.py script. Usually this variable points to some official server release, for example:
PROJECTOR_SERVER_URL: str = 'https://github.com/JetBrains/projector-server/releases/' \
'download/v1.2.1/projector-server-v1.2.1.zip'
Starting from installer newer than ver. 1.2.1 it is possible to specify local file in this variable, for example:
PROJECTOR_SERVER_URL: str = 'file:///path/to/local/server/build/projector-server-v1.2.1.zip'
Server distribution can be build using these instructions.