Merge pull request #213 from bast/radovan/explicit-license
Add explicit license information
This commit is contained in:
commit
65df3eae5e
@ -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
|
||||
|
@ -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
|
||||
|
||||
|
13
modules/attach-license-header.py
Normal file
13
modules/attach-license-header.py
Normal 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)
|
@ -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.
|
||||
|
@ -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(
|
||||
|
@ -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
|
||||
|
@ -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(
|
||||
|
@ -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
|
||||
|
@ -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(
|
||||
|
@ -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
|
||||
|
@ -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 "")
|
||||
|
@ -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.
|
||||
|
@ -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.
|
||||
|
@ -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.
|
||||
|
@ -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.
|
||||
|
@ -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.
|
||||
|
@ -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
|
||||
|
@ -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").
|
||||
|
@ -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.
|
||||
|
@ -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.
|
||||
|
@ -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.
|
||||
|
@ -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)
|
||||
|
@ -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)
|
||||
|
@ -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.
|
||||
|
@ -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".
|
||||
|
@ -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.
|
||||
|
@ -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.
|
||||
|
@ -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.
|
||||
|
@ -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.
|
||||
|
@ -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.
|
||||
|
@ -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.
|
||||
|
@ -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.
|
||||
|
@ -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.
|
||||
|
@ -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.
|
||||
|
@ -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.
|
||||
|
@ -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.
|
||||
|
@ -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.
|
||||
|
@ -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.
|
||||
|
@ -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.
|
||||
|
@ -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.
|
||||
|
@ -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.
|
||||
|
@ -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.
|
||||
|
@ -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.
|
||||
|
@ -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")
|
||||
|
@ -1,3 +1,3 @@
|
||||
pep8
|
||||
pycodestyle
|
||||
pytest
|
||||
pyyaml
|
||||
|
16
update.py
16
update.py
@ -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)
|
||||
|
Loading…
x
Reference in New Issue
Block a user