From 6d5e20dfcc1abd232dceb74a84d3b295f327fdc9 Mon Sep 17 00:00:00 2001 From: Olivier BICHLER <olivier.bichler@cea.fr> Date: Tue, 17 Oct 2023 22:23:45 +0200 Subject: [PATCH] Improved build system --- .gitlab/ci/build.gitlab-ci.yml | 26 ++++++-------------------- requirements.txt | 0 setup.py | 1 + 3 files changed, 7 insertions(+), 20 deletions(-) create mode 100644 requirements.txt diff --git a/.gitlab/ci/build.gitlab-ci.yml b/.gitlab/ci/build.gitlab-ci.yml index 302a700..01c537f 100644 --- a/.gitlab/ci/build.gitlab-ci.yml +++ b/.gitlab/ci/build.gitlab-ci.yml @@ -144,14 +144,9 @@ build:ubuntu_python: script: # Download dependencies - # aidge_core (CPP) - - 'curl --location --output build_artifacts.zip "https://gitlab.eclipse.org/api/v4/projects/5139/jobs/artifacts/main/download?job=build:ubuntu_cpp"' - - unzip -o build_artifacts.zip -d . - - rm -rf build_cpp - # aidge_backend_cpu (CPP) - - 'curl --location --output build_artifacts.zip "https://gitlab.eclipse.org/api/v4/projects/5140/jobs/artifacts/master/download?job=build:ubuntu_cpp"' + # aidge_core (Python) + - 'curl --location --output build_artifacts.zip "https://gitlab.eclipse.org/api/v4/projects/5139/jobs/artifacts/main/download?job=build:ubuntu_python"' - unzip -o build_artifacts.zip -d . - - rm -rf build_cpp # aidge_backend_cpu (Python) - 'curl --location --output build_artifacts.zip "https://gitlab.eclipse.org/api/v4/projects/5140/jobs/artifacts/master/download?job=build:ubuntu_python"' - unzip -o build_artifacts.zip -d . @@ -159,8 +154,7 @@ build:ubuntu_python: - python3 -m pip install virtualenv - virtualenv venv - source venv/bin/activate - - export AIDGE_INSTALL=`pwd`/install - - export CMAKE_PREFIX_PATH=../install_cpp + - python3 -m pip install -r requirements.txt - python3 -m pip install . artifacts: @@ -228,14 +222,9 @@ build:ubuntu_python: # - $env:Path = [System.Environment]::GetEnvironmentVariable("Path","Machine") + ";" + [System.Environment]::GetEnvironmentVariable("Path","User") # script: # # Download dependencies -# # aidge_core (CPP) -# - 'curl "https://gitlab.eclipse.org/api/v4/projects/5139/jobs/artifacts/main/download?job=build:windows_cpp" -o build_artifacts.zip' +# # aidge_core (Python) +# - 'curl "https://gitlab.eclipse.org/api/v4/projects/5139/jobs/artifacts/main/download?job=build:windows_python" -o build_artifacts.zip' # - Expand-Archive -Path .\build_artifacts.zip -DestinationPath . -Force -# - Remove-Item .\build_cpp\ -Recurse -# # aidge_backend_cpu (CPP) -# - 'curl "https://gitlab.eclipse.org/api/v4/projects/5140/jobs/artifacts/master/download?job=build:windows_cpp" -o build_artifacts.zip' -# - Expand-Archive -Path .\build_artifacts.zip -DestinationPath . -Force -# - Remove-Item .\build_cpp\ -Recurse # # aidge_backend_cpu (Python) # - 'curl "https://gitlab.eclipse.org/api/v4/projects/5140/jobs/artifacts/master/download?job=build:windows_python" -o build_artifacts.zip' # - Expand-Archive -Path .\build_artifacts.zip -DestinationPath . -Force @@ -243,10 +232,7 @@ build:ubuntu_python: # - python -m pip install virtualenv # - virtualenv venv # - venv\Scripts\Activate.ps1 -# # Numpy dependancy for unit test -# - python -m pip install numpy -# - $env:AIDGE_INSTALL = "$pwd" + "install" -# - $env:CMAKE_PREFIX_PATH = "../install_cpp" +# - python -m pip install -r requirements.txt # - python -m pip install . # artifacts: # expire_in: 1 week diff --git a/requirements.txt b/requirements.txt new file mode 100644 index 0000000..e69de29 diff --git a/setup.py b/setup.py index 9e339b1..dbf82e2 100644 --- a/setup.py +++ b/setup.py @@ -108,6 +108,7 @@ if __name__ == '__main__': cmdclass={ 'build_ext': CMakeBuild, }, + install_requires=['aidge_core', 'aidge_backend_cpu'], zip_safe=False, ) -- GitLab