Skip to content

Commit

Permalink
Add workaround for build.py script taking priority
Browse files Browse the repository at this point in the history
* Rename build.py to buildcpp.py so it does not interfer with
  `python -m build`, allowing the packaging to be done successfully.
  • Loading branch information
rmarquis committed Dec 22, 2023
1 parent 7895281 commit 5681bcf
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 9 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -55,4 +55,4 @@ jobs:
- name: Compile
run: |
python build.py
python buildcpp.py
2 changes: 1 addition & 1 deletion .github/workflows/package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
File renamed without changes.
12 changes: 6 additions & 6 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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]
Expand Down Expand Up @@ -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"
Expand Down

0 comments on commit 5681bcf

Please sign in to comment.