diff --git a/.gitlab/ci/build.gitlab-ci.yml b/.gitlab/ci/build.gitlab-ci.yml index 79db0430574b07c3f47ecd03ad0c991473cbcc45..62878a57d7f00d36eff92f95e5a2efff484e42df 100644 --- a/.gitlab/ci/build.gitlab-ci.yml +++ b/.gitlab/ci/build.gitlab-ci.yml @@ -125,3 +125,22 @@ build:windows_cpp: paths: - build_cpp/ - install_cpp/ + +build:windows_python: + stage: build + needs: [] + tags: + - docker + + script: + - python3 -m pip install virtualenv + - virtualenv venv + - source venv/bin/activate + # Numpy dependancy for unit test + - python3 -m pip install numpy + - export AIDGE_INSTALL=`pwd`/install + - python3 -m pip install . + artifacts: + expire_in: 1 week + paths: + - venv/ diff --git a/setup.py b/setup.py index 16305afdfdfa5de2e328460d9e96c77eb96a9d98..e152db255557045ec2e08f59e4e9e08fc90b8ad6 100644 --- a/setup.py +++ b/setup.py @@ -70,7 +70,8 @@ class CMakeBuild(build_ext): self.spawn(['cmake', str(cwd), param_py, '-DTEST=OFF', f'-DCMAKE_INSTALL_PREFIX:PATH={install_path}']) if not self.dry_run: - self.spawn(['make', 'all', 'install', '-j', max_jobs]) + self.spawn(['cmake', '--build', '.', '-j', max_jobs]) + self.spawn(['cmake', '--install', '.', '-j', max_jobs]) os.chdir(str(cwd)) aidge_package = build_lib / (get_project_name()) @@ -81,7 +82,7 @@ class CMakeBuild(build_ext): # Copy all shared object files from build_temp/lib to aidge_package for root, _, files in os.walk(build_temp.absolute()): for file in files: - if file.endswith('.so') and (root != str(aidge_package.absolute())): + if (file.endswith('.so') or file.endswith('.pyd')) and (root != str(aidge_package.absolute())): currentFile=os.path.join(root, file) shutil.copy(currentFile, str(aidge_package.absolute())) @@ -100,7 +101,6 @@ if __name__ == '__main__': long_description_content_type="text/markdown", long_description="\n".join(DOCLINES[2:]), classifiers=[c for c in CLASSIFIERS.split('\n') if c], - platforms=["Linux"], packages=find_packages(where="."), include_package_data=True, ext_modules=[CMakeExtension(get_project_name())],