Skip to content

Commit

Permalink
Merge pull request #38 from gnikit/build/directory-cleanup
Browse files Browse the repository at this point in the history
build/directory cleanup
  • Loading branch information
gnikit authored May 8, 2024
2 parents 7e34abb + cd4263e commit 047f10c
Show file tree
Hide file tree
Showing 13 changed files with 17 additions and 14 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
build/
venv/
.venv/
dist/
_skbuild/
__pycache__/
Expand Down
7 changes: 4 additions & 3 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -45,12 +45,13 @@ set_target_properties(mmgs_exe
IMPORTED_LOCATION ${MMGS_NAME}
)

set(PYMMG_DIR ${CMAKE_INSTALL_PREFIX}/src/pymmg)
install(IMPORTED_RUNTIME_ARTIFACTS mmgs_exe
RUNTIME DESTINATION ${CMAKE_INSTALL_PREFIX}/src/mmgs
RUNTIME DESTINATION ${PYMMG_DIR}/mmgs
)
install(IMPORTED_RUNTIME_ARTIFACTS mmg2d_exe
RUNTIME DESTINATION ${CMAKE_INSTALL_PREFIX}/src/mmg2d
RUNTIME DESTINATION ${PYMMG_DIR}/mmg2d
)
install(IMPORTED_RUNTIME_ARTIFACTS mmg3d_exe
RUNTIME DESTINATION ${CMAKE_INSTALL_PREFIX}/src/mmg3d
RUNTIME DESTINATION ${PYMMG_DIR}/mmg3d
)
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,17 +56,17 @@ pip install pymmg
### Surface remeshing

```bash
python -m mmgs input.mesh output.mesh
mmgs input.mesh output.mesh
```

### Volume remeshing

```bash
python -m mmg3d input.mesh output.mesh
mmg3d input.mesh output.mesh
```

### 2D remeshing

```bash
python -m mmg2d input.mesh output.mesh
mmg2d input.mesh output.mesh
```
4 changes: 2 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[build-system]
requires = [
"setuptools>=42",
"setuptools>=61",
"scikit-build>=0.13",
"cmake>=3.18",
"ninja",
Expand Down Expand Up @@ -44,7 +44,7 @@ Dicsussions = "https://forum.mmgtools.org/"
all = ["meshio[all]"]

[tool.setuptools_scm]
write_to = "src/general/_version.py"
write_to = "src/pymmg/general/_version.py"

[tool.cibuildwheel]
build = "cp311-*" # build wheels only for one Python version
Expand Down
6 changes: 3 additions & 3 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@
package_dir={"": "src"},
entry_points={
"console_scripts": [
"mmgs=mmgs:main",
"mmg2d=mmg2d:main",
"mmg3d=mmg3d:main",
"mmgs=pymmg.mmgs:main",
"mmg2d=pymmg.mmg2d:main",
"mmg3d=pymmg.mmg3d:main",
],
},
cmake_with_sdist=True,
Expand Down
Empty file added src/pymmg/__init__.py
Empty file.
1 change: 1 addition & 0 deletions src/general/__init__.py → src/pymmg/general/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,7 @@ def get_medit_filename(arg_type: str, args: list[str]):


def run_mmg(binary: Path, args: list[str]):
print("@@@Running:", binary, *args)
if platform.system() == "Windows":
binary = binary.with_suffix(".exe")
else:
Expand Down
2 changes: 1 addition & 1 deletion src/mmg2d/__init__.py → src/pymmg/mmg2d/__init__.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import sys
from pathlib import Path

from general import intercept_io_and_run
from pymmg.general import intercept_io_and_run


def main():
Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion src/mmg3d/__init__.py → src/pymmg/mmg3d/__init__.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import sys
from pathlib import Path

from general import intercept_io_and_run
from pymmg.general import intercept_io_and_run


def main():
Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion src/mmgs/__init__.py → src/pymmg/mmgs/__init__.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import sys
from pathlib import Path

from general import intercept_io_and_run
from pymmg.general import intercept_io_and_run


def main():
Expand Down
File renamed without changes.

0 comments on commit 047f10c

Please sign in to comment.