Skip to content

Commit 90ef546

Browse files
robertodrarnfinn
authored andcommitted
Fixes for installation (#121)
* Move around some CMake * Simplify CMake in include/ * Fix .gitattributes for include/ * Separate Python main from library * Fix .gitattributes * Consolidate Python-level data * Install YAPF on Travis * Remove one CMake file * Fix PYMOD_INSTALL_FULLDIR * Fix tests * Fix PCMSolverConfig.cmake.in * Update Gemfile.lock * Update default.nix * Remove possibly useless linker flag * Clean up tests CMakeLists.txt * More clean-up of CMakeLists.txt * Add PCMSolver_EXPORTS definition * Configure go_pcm.py * New install layout works with Psi4 * Final fixes to go_pcm.py * Minor fixes for formatting and licensing info * Update Pipfile.lock * Remove one custom CMake module
1 parent c562393 commit 90ef546

File tree

116 files changed

+1112
-740
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

116 files changed

+1112
-740
lines changed

.ci/Gemfile.lock

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@ GIT
88
GEM
99
remote: https://rubygems.org/
1010
specs:
11-
addressable (2.5.1)
12-
public_suffix (~> 2.0, >= 2.0.2)
11+
addressable (2.5.2)
12+
public_suffix (>= 2.0.2, < 4.0)
1313
claide (1.0.2)
1414
claide-plugins (0.9.2)
1515
cork
@@ -18,7 +18,7 @@ GEM
1818
colored2 (3.1.2)
1919
cork (0.3.0)
2020
colored2 (~> 3.1)
21-
danger (5.3.4)
21+
danger (5.5.10)
2222
claide (~> 1.0)
2323
claide-plugins (>= 0.9.2)
2424
colored2 (~> 3.1)
@@ -27,26 +27,28 @@ GEM
2727
faraday-http-cache (~> 1.0)
2828
git (~> 1)
2929
kramdown (~> 1.5)
30+
no_proxy_fix
3031
octokit (~> 4.7)
3132
terminal-table (~> 1)
3233
danger-commit_lint (0.0.6)
3334
danger (~> 5.0)
34-
danger-lgtm (0.2.0)
35+
danger-lgtm (1.0.0)
3536
danger-plugin-api (~> 1.0)
3637
danger-plugin-api (1.0.0)
3738
danger (> 2.0)
38-
faraday (0.13.0)
39+
faraday (0.14.0)
3940
multipart-post (>= 1.2, < 3)
4041
faraday-http-cache (1.3.1)
4142
faraday (~> 0.8)
4243
git (1.3.0)
43-
kramdown (1.14.0)
44+
kramdown (1.16.2)
4445
multipart-post (2.0.0)
4546
nap (1.1.0)
46-
octokit (4.7.0)
47+
no_proxy_fix (0.1.2)
48+
octokit (4.8.0)
4749
sawyer (~> 0.8.0, >= 0.5.3)
4850
open4 (1.3.4)
49-
public_suffix (2.0.5)
51+
public_suffix (3.0.2)
5052
sawyer (0.8.1)
5153
addressable (>= 2.3.5, < 2.6)
5254
faraday (~> 0.8, < 1.0)

.ci/ci_build.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
# The return code will capture an error from ANY of the functions in the pipe
44
set -euo pipefail
5-
cmake --build . -- --jobs=2 VERBOSE=1 | tee build.log | grep "Building"
5+
cmake --build . --target install -- --jobs=2 VERBOSE=1 | tee build.log | grep "Building\|Installing"
66
RESULT=$?
77

88
if [ $RESULT -eq 0 ]; then

.ci/report_versions.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
echo "Report versions of whole tool stack"
44

5-
for tool in cmake make ${PYTHON} ${CXX_COMPILER} ${C_COMPILER} ${Fortran_COMPILER}; do
5+
for tool in cmake make $CXX_COMPILER $C_COMPILER $Fortran_COMPILER; do
66
echo ""
77
echo "Checking version of $tool:"
88
$tool --version 2> /dev/null || echo "$tool not available"

.gitattributes

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,9 @@ tests/utils/*.cpp licensefile=.githooks/LICENSE-C++
7373
doc/conf.py licensefile=.githooks/LICENSE-Python
7474
doc/gfx/cloc_tools.py.in licensefile=.githooks/LICENSE-Python
7575
src/make_cmake_files.py licensefile=.githooks/LICENSE-Python
76-
tools/codata.py.in licensefile=.githooks/LICENSE-Python
77-
tools/pcmsolver.py.in licensefile=.githooks/LICENSE-Python
76+
tools/codata.py licensefile=.githooks/LICENSE-Python
7877
tools/plot_cavity.py licensefile=.githooks/LICENSE-Python
78+
tools/init.py licensefile=.githooks/LICENSE-Python
7979
tests/make_cmake_files.py licensefile=.githooks/LICENSE-Python
80+
tests/go_pcm.py licensefile=.githooks/LICENSE-Python
81+
tests/pcmparser.py licensefile=.githooks/LICENSE-Python

.travis.yml

Lines changed: 16 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ matrix:
3737
- C_COMPILER='gcc-4.6'
3838
- Fortran_COMPILER='gfortran-4.6'
3939
- BUILD_TYPE='release'
40-
- PYTHON='python2'
40+
- PYTHON='--two'
4141
- RUN_DANGER=false
4242
- os: linux
4343
addons:
@@ -56,7 +56,7 @@ matrix:
5656
- C_COMPILER='gcc-6'
5757
- Fortran_COMPILER='gfortran-6'
5858
- BUILD_TYPE='release'
59-
- PYTHON='python2'
59+
- PYTHON='--two'
6060
- STATIC='--static'
6161
- RUN_DANGER=false
6262
- os: linux
@@ -74,7 +74,7 @@ matrix:
7474
- C_COMPILER='clang'
7575
- Fortran_COMPILER='gfortran-4.6'
7676
- BUILD_TYPE='release'
77-
- PYTHON='python3'
77+
- PYTHON='--three'
7878
- RUN_DANGER=true
7979
- os: linux
8080
addons:
@@ -92,7 +92,7 @@ matrix:
9292
- C_COMPILER='gcc-4.8'
9393
- Fortran_COMPILER='gfortran-4.8'
9494
- BUILD_TYPE='debug'
95-
- PYTHON='python2'
95+
- PYTHON='--two'
9696
- COVERAGE='--coverage'
9797
- RUN_DANGER=false
9898
before_install:
@@ -101,22 +101,29 @@ before_install:
101101
- test -n $FC && unset FC
102102
install:
103103
- pip install --user pipenv --upgrade
104-
- pipenv install
104+
- pipenv $PYTHON install
105105
before_script:
106106
- source $(pipenv --venv)/bin/activate
107107
- ./.ci/report_versions.sh
108-
- cd ${TRAVIS_BUILD_DIR}
108+
- cd $TRAVIS_BUILD_DIR
109109
- echo 'Build set up summary'
110110
- |
111-
if [[ "${RUN_DANGER}" = true ]]; then
111+
if [[ "$RUN_DANGER" = true ]]; then
112112
bundle install --gemfile=.ci/Gemfile
113113
fi
114114
script:
115115
- |
116-
if [[ "${RUN_DANGER}" = true ]]; then
116+
if [[ "$RUN_DANGER" = true ]]; then
117117
BUNDLE_GEMFILE=.ci/Gemfile bundle exec danger --dangerfile=.ci/Dangerfile
118118
fi
119-
- python setup.py --cxx=${CXX_COMPILER} --cc=${C_COMPILER} --fc=${Fortran_COMPILER} --type=${BUILD_TYPE} ${STATIC} ${COVERAGE}
119+
- |
120+
python setup.py --cxx=$CXX_COMPILER \
121+
--cc=$C_COMPILER \
122+
--fc=$Fortran_COMPILER \
123+
--type=$BUILD_TYPE \
124+
$STATIC \
125+
$COVERAGE \
126+
--prefix=$HOME/Software/pcmsolver
120127
- cd build
121128
- ../.ci/ci_build.sh
122129
- travis_wait python ../.ci/ci_test.py ctest --output-on-failure --verbose --parallel 2

CHANGELOG.md

Lines changed: 48 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -7,21 +7,15 @@
77
- Double logarithmic scale for the integration of spherical diffuse
88
interfaces: much more stable than the previous version, allowing for
99
Runge-Kutta 4 integrator.
10+
- A new CMake module `options_wrappers.cmake` that adds new wrapper macros for
11+
the CMake `option` command.
1012

1113
### Fixed
1214

1315
- Bug in the diffuse interface Green's function. Contrary to the sharp
1416
interface case, it is wrong to remove the monopole, which becomes
1517
identically zero when the corresponding differential equation is
1618
solved in extreme cases (e.g. charge far away from the sphere).
17-
18-
### Added
19-
20-
- A new CMake module `options_wrappers.cmake` that adds new wrapper macros for
21-
the CMake `option` command.
22-
23-
### Fixed
24-
2519
- Visibility of symbols in the shared library is _finally_ handled properly.
2620
The necessary flags to the C++ compiler were not set for the subtargets built
2721
as CMake `OBJECT` libraries. This results in a modest decrease in library
@@ -33,12 +27,58 @@
3327
`<install_prefix>/lib64` (or `<install_prefix>/lib`) as path to `libpcm.so.1`.
3428
- Code coverage analysis was restored. We now use
3529
[Codecov](https://codecov.io). Thanks @arnfinn :tada:
30+
- **BREAKING CHANGE** The layout of the installation for the Python scripts has
31+
been changed. This addresses issue #116. Given the user-defined installation
32+
prefix (`<prefix>`) one would obtain:
33+
```
34+
<prefix>/pcmsolver
35+
├── bin
36+
│   ├── go_pcm.py
37+
│   ├── plot_cavity.py
38+
│   └── run_pcm
39+
├── include
40+
│   └── PCMSolver
41+
│   ├── bi_operators
42+
│   ├── cavity
43+
│   ├── Citation.hpp
44+
│   ├── Config.hpp
45+
│   ├── Cxx11Workarounds.hpp
46+
│   ├── ErrorHandling.hpp
47+
│   ├── external
48+
│   ├── GitInfo.hpp
49+
│   ├── green
50+
│   ├── interface
51+
│   ├── LoggerInterface.hpp
52+
│   ├── PCMInput.h
53+
│   ├── PCMSolverExport.h
54+
│   ├── pcmsolver.h
55+
│   ├── PhysicalConstants.hpp
56+
│   ├── solver
57+
│   ├── STLUtils.hpp
58+
│   ├── TimerInterface.hpp
59+
│   └── utils
60+
├── lib64
61+
│   ├── libpcm.a
62+
│   ├── libpcm.so -> libpcm.so.1
63+
│   ├── libpcm.so.1
64+
│   └── python
65+
│   └── pcmsolver
66+
└── share
67+
└── cmake
68+
└── PCMSolver
69+
```
3670

3771
### Changed
3872

3973
- As a result of the visibility change, unit tests can only be linked against
4074
the static library, since all symbols are always visible in a static archive
4175
library.
76+
- **BREAKING CHANGE** The `pcmsolver.py` script/module **was removed** to
77+
address issues #111 and #112. The `main` portion of the script has now been
78+
separated into a `go_pcm.py` script which can be used in the same way as
79+
`pcmsolver.py` was used before: to parse the PCMSolver input and to run the
80+
module standalone. This separation greatly simplifies the use as a module
81+
within the Python launcher scripts of host programs.
4282

4383
## [Version 1.1.12] - 2018-01-20
4484

CMakeLists.txt

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -38,17 +38,14 @@ include(autocmake_int64)
3838
include(autocmake_omp)
3939
include(autocmake_safeguards)
4040
include(autocmake_python_interpreter)
41+
include(version)
42+
include(autocmake_git_info)
4143
include(pcmsolver)
4244
include(api)
43-
include(autocmake_git_info)
4445
include(autocmake_boost)
45-
include(version)
4646
include(static_library)
47-
include(catch)
4847
include(eigen)
4948
include(libtaylor)
5049
include(zlib)
51-
include(autogenerated)
52-
include(export)
5350
include(autocmake_src)
5451
include(test)

0 commit comments

Comments
 (0)