Skip to content

Commit

Permalink
Moved non-essential files out of top level
Browse files Browse the repository at this point in the history
  • Loading branch information
qstokkink committed Aug 29, 2024
1 parent ee189bc commit 9520ab2
Show file tree
Hide file tree
Showing 11 changed files with 14 additions and 13 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -73,10 +73,10 @@ jobs:
python-version: '3.10'
cache: 'pip'
cache-dependency-path: |
**/requirements-build.txt
**/build/requirements.txt
- name: Install Dependencies
run: |
pip install --upgrade -r requirements-build.txt
pip install --upgrade -r build/requirements.txt
- name: Setup npm
uses: actions/setup-node@v4
- name: Build npm
Expand Down
2 changes: 1 addition & 1 deletion build/debian/makedist_debian.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ python3 -m pip install --upgrade PyGObject
python3 ./build/debian/update_metainfo.py

# ----- Build binaries
python3 setup.py build
python3 build/setup.py build

# ----- Build dpkg
cp -r ./dist/tribler ./build/debian/tribler/usr/share/tribler
Expand Down
2 changes: 1 addition & 1 deletion build/mac/makedist_macos.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ set -e # exit when any command fails
source ./build/mac/env.sh

# ----- Build
pyinstaller tribler.spec --log-level="${LOG_LEVEL}"
pyinstaller build/tribler.spec --log-level="${LOG_LEVEL}"

mkdir -p $INSTALL_DIR
mv $DIST_DIR/$APPNAME.app $INSTALL_DIR
Expand Down
2 changes: 1 addition & 1 deletion requirements-build.txt → build/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
-r requirements.txt
-r ../requirements.txt

cx_Freeze; sys_platform != 'darwin'
PyInstaller; sys_platform == 'darwin'
Expand Down
4 changes: 2 additions & 2 deletions setup.py → build/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
from packaging.version import Version
from setuptools import find_packages

from build.win.build import setup, setup_executables, setup_options
from win.build import setup, setup_executables, setup_options


def read_requirements(file_name: str, directory: str = ".") -> list[str]:
Expand All @@ -31,7 +31,7 @@ def read_requirements(file_name: str, directory: str = ".") -> list[str]:


base_dir = os.path.dirname(os.path.abspath(__file__))
install_requires = read_requirements("requirements-build.txt", base_dir)
install_requires = read_requirements("build/requirements.txt", base_dir)
extras_require = {
"dev": read_requirements("requirements-test.txt", base_dir),
}
Expand Down
5 changes: 3 additions & 2 deletions tribler.spec → build/tribler.spec
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,10 @@ import aiohttp_apispec

from PyInstaller.utils.hooks import collect_data_files, collect_submodules

root_dir = os.path.abspath(os.path.dirname(__name__))
root_dir = os.path.abspath(os.path.join(os.path.dirname(__name__), ".."))
os.chdir(root_dir)
src_dir = os.path.join(root_dir, "src")
sys.path.append(src_dir)
sys.path.insert(0, src_dir)

pyipv8_dir = os.path.join(root_dir, "pyipv8")
sys.path.append(pyipv8_dir)
Expand Down
2 changes: 1 addition & 1 deletion build/win/makedist_win.bat
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ REM ----- Build
REM Sandip 2024-03-22: Deprecated, we are not using PyInstaller anymore because of issue with False Malware detections.
REM %PYTHONHOME%\Scripts\pyinstaller.exe tribler.spec --log-level=%LOG_LEVEL% || exit /b
ECHO Building Tribler using Cx_Freeze
call python3 setup.py build
call python3 build/setup.py build

copy build\win\resources\tribler*.nsi dist\tribler

Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion doc/building/linux.rst
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ First, install additional requirements:
.. code-block::
sudo apt-get -y install alien cpio=2.13+dfsg-7 devscripts fakeroot gir1.2-gtk-4.0 libgirepository1.0-dev rpm
python -m pip install --upgrade -r requirements-build.txt
python -m pip install --upgrade -r build/requirements.txt
Second, create the ``.deb`` file in the ``dist`` directory.
You can set the ``GITHUB_TAG`` to whatever you want to have your version set as.
Expand Down
2 changes: 1 addition & 1 deletion doc/building/mac.rst
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ First, install additional requirements:

.. code-block::
python -m pip install -r requirements-build.txt
python -m pip install -r build/requirements.txt
Second, create the ``.dmg`` file in the ``dist`` directory.
Expand Down
2 changes: 1 addition & 1 deletion doc/building/windows.rst
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ First, install additional requirements:

.. code-block::
python -m pip install -r requirements-build.txt
python -m pip install -r build/requirements.txt
Second, create the ``.exe`` file in the ``dist`` directory.
Expand Down

0 comments on commit 9520ab2

Please sign in to comment.