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 pep8 master #1303

Merged
merged 4 commits into from
May 14, 2015
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CMake/cdat_modules/pep8_deps.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
set(pep8_deps ${python_pkg} ${setuptools_pkg})
16 changes: 16 additions & 0 deletions CMake/cdat_modules/pep8_external.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# The pep8 project

set(pep8_binary "${CMAKE_CURRENT_BINARY_DIR}/build/pep8")

ExternalProject_Add(pep8
DOWNLOAD_DIR ${CMAKE_CURRENT_BINARY_DIR}
SOURCE_DIR ${pep8_binary}
URL ${PEP8_SOURCE}
URL_MD5 ${PEP8_MD5}
BUILD_IN_SOURCE 1
CONFIGURE_COMMAND ""
BUILD_COMMAND ${PYTHON_EXECUTABLE} setup.py build
INSTALL_COMMAND ${PYTHON_EXECUTABLE} setup.py install ${PYTHON_EXTRA_PREFIX}
DEPENDS ${pep8_deps}
${ep_log_options}
)
16 changes: 16 additions & 0 deletions CMake/cdat_modules/pep8_pkg.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
set( PEP8_MAJOR 1 )
set( PEP8_MINOR 6 )
set( PEP8_PATCH 2)
set( PEP8_VERSION ${PEP8_MAJOR}.${PEP8_MINOR}.${PEP8_PATCH} )
set( PEP8_URL ${LLNL_URL} )
set( PEP8_GZ pep8-${PEP8_VERSION}.tar.gz )
set( PEP8_MD5 c7a3f57d832484a6295164661fbb1335 )

set (nm PEP8)
string(TOUPPER ${nm} uc_nm)
set(${uc_nm}_VERSION ${${nm}_MAJOR}.${${nm}_MINOR}.${${nm}_PATCH})
set(PEP8_SOURCE ${PEP8_URL}/${PEP8_GZ})

if (BUILD_TESTING)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

do we turn on build testing? is it on by default?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It is on by default.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We can turn it OFF by default but I think its mostly us (developers) building it for now.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

if we turn it off, does that means ctest will not work? If so, leaving it ON is probably best.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Right, there won't be any ctesting if it is OFF. I agree with you having testing ON by default is good. Having PEP installed when testing is ON is good IMO. If you agree, we can have it merged and then @dlonie can add style testing.

add_cdat_package(pep8 "" "" ON)
endif()
1 change: 1 addition & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -488,6 +488,7 @@ include(dateutils_pkg)
include(pyparsing_pkg)
include(md5_pkg)
include(mpi4py_pkg)
include(pep8_pkg)
include(pyopenssl_pkg)
include(setuptools_pkg)
include(myproxyclient_pkg)
Expand Down