Skip to content

Commit

Permalink
Merge pull request #73 from scikit-build/59-bundle-cmake-files
Browse files Browse the repository at this point in the history
Relocate CMake modules to facilitate re-use. See #59
  • Loading branch information
jcfr committed Jul 18, 2016
2 parents 20404b3 + 962c877 commit cd09c23
Show file tree
Hide file tree
Showing 12 changed files with 13 additions and 18 deletions.
7 changes: 5 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
.PHONY: clean-pyc clean-build docs clean
.PHONY: clean-pyc clean-build clean-skbuild docs clean

help:
@echo "$(MAKE) [target]"
Expand All @@ -15,7 +15,7 @@ help:
@echo " dist - package"
@echo

clean: clean-build clean-pyc
clean: clean-build clean-pyc clean-skbuild
rm -fr htmlcov/

clean-build:
Expand All @@ -28,6 +28,9 @@ clean-pyc:
find . -name '*.pyo' -exec rm -f {} +
find . -name '*~' -exec rm -f {} +

clean-skbuild:
find tests/samples/*/_skbuild/ -type d -exec rm -rf {} +

lint:
flake8 skbuild tests

Expand Down
7 changes: 6 additions & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,15 @@
author='The scikit-build team',
author_email='scikit-build@googlegroups.com',
url='https://github.com/scikit-build/scikit-build',
packages=['skbuild', 'skbuild.platform_specifics', 'skbuild.command'],
packages=[
'skbuild',
'skbuild.platform_specifics',
'skbuild.command',
],
package_dir={'skbuild': 'skbuild',
'skbuild.platform_specifics': 'skbuild/platform_specifics',
'skbuild.command': 'skbuild/command'},
package_data={'skbuild': ['resources/cmake/*.cmake']},
include_package_data=True,
install_requires=requirements,
license="MIT",
Expand Down
2 changes: 2 additions & 0 deletions skbuild/cmaker.py
Original file line number Diff line number Diff line change
Expand Up @@ -242,6 +242,8 @@ def configure(self, clargs=(), generator_id=None):
'-DPYTHON_INCLUDE_DIR:PATH=' + python_include_dir,
'-DPYTHON_LIBRARY:FILEPATH=' + python_library,
'-DSKBUILD:BOOL=TRUE',
"-DCMAKE_MODULE_PATH:PATH={}".format(
os.path.dirname(__file__) + '/resources/cmake')
]

cmd.extend(clargs)
Expand Down
File renamed without changes.
File renamed without changes.
3 changes: 0 additions & 3 deletions tests/samples/fail-outside-project-root/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,5 @@ cmake_minimum_required(VERSION 3.5.0)

project(fail_outside_project_root)

set(CMAKE_MODULE_PATH
${CMAKE_MODULE_PATH} ${CMAKE_CURRENT_SOURCE_DIR}/../cmake-files)

install(FILES dummy DESTINATION ..)

3 changes: 0 additions & 3 deletions tests/samples/hello-cython/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,6 @@ project(hello_cython)
include(CTest)
enable_testing()

set(CMAKE_MODULE_PATH
${CMAKE_MODULE_PATH} ${CMAKE_CURRENT_SOURCE_DIR}/../cmake-files)

find_package(PythonInterp REQUIRED)
find_package(PythonLibs REQUIRED)
find_package(PythonExtensions REQUIRED)
Expand Down
3 changes: 0 additions & 3 deletions tests/samples/hello/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,6 @@ project(hello)
include(CTest)
enable_testing()

set(CMAKE_MODULE_PATH
${CMAKE_MODULE_PATH} ${CMAKE_CURRENT_SOURCE_DIR}/../cmake-files)

find_package(PythonInterp REQUIRED)
find_package(PythonLibs REQUIRED)
find_package(PythonExtensions REQUIRED)
Expand Down
3 changes: 0 additions & 3 deletions tests/samples/pen2-cython/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,6 @@ project(pen2_cython)
include(CTest)
enable_testing()

set(CMAKE_MODULE_PATH
${CMAKE_MODULE_PATH} ${CMAKE_CURRENT_SOURCE_DIR}/../cmake-files)

find_package(PythonInterp REQUIRED)
find_package(PythonLibs REQUIRED)
find_package(PythonExtensions REQUIRED)
Expand Down
3 changes: 0 additions & 3 deletions tests/samples/tower-of-babel/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,6 @@ project(tower_of_babel)
include(CTest)
enable_testing()

set(CMAKE_MODULE_PATH
${CMAKE_MODULE_PATH} ${CMAKE_CURRENT_SOURCE_DIR}/../cmake-files)

find_package(PythonInterp REQUIRED)
find_package(PythonLibs REQUIRED)
find_package(PythonExtensions REQUIRED)
Expand Down

0 comments on commit cd09c23

Please sign in to comment.