From b9678db2998ba600be7562d15e10d7a6c064a322 Mon Sep 17 00:00:00 2001 From: Anonymous Maarten Date: Fri, 8 Mar 2019 17:28:33 +0100 Subject: [PATCH 1/2] Add **kwargs to functions that return a builder + remove shebang --- .travis.yml | 2 +- bincrafters/__init__.py | 2 ++ bincrafters/build_paths.py | 3 +-- bincrafters/build_shared.py | 1 - bincrafters/build_template_boost_default.py | 7 ++++--- bincrafters/build_template_boost_header_only.py | 1 - bincrafters/build_template_default.py | 7 ++++--- bincrafters/build_template_header_only.py | 1 - bincrafters/build_template_installer.py | 1 - examples/build_header_only.py | 1 - examples/build_shared_library.py | 1 - tests/__init__.py | 1 + tests/conanfile.py | 2 ++ tests/test_package_tools.py | 1 - tests/test_shared_option.py | 1 - 15 files changed, 15 insertions(+), 17 deletions(-) diff --git a/.travis.yml b/.travis.yml index 3964a48..279f3d1 100644 --- a/.travis.yml +++ b/.travis.yml @@ -8,7 +8,7 @@ matrix: - os: linux sudo: false language: python - python: '3.6' + python: '3.7' - os: osx language: generic osx_image: xcode9 diff --git a/bincrafters/__init__.py b/bincrafters/__init__.py index f4ab1d3..c3af067 100644 --- a/bincrafters/__init__.py +++ b/bincrafters/__init__.py @@ -1 +1,3 @@ +# -*- coding: utf-8 -*- + __version__ = '0.17.9' diff --git a/bincrafters/build_paths.py b/bincrafters/build_paths.py index 00b1f5f..e4d8978 100644 --- a/bincrafters/build_paths.py +++ b/bincrafters/build_paths.py @@ -1,4 +1,3 @@ -#!/usr/bin/env python # -*- coding: utf-8 -*- -BINCRAFTERS_REPO_URL = "https://api.bintray.com/conan/bincrafters/public-conan" \ No newline at end of file +BINCRAFTERS_REPO_URL = "https://api.bintray.com/conan/bincrafters/public-conan" diff --git a/bincrafters/build_shared.py b/bincrafters/build_shared.py index 161e9f2..1435da7 100644 --- a/bincrafters/build_shared.py +++ b/bincrafters/build_shared.py @@ -1,4 +1,3 @@ -#!/usr/bin/env python # -*- coding: utf-8 -*- import os diff --git a/bincrafters/build_template_boost_default.py b/bincrafters/build_template_boost_default.py index d1d0bc6..4cf373e 100644 --- a/bincrafters/build_template_boost_default.py +++ b/bincrafters/build_template_boost_default.py @@ -1,4 +1,3 @@ -#!/usr/bin/env python # -*- coding: utf-8 -*- import os @@ -20,7 +19,8 @@ def add_boost_shared(build): def get_builder(shared_option_name=None, pure_c=False, dll_with_static_runtime=False, - build_policy=None): + build_policy=None, + **kwargs): # Bincrafters default is to upload only when stable, but boost is an exception # Empty string allows boost packages upload for testing branch @@ -31,7 +31,8 @@ def get_builder(shared_option_name=None, shared_option_name=shared_option_name, pure_c=pure_c, dll_with_static_runtime=dll_with_static_runtime, - build_policy=build_policy) + build_policy=build_policy, + **kwargs) builder.builds = map(add_boost_shared, builder.items) return builder diff --git a/bincrafters/build_template_boost_header_only.py b/bincrafters/build_template_boost_header_only.py index e4aa863..303bd7d 100644 --- a/bincrafters/build_template_boost_header_only.py +++ b/bincrafters/build_template_boost_header_only.py @@ -1,4 +1,3 @@ -#!/usr/bin/env python # -*- coding: utf-8 -*- import os diff --git a/bincrafters/build_template_default.py b/bincrafters/build_template_default.py index 8269cbf..c1770eb 100644 --- a/bincrafters/build_template_default.py +++ b/bincrafters/build_template_default.py @@ -1,4 +1,3 @@ -#!/usr/bin/env python # -*- coding: utf-8 -*- from bincrafters import build_shared @@ -7,7 +6,8 @@ def get_builder(shared_option_name=None, pure_c=True, dll_with_static_runtime=False, - build_policy=None): + build_policy=None, + **kwargs): builder = build_shared.get_builder(build_policy) if shared_option_name is None and build_shared.is_shared(): @@ -16,6 +16,7 @@ def get_builder(shared_option_name=None, builder.add_common_builds( shared_option_name=shared_option_name, pure_c=pure_c, - dll_with_static_runtime=dll_with_static_runtime) + dll_with_static_runtime=dll_with_static_runtime, + **kwargs) return builder diff --git a/bincrafters/build_template_header_only.py b/bincrafters/build_template_header_only.py index 6e8ed39..2bc623d 100644 --- a/bincrafters/build_template_header_only.py +++ b/bincrafters/build_template_header_only.py @@ -1,4 +1,3 @@ -#!/usr/bin/env python # -*- coding: utf-8 -*- from bincrafters import build_shared diff --git a/bincrafters/build_template_installer.py b/bincrafters/build_template_installer.py index fef194e..80548a1 100644 --- a/bincrafters/build_template_installer.py +++ b/bincrafters/build_template_installer.py @@ -1,4 +1,3 @@ -#!/usr/bin/env python # -*- coding: utf-8 -*- from bincrafters import build_shared diff --git a/examples/build_header_only.py b/examples/build_header_only.py index 74dfa91..3628675 100644 --- a/examples/build_header_only.py +++ b/examples/build_header_only.py @@ -1,4 +1,3 @@ -#!/usr/bin/env python # -*- coding: utf-8 -*- from bincrafters import build_template_header_only diff --git a/examples/build_shared_library.py b/examples/build_shared_library.py index a3ab546..c844b31 100644 --- a/examples/build_shared_library.py +++ b/examples/build_shared_library.py @@ -1,4 +1,3 @@ -#!/usr/bin/env python # -*- coding: utf-8 -*- from bincrafters import build_template_default diff --git a/tests/__init__.py b/tests/__init__.py index e69de29..40a96af 100644 --- a/tests/__init__.py +++ b/tests/__init__.py @@ -0,0 +1 @@ +# -*- coding: utf-8 -*- diff --git a/tests/conanfile.py b/tests/conanfile.py index 156a8df..fca43ab 100644 --- a/tests/conanfile.py +++ b/tests/conanfile.py @@ -1,3 +1,5 @@ +# -*- coding: utf-8 -*- + from conans import ConanFile from conans import tools diff --git a/tests/test_package_tools.py b/tests/test_package_tools.py index ffb3f60..f5d5586 100644 --- a/tests/test_package_tools.py +++ b/tests/test_package_tools.py @@ -1,4 +1,3 @@ -#!/usr/bin/env python # -*- coding: utf-8 -*- import os diff --git a/tests/test_shared_option.py b/tests/test_shared_option.py index d91edc1..ee4ae07 100644 --- a/tests/test_shared_option.py +++ b/tests/test_shared_option.py @@ -1,4 +1,3 @@ -#!/usr/bin/env python # -*- coding: utf-8 -*- import tempfile From fe2aaf91ebd9000602d8a6296b07daa121fa0be8 Mon Sep 17 00:00:00 2001 From: Uilian Ries Date: Thu, 14 Mar 2019 09:41:59 -0300 Subject: [PATCH 2/2] Set Linux distro on Travis CI --- .travis.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.travis.yml b/.travis.yml index 279f3d1..441ada8 100644 --- a/.travis.yml +++ b/.travis.yml @@ -2,10 +2,12 @@ matrix: fast_finish: true include: - os: linux + dist: xenial sudo: false language: python python: '2.7' - os: linux + dist: xenial sudo: false language: python python: '3.7'