This PR is part of an effort to streamline binary creation for Tribler. It adds a setup.py script to build a Python wheel package. Here is how the wheel can be built and installed.
#!/bin/bash
# Install dependencies to build wheel
python3 -m pip install --upgrade setuptools wheel
python3 -m pip install build
# Run from tribler root directory where setup.py resides
# Clear out any existing wheels located on dist directory
rm -rf dist
# Build the wheel package
python3 -m build
# Uninstall previously install tribler package if any
python3 -m pip uninstall -y tribler
# Install the newly built tribler package
python3 -m pip install dist/*.whl
# Run Tribler
python3 -m tribler.run
Note: setup.py has duplicated dependencies comparing with requirements.txt. It is left as it is. Initial thought to parse requirements.txt to retrieve the dependencies and set in setup.py but it seems it is not a recommended approach. Therefore, it is left unchanged.
This PR is part of an effort to streamline binary creation for Tribler. It adds a setup.py script to build a Python wheel package. Here is how the wheel can be built and installed.
Note:
setup.py
has duplicated dependencies comparing withrequirements.txt
. It is left as it is. Initial thought to parse requirements.txt to retrieve the dependencies and set in setup.py but it seems it is not a recommended approach. Therefore, it is left unchanged.