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
script:
# pep8 tests
- pep8 --ignore E501 update.py
- pep8 --ignore E501,E265 autocmake
# pycodestyle tests
- pycodestyle --ignore E501 update.py
- pycodestyle --ignore E501,E265,E741 autocmake
# unit tests
- py.test -vv autocmake/*
- 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.
You can run locally all tests with::
$ pep8 --ignore E501 update.py
$ pep8 --ignore E501,E265 autocmake
$ pycodestyle --ignore E501 update.py
$ pycodestyle --ignore E501,E265 autocmake
$ py.test -vv autocmake/*
$ 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:
#
# 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
# This is not Windows-friendly!
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
add_custom_command(
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
# This is not Windows-friendly!
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
add_custom_command(
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
# This is not Windows-friendly!
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
add_custom_command(
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
# user-config.jam file. MPI_SENT will be the command we append
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:
#
# 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:
#
# 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:
#
# 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:
#
# 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:
#
# 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:
#
# 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:
#
# 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:
#
# 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:
#
# 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:
#
# 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)
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)
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:
#
# 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:
#
# 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:
#
# 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:
#
# 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:
#
# 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:
#
# 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:
#
# 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:
#
# 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:
#
# 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:
#
# 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:
#
# 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:
#
# 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:
#
# 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:
#
# 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:
#
# 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:
#
# 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:
#
# 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:
#
# 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:
#
# 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:
#
# 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:
#
# Determine program version from file "VERSION" (example: "14.1")

View File

@ -1,3 +1,3 @@
pep8
pycodestyle
pytest
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/'
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():
try:
import yaml
except:
except ImportError:
sys.stderr.write("ERROR: you need to install the pyyaml package\n")
sys.exit(-1)
@ -257,6 +267,10 @@ def main(argv):
src='{0}{1}'.format(AUTOCMAKE_GITHUB_URL, 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)
process_yaml(argv)