Skip to content

Commit

Permalink
Merge pull request #1748 from bennibbelink/cleanup-dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
gonuke committed May 18, 2024
2 parents 7768ed9 + 7191318 commit 4894eb4
Show file tree
Hide file tree
Showing 8 changed files with 26 additions and 220 deletions.
4 changes: 3 additions & 1 deletion CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,9 @@ Since last release
**Changed:**

* Changed README.rst installation instructions, tested on fresh Ubuntu-22.04 system with Python3.11 (#1744)
* Rely on `python3` in environment instead of `python` (#1747)
* Rely on ``python3`` in environment instead of ``python`` (#1747)
* Remove ``pandas`` as build dependency (#1748)
* Consistently use hyphens in ``install.py`` flags (#1748)

**Removed:**

Expand Down
20 changes: 10 additions & 10 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -175,15 +175,16 @@ IF(NOT CYCLUS_DOC_ONLY)

FIND_PACKAGE(LibXml2 REQUIRED)
ADD_DEFINITIONS(${LIBXML2_DEFINITIONS})
SET(LIBS ${LIBS} ${LIBXML2_LIBRARIES})
SET(LIBS ${LIBS} LibXml2::LibXml2)
message("-- LibXML2 Include Dir: ${LIBXML2_INCLUDE_DIR}")
message("-- LibXML2 Libraries: ${LIBXML2_LIBRARIES}")

# Then use pkg-config for locate specific package
pkg_check_modules(LIBXMLXX IMPORTED_TARGET libxml++-4.0)
IF ( NOT LIBXMLXX_LIBRARIES )
IF ( NOT LIBXMLXX_FOUND )
pkg_check_modules(LIBXMLXX REQUIRED IMPORTED_TARGET libxml++-2.6)
ENDIF ( NOT LIBXMLXX_LIBRARIES )
SET(LIBS ${LIBS} ${LIBXMLXX_LIBRARIES})
ENDIF ( NOT LIBXMLXX_FOUND )
SET(LIBS ${LIBS} PkgConfig::LIBXMLXX)
message("-- LibXML++ Include Dir: ${LIBXMLXX_INCLUDE_DIRS}")
message("-- LibXML++ Libraries: ${LIBXMLXX_LIBRARIES}")

Expand Down Expand Up @@ -261,11 +262,11 @@ IF(NOT CYCLUS_DOC_ONLY)
ENDIF(GFORTRAN_LIBRARIES)

# openblas
FIND_LIBRARY(OPENBLAS_LIBRARIES openblas ${DEPS_LIB_HINTS})
MESSAGE("-- Found OPENBLAS Libraries (optional): ${OPENBLAS_LIBRARIES}")
IF(OPENBLAS_LIBRARIES)
set(LIBS ${LIBS} ${OPENBLAS_LIBRARIES})
ENDIF(OPENBLAS_LIBRARIES)
FIND_LIBRARY(BLAS_LIBRARIES blas ${DEPS_LIB_HINTS})
MESSAGE("-- Found BLAS Libraries (optional): ${BLAS_LIBRARIES}")
IF(BLAS_FOUND)
set(LIBS ${LIBS} ${BLAS_LIBRARIES})
ENDIF(BLAS_FOUND)

# ClpSolver
FIND_LIBRARY(CLPSOLVER_LIBRARIES ClpSolver ${DEPS_LIB_HINTS})
Expand Down Expand Up @@ -331,7 +332,6 @@ IF(NOT CYCLUS_DOC_ONLY)
include(UseCython)
find_package (Python3 REQUIRED COMPONENTS NumPy)
find_package(Jinja2 REQUIRED)
find_package(Pandas REQUIRED)

# With CMake, a clean separation can be made between the source tree and the
# build tree. When all source is compiled, as with pure C/C++, the source is
Expand Down
14 changes: 7 additions & 7 deletions INSTALL.rst
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ flags:
* - ``-h, --help``
- show the help message and exit

* - ``--build_dir BUILD_DIR``
* - ``--build-dir BUILD_DIR``
- where to place the build directory

* - ``--uninstall``
Expand Down Expand Up @@ -103,19 +103,19 @@ flags:
* - ``--test``
- run tests after building

* - ``--coin_root COIN_ROOT``
* - ``--coin-root COIN_ROOT``
- the relative path to the Coin-OR libraries directory

* - ``--boost_root BOOST_ROOT``
* - ``--boost-root BOOST_ROOT``
- the relative path to the Boost libraries directory

* - ``--hdf5_root HDF5_ROOT``
* - ``--hdf5-root HDF5_ROOT``
- the path to the HDF5 libraries directory

* - ``--cmake_prefix_path CMAKE_PREFIX_PATH``
* - ``--cmake-prefix-path CMAKE_PREFIX_PATH``
- the cmake prefix path for use with FIND_PACKAGE, FIND_PATH, FIND_PROGRAM, or FIND_LIBRARY macros

* - ``--build_type BUILD_TYPE``
* - ``--build-type BUILD_TYPE``
- change the CMAKE_BUILD_TYPE

* - ``-D VAR``
Expand All @@ -128,7 +128,7 @@ installation flag. The otherwise identical process would look like:

.. code-block:: bash
.../cyclus$ python3 install.py --coin_root=path/to/coin
.../cyclus$ python3 install.py --coin-root=path/to/coin
CMake Cyclus Installation
Expand Down
16 changes: 0 additions & 16 deletions cmake/FindPandas.cmake

This file was deleted.

100 changes: 0 additions & 100 deletions cmake/LibFindMacros.cmake

This file was deleted.

81 changes: 0 additions & 81 deletions cmake/SelectLibraryConfigurations.cmake

This file was deleted.

3 changes: 2 additions & 1 deletion docker/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,8 @@ ARG make_cores=2
COPY . /cyclus
WORKDIR /cyclus

RUN python3 install.py -j ${make_cores} --allow-milps --code_coverage
RUN python3 install.py -j ${make_cores} --allow-milps --code-coverage

ENV PATH /root/.local/bin:$PATH
ENV LD_LIBRARY_PATH /root/.local/lib:/root/.local/lib/cyclus
RUN lcov -c -d /cyclus -o initial_coverage.info --gcov-tool ${GCOV} --initial --no-external && \
Expand Down
8 changes: 4 additions & 4 deletions install.py
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ def main():
parser = ap.ArgumentParser(description=description)

build_dir = 'where to place the build directory'
parser.add_argument('--build_dir', help=build_dir, default='build')
parser.add_argument('--build-dir', help=build_dir, default='build')

uninst = 'uninstall'
parser.add_argument('--uninstall', action='store_true', help=uninst, default=False)
Expand Down Expand Up @@ -175,7 +175,7 @@ def main():
parser.add_argument('--coin-root', '--coin_root', help=coin)

boost = "the relative path to the Boost libraries directory"
parser.add_argument('--boost_root', help=boost)
parser.add_argument('--boost-root', help=boost)

hdf5 = "the path to the HDF5 libraries directory"
parser.add_argument('--hdf5_root', help=hdf5)
Expand All @@ -185,7 +185,7 @@ def main():

cmake_prefix_path = "the cmake prefix path for use with FIND_PACKAGE, " + \
"FIND_PATH, FIND_PROGRAM, or FIND_LIBRARY macros"
parser.add_argument('--cmake_prefix_path', help=cmake_prefix_path)
parser.add_argument('--cmake-prefix-path', help=cmake_prefix_path)

build_type = "the CMAKE_BUILD_TYPE"
parser.add_argument('--build-type', '--build_type', help=build_type,
Expand All @@ -201,7 +201,7 @@ def main():
'when dealing with build system issues.')

code_coverage = "Enable code coverage analysis using gcov/lcov"
parser.add_argument('--code_coverage', help=code_coverage, default=False, action="store_true")
parser.add_argument('--code-coverage', help=code_coverage, default=False, action="store_true")

parser.add_argument('--fast', default=None, dest='fast',
action='store_true', help="Will try to compile "
Expand Down

0 comments on commit 4894eb4

Please sign in to comment.