Skip to content

Commit fad8bde

Browse files
committed
Create a C++-only version of the app4triqs skeleton
1 parent f9ab2d1 commit fad8bde

19 files changed

+10
-261
lines changed

CMakeLists.txt

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -62,9 +62,6 @@ if(NOT IS_SUBPROJECT)
6262
message(STATUS "-------- BUILD-TYPE: ${CMAKE_BUILD_TYPE} --------")
6363
endif()
6464

65-
# Python Support
66-
option(PythonSupport "Build with Python support" ON)
67-
6865
# Documentation
6966
option(Build_Documentation "Build documentation" OFF)
7067

@@ -131,11 +128,6 @@ if(Build_Tests)
131128
add_subdirectory(test)
132129
endif()
133130

134-
# Python
135-
if(PythonSupport)
136-
add_subdirectory(python/${PROJECT_NAME})
137-
endif()
138-
139131
# Docs
140132
if(Build_Documentation)
141133
add_subdirectory(doc)

README.md

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ To adapt this skeleton for a new TRIQS application, the following steps are nece
1212
* Run the following commands in order after replacing **appname** accordingly
1313

1414
```bash
15-
git clone https://github.com/triqs/app4triqs --branch unstable appname
15+
git clone https://github.com/triqs/app4triqs --branch cpp_only appname
1616
cd appname
1717
./share/squash_history.sh
1818
./share/replace_and_rename.py appname
@@ -36,7 +36,7 @@ You can merge future changes to the app4triqs skeleton into your project with th
3636

3737
```bash
3838
git remote update
39-
git merge app4triqs_remote/unstable -m "Merge latest app4triqs skeleton changes"
39+
git merge app4triqs_remote/cpp_only -m "Merge latest app4triqs skeleton changes"
4040
```
4141

4242
If you should encounter any conflicts resolve them and `git commit`.
@@ -56,9 +56,6 @@ according to your needs (replace app4triqs in the following by the name of your
5656
* Adjust or remove the `README.md` and `doc/ChangeLog.md` file
5757
* In the `c++/app4triqs` subdirectory adjust the example files `app4triqs.hpp` and `app4triqs.cpp` or add your own source files.
5858
* In the `test/c++` subdirectory adjust the example test `basic.cpp` or add your own tests.
59-
* In the `python/app4triqs` subdirectory add your Python source files.
60-
Be sure to remove the `app4triqs_module_desc.py` file unless you want to generate a Python module from your C++ source code.
61-
* In the `test/python` subdirectory adjust the example test `Basic.py` or add your own tests.
6259
* Adjust any documentation examples given as `*.rst` files in the doc directory.
6360
* Adjust the sphinx configuration in `doc/conf.py.in` as necessary.
6461
* The build and install process is identical to the one outline [here](https://triqs.github.io/app4triqs/unstable/install.html).

c++/app4triqs/app4triqs.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ namespace app4triqs {
1919
void h5_write(h5::group grp, std::string subgroup_name, toto const &m) {
2020
grp = subgroup_name.empty() ? grp : grp.create_group(subgroup_name);
2121
h5_write(grp, "i", m.i);
22-
h5_write_attribute(grp, "TRIQS_HDF5_data_scheme", toto::hdf5_format());
22+
h5_write_attribute(grp, "Format", toto::hdf5_format());
2323
}
2424

2525
void h5_read(h5::group grp, std::string subgroup_name, toto &m) {

deps/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ else()
4848
endif()
4949

5050
# -- Cpp2Py --
51-
if(PythonSupport OR Build_Documentation)
51+
if(Build_Documentation)
5252
external_dependency(Cpp2Py
5353
GIT_REPO https://github.com/TRIQS/cpp2py
5454
VERSION 2.0

doc/CMakeLists.txt

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -60,12 +60,6 @@ add_custom_command(
6060

6161
option(Sphinx_Only "When building the documentation, skip the Python Modules and the generation of C++ Api and example outputs" OFF)
6262
if(NOT Sphinx_Only)
63-
# Autodoc usage requires the python modules to be built first
64-
get_property(CPP2PY_MODULES_LIST GLOBAL PROPERTY CPP2PY_MODULES_LIST)
65-
if(CPP2PY_MODULES_LIST)
66-
add_dependencies(${PROJECT_NAME}_docs_sphinx ${CPP2PY_MODULES_LIST})
67-
endif()
68-
6963
# Generation of C++ Api and Example Outputs
7064
add_dependencies(${PROJECT_NAME}_docs_sphinx ${PROJECT_NAME}_docs_cpp2rst ${PROJECT_NAME}_docs_example_output)
7165
endif()

doc/documentation.rst

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -28,14 +28,3 @@ C++ reference manual
2828
:maxdepth: 5
2929

3030
cpp2rst_generated/contents
31-
32-
Python reference manual
33-
-----------------------
34-
35-
.. automodule:: app4triqs
36-
:members:
37-
38-
.. autoclass:: app4triqs.app4triqs_module.Toto
39-
:members:
40-
41-
.. autofunction:: app4triqs.app4triqs_module.chain

packaging/conda/build.sh

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@ export OMPI_MCA_rmaps_base_oversubscribe=yes
1010
export OMPI_MCA_btl_vader_single_copy_mechanism=none
1111
mpiexec="mpiexec --allow-run-as-root"
1212

13+
source $PREFIX/share/triqsvars.sh
14+
1315
cmake \
1416
-DCMAKE_INSTALL_PREFIX=$PREFIX \
1517
-DCMAKE_BUILD_TYPE=Release \

packaging/conda/meta.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,12 +19,16 @@ requirements:
1919
- {{ compiler('c') }}
2020
- {{ compiler('cxx') }}
2121
host:
22+
- triqs {{ '.'.join(version.split('.')[:2]) }}
23+
- boost-cpp
2224
- hdf5
2325
- {{ mpi }}
2426
- libblas
2527
- liblapack
2628
- python
2729
run:
30+
- {{ pin_compatible("triqs", max_pin="x.x") }}
31+
- boost-cpp
2832
- hdf5
2933
- {{ mpi }}
3034
- libblas

python/app4triqs/CMakeLists.txt

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

python/app4triqs/__init__.py

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

python/app4triqs/app4triqs_module_desc.py

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

python/app4triqs/version.py.in

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

share/CMakeLists.txt

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,6 @@ add_subdirectory(cmake)
22

33
if(NOT IS_SUBPROJECT)
44

5-
if(PythonSupport)
6-
set(EXPORT_PYTHON_PATH "export PYTHONPATH=${CMAKE_INSTALL_PREFIX}/${CPP2PY_PYTHON_LIB_DEST_ROOT}:$PYTHONPATH")
7-
set(MODFILE_PYTHON_PATH "prepend-path PYTHONPATH $root/${CPP2PY_PYTHON_LIB_DEST_ROOT}")
8-
endif()
9-
105
configure_file(${PROJECT_NAME}.modulefile.in ${PROJECT_NAME}.modulefile @ONLY)
116
configure_file(${PROJECT_NAME}vars.sh.in ${PROJECT_NAME}vars.sh @ONLY)
127

share/app4triqs.modulefile.in

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,4 +32,3 @@ prepend-path CPLUS_INCLUDE_PATH $root/include
3232
prepend-path LIBRARY_PATH $root/lib
3333
prepend-path LD_LIBRARY_PATH $root/lib
3434
prepend-path CMAKE_PREFIX_PATH $root
35-
@MODFILE_PYTHON_PATH@

share/app4triqsvars.sh.in

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,4 +7,3 @@ export PATH=@CMAKE_INSTALL_PREFIX@/bin:$PATH
77
export LIBRARY_PATH=@CMAKE_INSTALL_PREFIX@/lib:$LIBRARY_PATH
88
export LD_LIBRARY_PATH=@CMAKE_INSTALL_PREFIX@/lib:$LD_LIBRARY_PATH
99
export CMAKE_PREFIX_PATH=@CMAKE_INSTALL_PREFIX@:$CMAKE_PREFIX_PATH
10-
@EXPORT_PYTHON_PATH@

share/cmake/app4triqs-config.cmake.in

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,4 @@ message(STATUS "Found @PROJECT_NAME@-config.cmake with version @PROJECT_VERSION@
3131
# Was the Project built with Documentation?
3232
set(@PROJECT_NAME@_WITH_DOCUMENTATION @Build_Documentation@ CACHE BOOL "Was @PROJECT_NAME@ build with documentation?")
3333

34-
# Was the Project built with PythonSupport?
35-
set(@PROJECT_NAME@_WITH_PYTHON_SUPPORT @PythonSupport@ CACHE BOOL "Was @PROJECT_NAME@ build with python support?")
36-
3734
endif()

test/CMakeLists.txt

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1 @@
11
add_subdirectory(c++)
2-
3-
if(PythonSupport)
4-
add_subdirectory(python)
5-
endif()

test/python/Basic.py

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

test/python/CMakeLists.txt

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

0 commit comments

Comments
 (0)