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

Create setup.py and fix building wheel #7935

Merged
merged 6 commits into from
Mar 20, 2024
Merged

Conversation

xoriole
Copy link
Contributor

@xoriole xoriole commented Mar 18, 2024

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.

@xoriole xoriole self-assigned this Mar 19, 2024
@xoriole xoriole marked this pull request as ready for review March 19, 2024 12:48
@xoriole xoriole requested review from a team and kozlovsky and removed request for a team March 19, 2024 12:48
MANIFEST.in Outdated Show resolved Hide resolved
setup.py Outdated Show resolved Hide resolved
@xoriole xoriole requested a review from kozlovsky March 20, 2024 10:08
@xoriole xoriole merged commit 6b42b61 into Tribler:main Mar 20, 2024
20 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants