diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 517e279a11..be34f21bd5 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -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 diff --git a/build/debian/makedist_debian.sh b/build/debian/makedist_debian.sh index cc0d6be344..b6dc07b7dd 100755 --- a/build/debian/makedist_debian.sh +++ b/build/debian/makedist_debian.sh @@ -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 diff --git a/build/mac/makedist_macos.sh b/build/mac/makedist_macos.sh index 937acb6b5b..9c4cd905fe 100755 --- a/build/mac/makedist_macos.sh +++ b/build/mac/makedist_macos.sh @@ -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 diff --git a/requirements-build.txt b/build/requirements.txt similarity index 80% rename from requirements-build.txt rename to build/requirements.txt index 0a9dca929f..1a74391722 100644 --- a/requirements-build.txt +++ b/build/requirements.txt @@ -1,4 +1,4 @@ --r requirements.txt +-r ../requirements.txt cx_Freeze; sys_platform != 'darwin' PyInstaller; sys_platform == 'darwin' diff --git a/setup.py b/build/setup.py similarity index 95% rename from setup.py rename to build/setup.py index e5e2f1b3ce..f41bc83bdc 100644 --- a/setup.py +++ b/build/setup.py @@ -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]: @@ -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), } diff --git a/tribler.spec b/build/tribler.spec similarity index 100% rename from tribler.spec rename to build/tribler.spec diff --git a/build/win/makedist_win.bat b/build/win/makedist_win.bat index 0948ae4b3e..8a6b878cca 100644 --- a/build/win/makedist_win.bat +++ b/build/win/makedist_win.bat @@ -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 diff --git a/.readthedocs.yaml b/doc/.readthedocs.yaml similarity index 100% rename from .readthedocs.yaml rename to doc/.readthedocs.yaml diff --git a/doc/building/linux.rst b/doc/building/linux.rst index d2a1eeb51c..65557e8f9d 100644 --- a/doc/building/linux.rst +++ b/doc/building/linux.rst @@ -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. diff --git a/doc/building/mac.rst b/doc/building/mac.rst index 3ac3a83e8b..703d00d41b 100644 --- a/doc/building/mac.rst +++ b/doc/building/mac.rst @@ -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. diff --git a/doc/building/windows.rst b/doc/building/windows.rst index 108b319f64..74653f94fb 100644 --- a/doc/building/windows.rst +++ b/doc/building/windows.rst @@ -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.