Skip to content

Commit 1c6738a

Browse files
committed
fix(Library): update names
BREAKING CHANGE: new library name
1 parent 122dd62 commit 1c6738a

File tree

10 files changed

+22
-148
lines changed

10 files changed

+22
-148
lines changed

.github/workflows/CI.yml

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,14 @@ name: CI
22

33
on:
44
push:
5-
schedule:
6-
- cron: 0 0 * * *
75

86
jobs:
7+
pip:
8+
uses: Geode-solutions/actions/.github/workflows/upgrade-pip.yml@master
9+
secrets: inherit
10+
911
format:
12+
needs: pip
1013
uses: Geode-solutions/actions/.github/workflows/format.yml@master
1114
secrets: inherit
1215

@@ -48,6 +51,6 @@ jobs:
4851
secrets: inherit
4952

5053
semantic-release:
51-
needs: [build-linux, build-linux-python, build-windows]
54+
needs: [build-linux, build-linux-python, build-windows, build-windows-python]
5255
uses: Geode-solutions/actions/.github/workflows/release.yml@master
5356
secrets: inherit

CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ option(OPENGEODE_MYMODULE_WITH_TESTS "Compile test projects" ON)
2929
option(OPENGEODE_MYMODULE_WITH_PYTHON "Compile Python bindings" OFF)
3030

3131
# Get MyModule dependencies
32-
find_package(OpenGeode REQUIRED)
32+
find_package(OpenGeode REQUIRED CONFIG)
3333

3434
#------------------------------------------------------------------------------------------------
3535
# Configure the MyModule libraries

bindings/python/CMakeLists.txt

Lines changed: 8 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -24,27 +24,12 @@ if(OPENGEODE_MYMODULE_WITH_TESTS)
2424
add_subdirectory(tests)
2525
endif()
2626

27-
configure_file(
28-
__init__.py
29-
${PROJECT_BINARY_DIR}/wheel/opengeode_mymodule/__init__.py
30-
)
31-
configure_file(
32-
mylib.py
33-
${PROJECT_BINARY_DIR}/wheel/opengeode_mymodule/mylib.py
34-
)
35-
configure_file(
36-
setup.py
37-
${PROJECT_BINARY_DIR}/wheel/setup.py
38-
)
39-
execute_process(
40-
COMMAND ${PYTHON_EXECUTABLE} -m pip install --user -r requirements.txt
41-
WORKING_DIRECTORY ${CMAKE_CURRENT_LIST_DIR}
42-
)
43-
add_custom_target(wheel
44-
COMMAND ${CMAKE_COMMAND}
45-
-DSOURCE_DIR="${CMAKE_BINARY_DIR}"
46-
-DDEST_DIR="${CMAKE_BINARY_DIR}/wheel/opengeode_mymodule"
47-
-P "${CMAKE_CURRENT_LIST_DIR}/copy_wheel.cmake"
48-
COMMAND ${PYTHON_EXECUTABLE} setup.py bdist_wheel
49-
WORKING_DIRECTORY ${PROJECT_BINARY_DIR}/wheel
27+
add_geode_python_wheel(
28+
NAME "OpenGeode-core"
29+
DESCRIPTION
30+
"Open source framework for representing and manipulating geometric models"
31+
MODULES
32+
"mylib.py"
33+
LICENSE "MIT"
5034
)
35+

bindings/python/__init__.py

Lines changed: 0 additions & 22 deletions
This file was deleted.

bindings/python/copy_wheel.cmake

Lines changed: 0 additions & 31 deletions
This file was deleted.

bindings/python/mylib.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,5 +4,5 @@
44

55
import opengeode
66

7-
from .opengeode_mymodule_py_mylib import *
8-
MyModuleMyLib.initialize()
7+
from opengeode_mymodule_py_mylib import *
8+
MyModuleMyLibLibrary.initialize()

bindings/python/requirements.in

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
OpenGeode-core

bindings/python/setup.py

Lines changed: 0 additions & 63 deletions
This file was deleted.

bindings/python/src/mylib/mylib.cpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,8 @@
2828
PYBIND11_MODULE( opengeode_mymodule_py_mylib, module )
2929
{
3030
module.doc() = "OpenGeode-ModuleTemplate Python binding for mylib";
31-
pybind11::class_< mymodule::MyModuleMyLib >( module, "MyModuleMyLib" )
32-
.def( "initialize", &mymodule::MyModuleMyLib::initialize );
31+
pybind11::class_< mymodule::MyModuleMyLibLibrary >(
32+
module, "MyModuleMyLibLibrary" )
33+
.def( "initialize", &mymodule::MyModuleMyLibLibrary::initialize );
3334
module.def( "hello_world", &mymodule::hello_world );
3435
}

tests/mylib/test-hello-world.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ int main()
3030
{
3131
try
3232
{
33-
mymodule::MyModuleMyLib::initialize();
33+
mymodule::MyModuleMyLibLibrary::initialize();
3434
OPENGEODE_EXCEPTION(
3535
mymodule::hello_world(), "[Test] Hello World is not correct" );
3636

0 commit comments

Comments
 (0)