# Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. from pythonbuilder.core import use_plugin, task, after from pythonbuilder.utils import assert_can_execute, read_file from pythonbuilder.plugins.python.python_plugin_helper import execute_tool_on_source_files use_plugin("python.core") @after("prepare") def check_pep8_available (logger): logger.debug("Checking availability of pep8") assert_can_execute(("pep8", ), "pep8", "plugin python.pep8") @task def analyze (project, logger): logger.info("Executing pep8 on project sources") _, report_file = execute_tool_on_source_files(project, "pep8", ["pep8"]) reports = read_file(report_file) if len(reports) > 0: logger.warn("Found %d warning%s produced by pep8",
# # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. """ A simple flask application tested using pyassert and pyfix and built with pybuilder. """ from pythonbuilder.core import use_plugin, init, Author use_plugin('filter_resources') use_plugin('python.core') use_plugin('python.coverage') use_plugin('python.pyfix_unittest') use_plugin('python.integrationtest') use_plugin('python.install_dependencies') use_plugin('python.flake8') use_plugin('python.pydev') name = 'flask-example' authors = [ Author('Michael Gruber', '*****@*****.**'), Author('Alexander Metzner', '*****@*****.**') ] license = 'Apache License, Version 2.0'
`````````````````` pyassert is available via the [Cheeseshop](http://pypi.python.org/pypi/pyassert/) so you can use easy_install or pip: $ pip install pyassert Links ````` * pyassert Github repository including documentation <https://github.com/pyclectic/pyassert> """ from pythonbuilder.core import init, use_plugin, Author use_plugin("filter_resources") use_plugin("python.core") use_plugin("python.unittest") use_plugin("python.coverage") use_plugin("python.pychecker") use_plugin("python.distutils") use_plugin("python.install_dependencies") use_plugin("python.pydev") default_task = ["analyze", "publish"] version = "0.3.2" summary = "Rich assertions library for Python" description = __doc__
from pythonbuilder.core import init, use_plugin, Author use_plugin("python.core") use_plugin("python.unittest") use_plugin("python.integrationtest") use_plugin("python.coverage") use_plugin("python.distutils") use_plugin("python.install_dependencies") use_plugin("python.pydev") default_task = ["analyze", "publish"] version = "0.1.1" summary = "A web ui testing framework" authors = [Author("Alexander Metzner", "*****@*****.**")] url = "https://github.com/halimath/recap" license = "Apache Software License" @init def init (project): project.build_depends_on("coverage") project.build_depends_on("pyassert") project.set_property("dir_source_main_python", "src/main") project.set_property("dir_source_unittest_python", "src/unittest") project.set_property("dir_source_integrationtest_python", "src/integrationtest") project.set_property("integrationtest_inherit_environment", True) # project.set_property("pychecker_break_build", True)
# you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. import os from pythonbuilder.core import use_plugin, after, task from pythonbuilder.utils import assert_can_execute, execute_command use_plugin("python.core") use_plugin("analysis") @after("prepare") def check_pymetrics_available (logger): logger.debug("Checking availability of pymetrics") assert_can_execute(("pymetrics", "--nosql", "--nocsv"), "pymetrics", "plugin python.pymetrics") logger.debug("pymetrics has been found") @task("analyze") def execute_pymetrics (project, logger): logger.info("Executing pymetrics on project sources") source_dir = project.expand_path("$dir_source_main_python") files_to_scan = [] for root, _, files in os.walk(source_dir):
# http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. """ A simple flask application tested using pyassert and pyfix and built with pybuilder. """ from pythonbuilder.core import use_plugin, init, Author use_plugin('filter_resources') use_plugin('python.core') use_plugin('python.coverage') use_plugin('python.pyfix_unittest') use_plugin('python.integrationtest') use_plugin('python.install_dependencies') use_plugin('python.flake8') use_plugin('python.pydev') name = 'flask-example' authors = [Author('Michael Gruber', '*****@*****.**'), Author('Alexander Metzner', '*****@*****.**')] license = 'Apache License, Version 2.0' summary = 'Hello world application for flask.' url = 'https://github.com/pycletic/flask-example'
# You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. import os import shutil from pythonbuilder.core import init, task, use_plugin from pythonbuilder.utils import apply_on_files use_plugin("core") @init def init_copy_resources_plugin (project): project.set_property_if_unset("copy_resources_target", "$dir_target") project.set_property_if_unset("copy_resources_glob", []) @task def package (project, logger): globs = project.get_mandatory_property("copy_resources_glob") if not globs: logger.warn("No resources to copy configured. Consider removing plugin.") return source = project.basedir target = project.expand_path("$copy_resources_target")
# This file is part of Python Builder # # Copyright 2011 The Python Builder Team # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. from pythonbuilder.core import use_plugin use_plugin("python.core") use_plugin("python.unittest") use_plugin("python.coverage") use_plugin("python.distutils") default_task = "publish"
# Copyright 2011 The Python Builder Team # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. from pythonbuilder.core import init, use_plugin, Author use_plugin("python.core") use_plugin("copy_resources") use_plugin("filter_resources") use_plugin("source_distribution") use_plugin("python.unittest") use_plugin("python.integrationtest") use_plugin("python.distutils") use_plugin("python.pydev") use_plugin("python.install_dependencies") use_plugin("python.coverage")
#!/usr/bin/python from pythonbuilder.core import use_plugin, init use_plugin("python.core") use_plugin("python.install_dependencies") use_plugin("python.core") use_plugin("python.unittest") use_plugin("python.coverage") use_plugin("python.pylint") use_plugin("python.flake8") use_plugin("python.pymetrics") default_task = "analyze" @init def initialize(project): project.build_depends_on("mock") project.build_depends_on("vkontakte") project.build_depends_on("flake8") project.set_property('dir_source_main_python', 'src') project.set_property('dir_source_main_scripts', 'scripts') project.set_property('dir_source_unittest_python', 'test') project.set_property("coverage_break_build", False) project.set_property("pep8_break_build", True) project.set_property("flake8_verbose_output", True)
# # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program. If not, see <http://www.gnu.org/licenses/>. from pythonbuilder.core import use_plugin, init, Author use_plugin('filter_resources') use_plugin('python.core') use_plugin('python.coverage') use_plugin('python.install_dependencies') use_plugin('python.distutils') use_plugin('python.pydev') use_plugin('copy_resources') authors = [Author('Arne Hilmann', '*****@*****.**')] license = 'GNU GPL v3' name = 'yadtshell-controller' summary = 'Sends commands to a yadtbroadcaster.' url = 'https://github.com/yadt/yadtshell-controller' version = '1.0.2'
from pythonbuilder.core import use_plugin, init, Author use_plugin("python.core") use_plugin("copy_resources") use_plugin("source_distribution") use_plugin("python.unittest") use_plugin("python.coverage") #use_plugin("python.pychecker") use_plugin("python.distutils") use_plugin("python.pydev") use_plugin("python.django") default_task = ["analyze", "publish"] version = "0.5.8" summary = "A task card generator" authors = [Author("Alexander Metzner", "*****@*****.**")] @init def set_properties (project): #project.depends_on("reportlab") project.set_property("dir_dist_scripts", 'scripts') project.set_property("copy_resources_target", "$dir_dist") project.get_property("copy_resources_glob").append("setup.cfg") project.get_property("copy_resources_glob").append("sample.tcm")