From 5681bcf250bc5e41e0b4abf20ac215868de6d45e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9my=20Marquis?= Date: Fri, 22 Dec 2023 13:54:15 +0100 Subject: [PATCH] Add workaround for build.py script taking priority * Rename build.py to buildcpp.py so it does not interfer with `python -m build`, allowing the packaging to be done successfully. --- .github/workflows/build.yml | 2 +- .github/workflows/package.yml | 2 +- README.md | 2 +- build.py => buildcpp.py | 0 pyproject.toml | 12 ++++++------ 5 files changed, 9 insertions(+), 9 deletions(-) rename build.py => buildcpp.py (100%) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 65e30eb5..154331b2 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -55,4 +55,4 @@ jobs: - name: Compile run: | - python build.py + python buildcpp.py diff --git a/.github/workflows/package.yml b/.github/workflows/package.yml index 76905d96..cd87779f 100644 --- a/.github/workflows/package.yml +++ b/.github/workflows/package.yml @@ -62,7 +62,7 @@ jobs: python -m pip install . - name: Compile - run: python build.py + run: python buildcpp.py - name: Build archives run: python -m build diff --git a/README.md b/README.md index e1763dbc..3e8b3397 100644 --- a/README.md +++ b/README.md @@ -82,7 +82,7 @@ To add new dependencies to the project, either add them to the `pyproject.toml` Compile: ```shell -python build.py +python buildcpp.py ``` If CMake complains about not finding pybind11, ensure to activate the shell first. diff --git a/build.py b/buildcpp.py similarity index 100% rename from build.py rename to buildcpp.py diff --git a/pyproject.toml b/pyproject.toml index 79f9f14c..1b564c79 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -56,20 +56,20 @@ managed = true allow-direct-references = true [tool.hatch.build.targets.wheel] -#script = "build.py" +#script = "buildcpp.py" ignore-vcs = true packages = [ # "dimlp", -# "dimlpfidex", + "dimlpfidex", # "fidex", # "fidexCommon", # "fidexGlo", "trainings", ] artifacts = [ - "dimlpfidex/*.so", - "dimlpfidex/*.pyd", - "dimlpfidex/*.dll", + "**/*.so", + "**/*.pyd", + "**/*.dll", ] [tool.hatch.build.targets.sdist] @@ -104,7 +104,7 @@ include = [ ] [tool.hatch.build.targets.sdist.force-include] -"build.py" = "build.py" +"buildcpp.py" = "buildcpp.py" "example.py" = "example.py" "CMakeLists.txt" = "CMakeLists.txt" ".clang-format" = ".clang-format"