Merge pull request #213 from bast/radovan/explicit-license

Add explicit license information
This commit is contained in:
Radovan Bast 2017-11-14 17:06:49 +01:00 committed by GitHub
commit 65df3eae5e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
46 changed files with 157 additions and 7 deletions

View File

@ -76,9 +76,9 @@ install:
- pip install -r requirements.txt - pip install -r requirements.txt
script: script:
# pep8 tests # pycodestyle tests
- pep8 --ignore E501 update.py - pycodestyle --ignore E501 update.py
- pep8 --ignore E501,E265 autocmake - pycodestyle --ignore E501,E265,E741 autocmake
# unit tests # unit tests
- py.test -vv autocmake/* - py.test -vv autocmake/*
- py.test -vv test/test.py - py.test -vv test/test.py

View File

@ -11,8 +11,8 @@ build and test recipe for other requirements.
Your contributions and changes should preserve the test set and be PEP8 conform. Your contributions and changes should preserve the test set and be PEP8 conform.
You can run locally all tests with:: You can run locally all tests with::
$ pep8 --ignore E501 update.py $ pycodestyle --ignore E501 update.py
$ pep8 --ignore E501,E265 autocmake $ pycodestyle --ignore E501,E265 autocmake
$ py.test -vv autocmake/* $ py.test -vv autocmake/*
$ py.test -vv test/test.py $ py.test -vv test/test.py

View File

@ -0,0 +1,13 @@
import glob
license_text = '''# (c) https://github.com/coderefinery/autocmake/blob/master/AUTHORS.md
# licensed under BSD-3: https://github.com/coderefinery/autocmake/blob/master/LICENSE
'''
for filename in glob.iglob('**/*.cmake', recursive=True):
with open(filename, 'r') as old:
text = old.read()
with open(filename, 'w') as new:
new.write(license_text)
new.write(text)

View File

@ -1,3 +1,6 @@
# (c) https://github.com/coderefinery/autocmake/blob/master/AUTHORS.md
# licensed under BSD-3: https://github.com/coderefinery/autocmake/blob/master/LICENSE
#.rst: #.rst:
# #
# Detect, build, and link Boost libraries. # Detect, build, and link Boost libraries.

View File

@ -1,3 +1,6 @@
# (c) https://github.com/coderefinery/autocmake/blob/master/AUTHORS.md
# licensed under BSD-3: https://github.com/coderefinery/autocmake/blob/master/LICENSE
# Build Boost # Build Boost
# This is not Windows-friendly! # This is not Windows-friendly!
add_custom_command( add_custom_command(

View File

@ -1,3 +1,6 @@
# (c) https://github.com/coderefinery/autocmake/blob/master/AUTHORS.md
# licensed under BSD-3: https://github.com/coderefinery/autocmake/blob/master/LICENSE
# Clean-up # Clean-up
add_custom_command( add_custom_command(
OUTPUT ${CUSTOM_BOOST_LOCATION}/boost.cleanedup OUTPUT ${CUSTOM_BOOST_LOCATION}/boost.cleanedup

View File

@ -1,3 +1,6 @@
# (c) https://github.com/coderefinery/autocmake/blob/master/AUTHORS.md
# licensed under BSD-3: https://github.com/coderefinery/autocmake/blob/master/LICENSE
# Run bootstrap.sh to configure the build. We will install in ${PROJECT_BINARY_DIR}/boost # Run bootstrap.sh to configure the build. We will install in ${PROJECT_BINARY_DIR}/boost
# This is not Windows-friendly! # This is not Windows-friendly!
add_custom_command( add_custom_command(

View File

@ -1,3 +1,6 @@
# (c) https://github.com/coderefinery/autocmake/blob/master/AUTHORS.md
# licensed under BSD-3: https://github.com/coderefinery/autocmake/blob/master/LICENSE
# Install Boost # Install Boost
add_custom_command( add_custom_command(
OUTPUT ${CUSTOM_BOOST_LOCATION}/boost.installed OUTPUT ${CUSTOM_BOOST_LOCATION}/boost.installed

View File

@ -1,3 +1,6 @@
# (c) https://github.com/coderefinery/autocmake/blob/master/AUTHORS.md
# licensed under BSD-3: https://github.com/coderefinery/autocmake/blob/master/LICENSE
# Install Boost # Install Boost
# This is not Windows-friendly! # This is not Windows-friendly!
add_custom_command( add_custom_command(

View File

@ -1,3 +1,6 @@
# (c) https://github.com/coderefinery/autocmake/blob/master/AUTHORS.md
# licensed under BSD-3: https://github.com/coderefinery/autocmake/blob/master/LICENSE
# Unpack Boost # Unpack Boost
add_custom_command( add_custom_command(
OUTPUT ${CUSTOM_BOOST_LOCATION}/boost.unpacked OUTPUT ${CUSTOM_BOOST_LOCATION}/boost.unpacked

View File

@ -1,3 +1,6 @@
# (c) https://github.com/coderefinery/autocmake/blob/master/AUTHORS.md
# licensed under BSD-3: https://github.com/coderefinery/autocmake/blob/master/LICENSE
# To get boost to compile MPI we need to append "using mpi ;" to the end of the # To get boost to compile MPI we need to append "using mpi ;" to the end of the
# user-config.jam file. MPI_SENT will be the command we append # user-config.jam file. MPI_SENT will be the command we append
set(MPI_SENT "") set(MPI_SENT "")

View File

@ -1,3 +1,6 @@
# (c) https://github.com/coderefinery/autocmake/blob/master/AUTHORS.md
# licensed under BSD-3: https://github.com/coderefinery/autocmake/blob/master/LICENSE
#.rst: #.rst:
# #
# Adds C support. # Adds C support.

View File

@ -1,3 +1,6 @@
# (c) https://github.com/coderefinery/autocmake/blob/master/AUTHORS.md
# licensed under BSD-3: https://github.com/coderefinery/autocmake/blob/master/LICENSE
#.rst: #.rst:
# #
# Adds ccache support. # Adds ccache support.

View File

@ -1,3 +1,6 @@
# (c) https://github.com/coderefinery/autocmake/blob/master/AUTHORS.md
# licensed under BSD-3: https://github.com/coderefinery/autocmake/blob/master/LICENSE
#.rst: #.rst:
# #
# Enables code coverage by appending corresponding compiler flags. # Enables code coverage by appending corresponding compiler flags.

View File

@ -1,3 +1,6 @@
# (c) https://github.com/coderefinery/autocmake/blob/master/AUTHORS.md
# licensed under BSD-3: https://github.com/coderefinery/autocmake/blob/master/LICENSE
#.rst: #.rst:
# #
# Colorize CMake output. # Colorize CMake output.

View File

@ -1,3 +1,6 @@
# (c) https://github.com/coderefinery/autocmake/blob/master/AUTHORS.md
# licensed under BSD-3: https://github.com/coderefinery/autocmake/blob/master/LICENSE
#.rst: #.rst:
# #
# Adds C++ support. # Adds C++ support.

View File

@ -1,3 +1,6 @@
# (c) https://github.com/coderefinery/autocmake/blob/master/AUTHORS.md
# licensed under BSD-3: https://github.com/coderefinery/autocmake/blob/master/LICENSE
#.rst: #.rst:
# #
# Sets binary and library output directories to ${PROJECT_BINARY_DIR}/bin # Sets binary and library output directories to ${PROJECT_BINARY_DIR}/bin

View File

@ -1,3 +1,6 @@
# (c) https://github.com/coderefinery/autocmake/blob/master/AUTHORS.md
# licensed under BSD-3: https://github.com/coderefinery/autocmake/blob/master/LICENSE
#.rst: #.rst:
# #
# Add preprocessor definitions (example: --add-definitions="-DTHIS -DTHAT=137"). # Add preprocessor definitions (example: --add-definitions="-DTHIS -DTHAT=137").

View File

@ -1,3 +1,6 @@
# (c) https://github.com/coderefinery/autocmake/blob/master/AUTHORS.md
# licensed under BSD-3: https://github.com/coderefinery/autocmake/blob/master/LICENSE
#.rst: #.rst:
# #
# Generates export header for your API using best practices. # Generates export header for your API using best practices.

View File

@ -1,3 +1,6 @@
# (c) https://github.com/coderefinery/autocmake/blob/master/AUTHORS.md
# licensed under BSD-3: https://github.com/coderefinery/autocmake/blob/master/LICENSE
#.rst: #.rst:
# #
# Adds Fortran support. # Adds Fortran support.

View File

@ -1,3 +1,6 @@
# (c) https://github.com/coderefinery/autocmake/blob/master/AUTHORS.md
# licensed under BSD-3: https://github.com/coderefinery/autocmake/blob/master/LICENSE
#.rst: #.rst:
# #
# Adds optional Fortran support. # Adds optional Fortran support.

View File

@ -1,3 +1,6 @@
# (c) https://github.com/coderefinery/autocmake/blob/master/AUTHORS.md
# licensed under BSD-3: https://github.com/coderefinery/autocmake/blob/master/LICENSE
include(CheckIncludeFile) include(CheckIncludeFile)
function(_find_include_dir _names _hints _result) function(_find_include_dir _names _hints _result)

View File

@ -1,3 +1,6 @@
# (c) https://github.com/coderefinery/autocmake/blob/master/AUTHORS.md
# licensed under BSD-3: https://github.com/coderefinery/autocmake/blob/master/LICENSE
include(CheckFunctionExists) include(CheckFunctionExists)
function(_find_library _names _check_function _result) function(_find_library _names _check_function _result)

View File

@ -1,3 +1,6 @@
# (c) https://github.com/coderefinery/autocmake/blob/master/AUTHORS.md
# licensed under BSD-3: https://github.com/coderefinery/autocmake/blob/master/LICENSE
#.rst: #.rst:
# #
# Creates git_info.h in the build directory. # Creates git_info.h in the build directory.

View File

@ -1,3 +1,6 @@
# (c) https://github.com/coderefinery/autocmake/blob/master/AUTHORS.md
# licensed under BSD-3: https://github.com/coderefinery/autocmake/blob/master/LICENSE
#.rst: #.rst:
# #
# Includes Google Test sources and adds a library "googletest". # Includes Google Test sources and adds a library "googletest".

View File

@ -1,3 +1,6 @@
# (c) https://github.com/coderefinery/autocmake/blob/master/AUTHORS.md
# licensed under BSD-3: https://github.com/coderefinery/autocmake/blob/master/LICENSE
#.rst: #.rst:
# #
# Enables 64-bit integer support for Fortran projects. # Enables 64-bit integer support for Fortran projects.

View File

@ -1,3 +1,6 @@
# (c) https://github.com/coderefinery/autocmake/blob/master/AUTHORS.md
# licensed under BSD-3: https://github.com/coderefinery/autocmake/blob/master/LICENSE
#.rst: #.rst:
# #
# Find and link to ACCELERATE. # Find and link to ACCELERATE.

View File

@ -1,3 +1,6 @@
# (c) https://github.com/coderefinery/autocmake/blob/master/AUTHORS.md
# licensed under BSD-3: https://github.com/coderefinery/autocmake/blob/master/LICENSE
#.rst: #.rst:
# #
# Find and link to ACML. # Find and link to ACML.

View File

@ -1,3 +1,6 @@
# (c) https://github.com/coderefinery/autocmake/blob/master/AUTHORS.md
# licensed under BSD-3: https://github.com/coderefinery/autocmake/blob/master/LICENSE
#.rst: #.rst:
# #
# Find and link to ATLAS. # Find and link to ATLAS.

View File

@ -1,3 +1,6 @@
# (c) https://github.com/coderefinery/autocmake/blob/master/AUTHORS.md
# licensed under BSD-3: https://github.com/coderefinery/autocmake/blob/master/LICENSE
#.rst: #.rst:
# #
# Find and link to BLAS. # Find and link to BLAS.

View File

@ -1,3 +1,6 @@
# (c) https://github.com/coderefinery/autocmake/blob/master/AUTHORS.md
# licensed under BSD-3: https://github.com/coderefinery/autocmake/blob/master/LICENSE
#.rst: #.rst:
# #
# Find and link to CBLAS. # Find and link to CBLAS.

View File

@ -1,3 +1,6 @@
# (c) https://github.com/coderefinery/autocmake/blob/master/AUTHORS.md
# licensed under BSD-3: https://github.com/coderefinery/autocmake/blob/master/LICENSE
#.rst: #.rst:
# #
# Find and link to Goto BLAS. # Find and link to Goto BLAS.

View File

@ -1,3 +1,6 @@
# (c) https://github.com/coderefinery/autocmake/blob/master/AUTHORS.md
# licensed under BSD-3: https://github.com/coderefinery/autocmake/blob/master/LICENSE
#.rst: #.rst:
# #
# Find and link to LAPACK. # Find and link to LAPACK.

View File

@ -1,3 +1,6 @@
# (c) https://github.com/coderefinery/autocmake/blob/master/AUTHORS.md
# licensed under BSD-3: https://github.com/coderefinery/autocmake/blob/master/LICENSE
#.rst: #.rst:
# #
# Find and link to LAPACKE. # Find and link to LAPACKE.

View File

@ -1,3 +1,6 @@
# (c) https://github.com/coderefinery/autocmake/blob/master/AUTHORS.md
# licensed under BSD-3: https://github.com/coderefinery/autocmake/blob/master/LICENSE
#.rst: #.rst:
# #
# Detects and links to BLAS and LAPACK libraries. # Detects and links to BLAS and LAPACK libraries.

View File

@ -1,3 +1,6 @@
# (c) https://github.com/coderefinery/autocmake/blob/master/AUTHORS.md
# licensed under BSD-3: https://github.com/coderefinery/autocmake/blob/master/LICENSE
#.rst: #.rst:
# #
# Enables MPI support. # Enables MPI support.

View File

@ -1,3 +1,6 @@
# (c) https://github.com/coderefinery/autocmake/blob/master/AUTHORS.md
# licensed under BSD-3: https://github.com/coderefinery/autocmake/blob/master/LICENSE
#.rst: #.rst:
# #
# Enables OpenMP support. # Enables OpenMP support.

View File

@ -1,3 +1,6 @@
# (c) https://github.com/coderefinery/autocmake/blob/master/AUTHORS.md
# licensed under BSD-3: https://github.com/coderefinery/autocmake/blob/master/LICENSE
#.rst: #.rst:
# #
# Enable profiling by appending corresponding compiler flags. # Enable profiling by appending corresponding compiler flags.

View File

@ -1,3 +1,6 @@
# (c) https://github.com/coderefinery/autocmake/blob/master/AUTHORS.md
# licensed under BSD-3: https://github.com/coderefinery/autocmake/blob/master/LICENSE
#.rst: #.rst:
# #
# Detects Python interpreter. # Detects Python interpreter.

View File

@ -1,3 +1,6 @@
# (c) https://github.com/coderefinery/autocmake/blob/master/AUTHORS.md
# licensed under BSD-3: https://github.com/coderefinery/autocmake/blob/master/LICENSE
#.rst: #.rst:
# #
# Detects Python libraries and headers. # Detects Python libraries and headers.

View File

@ -1,3 +1,6 @@
# (c) https://github.com/coderefinery/autocmake/blob/master/AUTHORS.md
# licensed under BSD-3: https://github.com/coderefinery/autocmake/blob/master/LICENSE
#.rst: #.rst:
# #
# Provides safeguards against in-source builds and bad build types. # Provides safeguards against in-source builds and bad build types.

View File

@ -1,3 +1,6 @@
# (c) https://github.com/coderefinery/autocmake/blob/master/AUTHORS.md
# licensed under BSD-3: https://github.com/coderefinery/autocmake/blob/master/LICENSE
#.rst: #.rst:
# #
# Take care of updating the cache for fresh configurations. # Take care of updating the cache for fresh configurations.

View File

@ -1,3 +1,6 @@
# (c) https://github.com/coderefinery/autocmake/blob/master/AUTHORS.md
# licensed under BSD-3: https://github.com/coderefinery/autocmake/blob/master/LICENSE
#.rst: #.rst:
# #
# Adds ${PROJECT_SOURCE_DIR}/src as subdirectory containing CMakeLists.txt. # Adds ${PROJECT_SOURCE_DIR}/src as subdirectory containing CMakeLists.txt.

View File

@ -1,3 +1,6 @@
# (c) https://github.com/coderefinery/autocmake/blob/master/AUTHORS.md
# licensed under BSD-3: https://github.com/coderefinery/autocmake/blob/master/LICENSE
#.rst: #.rst:
# #
# Determine program version from file "VERSION" (example: "14.1") # Determine program version from file "VERSION" (example: "14.1")

View File

@ -1,3 +1,3 @@
pep8 pycodestyle
pytest pytest
pyyaml pyyaml

View File

@ -12,10 +12,20 @@ if sys.version_info[0] == 2 and sys.version_info[1] < 7:
AUTOCMAKE_GITHUB_URL = 'https://github.com/coderefinery/autocmake/raw/master/' AUTOCMAKE_GITHUB_URL = 'https://github.com/coderefinery/autocmake/raw/master/'
def licensing_info():
return '''The CMake infrastructure for this project is generated using [Autocmake]
by Radovan Bast, Roberto Di Remigio, Jonas Juselius and contributors.
The `update.py` Python script and the contents of the directories `autocmake` and `downloaded` are licensed
under the terms of the [BSD-3-Clause license], unless otherwise stated.
[Autocmake]: http://autocmake.org
[BSD-3-Clause license]: https://tldrlegal.com/license/bsd-3-clause-license-(revised)'''
def check_for_yaml(): def check_for_yaml():
try: try:
import yaml import yaml
except: except ImportError:
sys.stderr.write("ERROR: you need to install the pyyaml package\n") sys.stderr.write("ERROR: you need to install the pyyaml package\n")
sys.exit(-1) sys.exit(-1)
@ -257,6 +267,10 @@ def main(argv):
src='{0}{1}'.format(AUTOCMAKE_GITHUB_URL, f), src='{0}{1}'.format(AUTOCMAKE_GITHUB_URL, f),
dst='{0}'.format(f) dst='{0}'.format(f)
) )
# finally create a README.md with licensing information
with open('README.md', 'w') as f:
print('- generating licensing information')
f.write(licensing_info())
sys.exit(0) sys.exit(0)
process_yaml(argv) process_yaml(argv)