diff --git a/modules/jenkins/files/slave_scripts/run-pyflakes.sh b/modules/jenkins/files/slave_scripts/run-pyflakes.sh deleted file mode 100644 index 30756b7cb7..0000000000 --- a/modules/jenkins/files/slave_scripts/run-pyflakes.sh +++ /dev/null @@ -1,31 +0,0 @@ -#!/bin/bash -xe - -# Copyright 2013 OpenStack Foundation -# -# 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. - -org=$1 -project=$2 - -if [[ -z "$org" || -z "$project" ]] -then - echo "Usage: $0 ORG PROJECT" - echo - echo "ORG: The project organization (eg 'openstack')" - echo "PROJECT: The project name (eg 'nova')" - exit 1 -fi - -source /usr/local/jenkins/slave_scripts/select-mirror.sh $org $project - -tox -v -epyflakes diff --git a/modules/jenkins/manifests/params.pp b/modules/jenkins/manifests/params.pp index de2c40c190..5af100e438 100644 --- a/modules/jenkins/manifests/params.pp +++ b/modules/jenkins/manifests/params.pp @@ -38,7 +38,6 @@ class jenkins::params { $mongodb_package = 'mongodb-server' $pandoc_package = 'pandoc' $pkgconfig_package = 'pkgconfig' - $pyflakes_package = 'pyflakes' $python_libvirt_package = 'libvirt-python' $python_lxml_package = 'python-lxml' $python_zmq_package = 'python-zmq' @@ -98,7 +97,6 @@ class jenkins::params { $mongodb_package = 'mongodb' $pandoc_package = 'pandoc' $pkgconfig_package = 'pkg-config' - $pyflakes_package = 'pyflakes' $python_libvirt_package = 'python-libvirt' $python_lxml_package = 'python-lxml' $python_zmq_package = 'python-zmq' diff --git a/modules/jenkins/manifests/slave.pp b/modules/jenkins/manifests/slave.pp index f50466e4c4..64ab7450c7 100644 --- a/modules/jenkins/manifests/slave.pp +++ b/modules/jenkins/manifests/slave.pp @@ -51,7 +51,6 @@ class jenkins::slave( $::jenkins::params::libffi_dev_package, # xattr's cffi dependency $::jenkins::params::pandoc_package, #for docs, markdown->docbook, bug 924507 $::jenkins::params::pkgconfig_package, # for spidermonkey, used by ceilometer - $::jenkins::params::pyflakes_package, $::jenkins::params::python_libvirt_package, $::jenkins::params::python_lxml_package, # for validating openstack manuals $::jenkins::params::python_zmq_package, # zeromq unittests (not pip installable) diff --git a/modules/openstack_project/files/jenkins_job_builder/config/macros.yaml b/modules/openstack_project/files/jenkins_job_builder/config/macros.yaml index 806c8df9f5..da6a807a32 100644 --- a/modules/openstack_project/files/jenkins_job_builder/config/macros.yaml +++ b/modules/openstack_project/files/jenkins_job_builder/config/macros.yaml @@ -57,11 +57,6 @@ builders: - shell: "/usr/local/jenkins/slave_scripts/run-pylint.sh {github-org} {project}" -- builder: - name: pyflakes - builders: - - shell: "/usr/local/jenkins/slave_scripts/run-pyflakes.sh {github-org} {project}" - - builder: name: puppet-lint builders: diff --git a/modules/openstack_project/files/jenkins_job_builder/config/projects.yaml b/modules/openstack_project/files/jenkins_job_builder/config/projects.yaml index 082c4cb964..6b3cf5eb59 100644 --- a/modules/openstack_project/files/jenkins_job_builder/config/projects.yaml +++ b/modules/openstack_project/files/jenkins_job_builder/config/projects.yaml @@ -68,7 +68,7 @@ jobs: - gate-{name}-puppet-lint - gate-{name}-puppet-syntax - - gate-{name}-pyflakes + - gate-{name}-pep8 - project: name: savanna @@ -231,7 +231,6 @@ jobs: - gate-{name}-pep8 - - gate-{name}-pyflakes - '{name}-tarball' - pypi-jobs @@ -244,7 +243,6 @@ jobs: - gate-{name}-pep8 - - gate-{name}-pyflakes - '{name}-tarball' - pypi-jobs @@ -431,7 +429,6 @@ jobs: - python-jobs - pypi-jobs - - gate-{name}-pyflakes - project: name: keystone @@ -532,7 +529,6 @@ - python-jobs - openstack-publish-jobs - pypi-jobs - - gate-{name}-pyflakes - project: @@ -546,7 +542,6 @@ - python-jobs - openstack-publish-jobs - pypi-jobs - - gate-{name}-pyflakes - project: name: oslo.sphinx @@ -559,7 +554,6 @@ - python-jobs - openstack-publish-jobs - pypi-jobs - - gate-{name}-pyflakes - project: @@ -585,7 +579,6 @@ jobs: - python-jobs - openstack-publish-jobs - - gate-{name}-pyflakes - project: @@ -856,7 +849,6 @@ jobs: - python-jobs - - gate-{name}-pyflakes - pypi-jobs @@ -919,7 +911,6 @@ jobs: - python-jobs - - gate-{name}-pyflakes - pypi-jobs @@ -1249,7 +1240,6 @@ jobs: - python-jobs - - gate-{name}-pyflakes - project: name: taskflow diff --git a/modules/openstack_project/files/jenkins_job_builder/config/python-jobs.yaml b/modules/openstack_project/files/jenkins_job_builder/config/python-jobs.yaml index a12e42b0c0..6d25e95deb 100644 --- a/modules/openstack_project/files/jenkins_job_builder/config/python-jobs.yaml +++ b/modules/openstack_project/files/jenkins_job_builder/config/python-jobs.yaml @@ -154,20 +154,6 @@ node: '{node}' -- job-template: - name: 'gate-{name}-pyflakes' - node: precise - - builders: - - gerrit-git-prep - - pyflakes: - github-org: '{github-org}' - project: '{name}' - - publishers: - - console-log - - - job-template: name: '{name}-tarball' node: precise @@ -235,5 +221,4 @@ - 'gate-{name}-requirements' - '{name}-tarball' - '{name}-branch-tarball' - # pyflakes isn't standard # pylint isn't standard diff --git a/modules/openstack_project/files/zuul/layout-dev.yaml b/modules/openstack_project/files/zuul/layout-dev.yaml index a17837dcd0..09690f8667 100644 --- a/modules/openstack_project/files/zuul/layout-dev.yaml +++ b/modules/openstack_project/files/zuul/layout-dev.yaml @@ -36,8 +36,6 @@ jobs: voting: false - name: gate-nova-python26 branch: ^(?!stable/folsom).*$ - - name: gate-oslo-incubator-pyflakes - branch: ^(?!stable/folsom).*$ - name: dev-zuul-coverage voting: false - name: dev-heat-coverage @@ -77,7 +75,6 @@ projects: check: - gate-zuul-pep8 - gate-zuul-docs - - gate-zuul-pyflakes - gate-zuul-python26 - gate-zuul-python27 - dev-zuul-coverage @@ -105,13 +102,11 @@ projects: - name: openstack-infra/jeepyb check: - gate-jeepyb-pep8 - - gate-jeepyb-pyflakes - name: openstack-infra/jenkins-job-builder check: - gate-jenkins-job-builder-docs - gate-jenkins-job-builder-pep8 - - gate-jenkins-job-builder-pyflakes - jenkins-job-builder-compare-xml - name: openstack-infra/lodgeit @@ -128,7 +123,7 @@ projects: - gate-config-layout - gate-config-puppet-lint - gate-config-puppet-syntax - - gate-config-pyflakes + - gate-config-pep8 - name: openstack-infra/puppet-apparmor check: @@ -145,7 +140,6 @@ projects: - name: openstack-infra/reviewday check: - gate-reviewday-pep8 - - gate-reviewday-pyflakes - name: openstack-infra/statusbot check: @@ -228,7 +222,6 @@ projects: - gate-oslo-incubator-requirements - gate-oslo-incubator-pep8 - gate-oslo-incubator-docs - - gate-oslo-incubator-pyflakes - gate-oslo-incubator-python26 - gate-oslo-incubator-python27 - gate-oslo-incubator-python33 @@ -509,14 +502,12 @@ projects: - name: stackforge/designate check: - - gate-designate-pyflakes - gate-designate-pep8 - gate-designate-python26 - gate-designate-python27 - name: stackforge/python-designateclient check: - - gate-python-designateclient-pyflakes - gate-python-designateclient-pep8 - gate-python-designateclient-python26 - gate-python-designateclient-python27 diff --git a/modules/openstack_project/files/zuul/layout.yaml b/modules/openstack_project/files/zuul/layout.yaml index 2790f90c95..2c15b6b8f9 100644 --- a/modules/openstack_project/files/zuul/layout.yaml +++ b/modules/openstack_project/files/zuul/layout.yaml @@ -162,8 +162,6 @@ jobs: branch: ^(?!stable/(folsom|grizzly)).*$ - name: gate-nova-python26 branch: ^(?!stable/folsom).*$ - - name: gate-oslo-incubator-pyflakes - branch: ^(?!stable/folsom).*$ - name: dev-zuul-coverage voting: false - name: jenkins-job-builder-compare-xml @@ -291,14 +289,12 @@ projects: check: - gate-zuul-pep8 - gate-zuul-docs - - gate-zuul-pyflakes - gate-zuul-python26 - gate-zuul-python27 - dev-zuul-coverage gate: - gate-zuul-docs - gate-zuul-pep8 - - gate-zuul-pyflakes - gate-zuul-python26 - gate-zuul-python27 post: @@ -397,10 +393,8 @@ projects: - name: openstack-infra/jeepyb check: - gate-jeepyb-pep8 - - gate-jeepyb-pyflakes gate: - gate-jeepyb-pep8 - - gate-jeepyb-pyflakes pre-release: - jeepyb-tarball release: @@ -428,14 +422,12 @@ projects: check: - gate-jenkins-job-builder-docs - gate-jenkins-job-builder-pep8 - - gate-jenkins-job-builder-pyflakes - gate-jenkins-job-builder-python26 - gate-jenkins-job-builder-python27 - jenkins-job-builder-compare-xml gate: - gate-jenkins-job-builder-docs - gate-jenkins-job-builder-pep8 - - gate-jenkins-job-builder-pyflakes - gate-jenkins-job-builder-python26 - gate-jenkins-job-builder-python27 post: @@ -468,13 +460,11 @@ projects: - gate-config-layout - gate-config-puppet-lint - gate-config-puppet-syntax - - gate-config-pyflakes - gate-ci-docs gate: - gate-config-layout - gate-config-puppet-lint - gate-config-puppet-syntax - - gate-config-pyflakes post: - ci-docs @@ -508,10 +498,8 @@ projects: - name: openstack-infra/reviewday check: - gate-reviewday-pep8 - - gate-reviewday-pyflakes gate: - gate-reviewday-pep8 - - gate-reviewday-pyflakes post: - reviewday-branch-tarball - reviewday-coverage @@ -852,14 +840,12 @@ projects: - gate-oslo-incubator-requirements - gate-oslo-incubator-pep8 - gate-oslo-incubator-docs - - gate-oslo-incubator-pyflakes - gate-oslo-incubator-python26 - gate-oslo-incubator-python27 gate: - gate-oslo-incubator-requirements - gate-oslo-incubator-docs - gate-oslo-incubator-pep8 - - gate-oslo-incubator-pyflakes - gate-oslo-incubator-python26 - gate-oslo-incubator-python27 experimental: @@ -2959,11 +2945,9 @@ projects: - name: stackforge/barbican check: - - gate-barbican-pyflakes - gate-barbican-pep8 - gate-barbican-python27 gate: - - gate-barbican-pyflakes - gate-barbican-pep8 - gate-barbican-python27 post: diff --git a/setup.cfg b/setup.cfg index 11d2c44221..8019e24b1b 100644 --- a/setup.cfg +++ b/setup.cfg @@ -1,3 +1,19 @@ +[metadata] +name = openstack-infra-config +summary = OpenStack Infrastructure Config +description-file = + README.md +author = OpenStack Infrastructure Team +author-email = openstack-infra@lists.openstack.org +home-page = http://ci.openstack.org/ +classifier = + Environment :: OpenStack + Intended Audience :: Information Technology + Intended Audience :: System Administrators + License :: OSI Approved :: Apache Software License + Operating System :: POSIX :: Linux + Programming Language :: Python + [build_sphinx] all_files = 1 build-dir = doc/build diff --git a/setup.py b/setup.py index 9c8bcb0286..c0a24eab2a 100644 --- a/setup.py +++ b/setup.py @@ -1,26 +1,21 @@ -import datetime -from setuptools import setup +#!/usr/bin/env python +# Copyright (c) 2013 Hewlett-Packard Development Company, L.P. +# +# 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. -ci_cmdclass = {} +import setuptools -try: - from sphinx.setup_command import BuildDoc - - class local_BuildDoc(BuildDoc): - def run(self): - for builder in ['html', 'man']: - self.builder = builder - self.finalize_options() - BuildDoc.run(self) - ci_cmdclass['build_sphinx'] = local_BuildDoc -except Exception: - pass - -setup(name='openstack-infra-config', - version="%d.%02d" % (datetime.datetime.now().year, - datetime.datetime.now().month), - description="OpenStack Infrastructure Config", - author="OpenStack Infrastructure Team", - author_email="openstack-infra@lists.launchpad.net", - url="http://ci.openstack.org", - cmdclass=ci_cmdclass) +setuptools.setup( + setup_requires=['pbr'], + pbr=True) diff --git a/test-requirements.txt b/test-requirements.txt new file mode 100644 index 0000000000..9e74fc196c --- /dev/null +++ b/test-requirements.txt @@ -0,0 +1,4 @@ +hacking>=0.5.6,<0.8 +sphinx>=1.1.2 +docutils==0.9.1 +oslo.sphinx diff --git a/tox.ini b/tox.ini index 23aca8e84d..dcbed91d7e 100644 --- a/tox.ini +++ b/tox.ini @@ -1,20 +1,23 @@ [tox] minversion = 1.6 -envlist = pyflakes,pep8 +envlist = pep8 +skipsdist = True [testenv] -install_command = pip install -U {opts} {packages} +usedevelop = True +install_command = pip install {opts} {packages} +deps = -r{toxinidir}/test-requirements.txt [testenv:pyflakes] -deps = pyflakes -commands = pyflakes modules setup.py +commands = flake8 [testenv:pep8] -deps = pep8 -commands = pep8 --count --repeat --show-source --exclude=.tox setup.py +commands = flake8 [testenv:venv] commands = {posargs} -deps = Sphinx - docutils==0.9.1 - oslo.sphinx + +[flake8] +show-source = True +exclude = .tox,modules +ignore = E125,H