Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add an example for setup_pytest #55

Open
jorgehatccrma opened this issue Oct 11, 2016 · 2 comments
Open

Add an example for setup_pytest #55

jorgehatccrma opened this issue Oct 11, 2016 · 2 comments

Comments

@jorgehatccrma
Copy link

This is not an issue, but a question.

I'm trying to use add_pytest, but I can't understand what py.test.sh is (the second argument to pass to setup_pytest). An example of that file would be very helpful.

Cheers!

@mdavezac
Copy link

It's a path to a bash script that is created by the function. It sets up the python environment to read package that are downloaded as part of the build process (for instance pytest, if it is not installed globally).

You're right, it needs an example :)

In fact, it should have a default value and be hidden from casual users.

For now, you could look here: https://github.com/basp-group/sopt/blob/master/cmake_files/python_dependencies.cmake

At the end of the file, we setup the pytest part of the environment.

@mdavezac mdavezac changed the title py.test.sh ? Add an example for setup_pytest Oct 12, 2016
@fredRos
Copy link
Contributor

fredRos commented Mar 24, 2017

I also ran into problems due to the scarce documentation. I haven't checked if the first argument is right (probably isn't) because I didn't get to install yet. But py.test.sh needs to have a directory

setup_pytest("${CMAKE_CURRENT_BINARY_DIR}" "py.test.sh")

I get

CMake Error at /home/beaujean/software/GreatCMakeCookOff/scripts/EnvironmentScript.cmake:123 (file):
file COPY given no DESTINATION

but with

setup_pytest("${CMAKE_CURRENT_BINARY_DIR}" "${CMAKE_CURRENT_BINARY_DIR}/py.test.sh")

it works

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants