Change setup.py to OS one
Change-Id: Ia23c12de5f6448793aa3584e3041711d68b92953
This commit is contained in:
parent
9f0d04fdba
commit
3e19273cc1
6
.coveragerc
Normal file
6
.coveragerc
Normal file
@ -0,0 +1,6 @@
|
||||
[run]
|
||||
branch = True
|
||||
omit = /usr*,setup.py,*egg*,.venv/*,.tox/*,test/*
|
||||
|
||||
[report]
|
||||
ignore_errors = True
|
2
.gitignore
vendored
2
.gitignore
vendored
@ -1,3 +1,5 @@
|
||||
*.egg-info
|
||||
*.py[co]
|
||||
.DS_Store
|
||||
.coverage
|
||||
cover
|
||||
|
3
AUTHORS
3
AUTHORS
@ -32,11 +32,12 @@ Eohyung Lee
|
||||
Fujita Tomonori
|
||||
Kapil Thangavelu
|
||||
Monty Taylor
|
||||
Ondrej Novy
|
||||
Ondřej Nový
|
||||
Pablo Llopis
|
||||
Paul Jimenez
|
||||
Prashanth Pai
|
||||
Pete Zaitcev
|
||||
Peter Lisák
|
||||
Rodney Beede
|
||||
Russ Nelson
|
||||
Scott Simpson
|
||||
|
17
CONTRIBUTING.rst
Normal file
17
CONTRIBUTING.rst
Normal file
@ -0,0 +1,17 @@
|
||||
If you would like to contribute to the development of OpenStack, you must
|
||||
follow the steps in this page:
|
||||
|
||||
http://docs.openstack.org/infra/manual/developers.html
|
||||
|
||||
If you already have a good understanding of how the system works and your
|
||||
OpenStack accounts are set up, you can skip to the development workflow
|
||||
section of this documentation to learn how changes to OpenStack should be
|
||||
submitted for review via the Gerrit tool:
|
||||
|
||||
http://docs.openstack.org/infra/manual/developers.html#development-workflow
|
||||
|
||||
Pull requests submitted through GitHub will be ignored.
|
||||
|
||||
Bugs should be filed on Launchpad, not GitHub:
|
||||
|
||||
https://bugs.launchpad.net/swauth
|
40
setup.cfg
40
setup.cfg
@ -1,3 +1,43 @@
|
||||
[metadata]
|
||||
name = swauth
|
||||
summary = An alternative authentication system for Swift
|
||||
description-file =
|
||||
README.md
|
||||
author = OpenStack
|
||||
author-email = openstack-dev@lists.openstack.org
|
||||
home-page = http://www.openstack.org/
|
||||
classifier =
|
||||
Development Status :: 5 - Production/Stable
|
||||
Environment :: OpenStack
|
||||
Intended Audience :: Information Technology
|
||||
Intended Audience :: System Administrators
|
||||
License :: OSI Approved :: Apache Software License
|
||||
Operating System :: POSIX :: Linux
|
||||
Programming Language :: Python
|
||||
Programming Language :: Python :: 2
|
||||
Programming Language :: Python :: 2.7
|
||||
|
||||
[pbr]
|
||||
skip_authors = True
|
||||
skip_changelog = True
|
||||
|
||||
[files]
|
||||
packages =
|
||||
swauth
|
||||
scripts =
|
||||
bin/swauth-add-account
|
||||
bin/swauth-add-user
|
||||
bin/swauth-cleanup-tokens
|
||||
bin/swauth-delete-account
|
||||
bin/swauth-delete-user
|
||||
bin/swauth-list
|
||||
bin/swauth-prep
|
||||
bin/swauth-set-account-service
|
||||
|
||||
[entry_points]
|
||||
paste.filter_factory =
|
||||
swauth = swauth.middleware:filter_factory
|
||||
|
||||
[build_sphinx]
|
||||
all_files = 1
|
||||
build-dir = doc/build
|
||||
|
84
setup.py
84
setup.py
@ -1,5 +1,4 @@
|
||||
#!/usr/bin/python
|
||||
# Copyright (c) 2010-2011 OpenStack, LLC.
|
||||
# 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.
|
||||
@ -14,76 +13,17 @@
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
from setuptools import setup, find_packages
|
||||
from setuptools.command.sdist import sdist
|
||||
import os
|
||||
import subprocess
|
||||
# THIS FILE IS MANAGED BY THE GLOBAL REQUIREMENTS REPO - DO NOT EDIT
|
||||
import setuptools
|
||||
|
||||
# In python < 2.7.4, a lazy loading of package `pbr` will break
|
||||
# setuptools if some other modules registered functions in `atexit`.
|
||||
# solution from: http://bugs.python.org/issue15881#msg170215
|
||||
try:
|
||||
from babel.messages import frontend
|
||||
import multiprocessing # noqa
|
||||
except ImportError:
|
||||
frontend = None
|
||||
pass
|
||||
|
||||
from swauth import __version__ as version
|
||||
|
||||
|
||||
class local_sdist(sdist):
|
||||
"""Customized sdist hook - builds the ChangeLog file from VC first"""
|
||||
|
||||
def run(self):
|
||||
if os.path.isdir('.bzr'):
|
||||
# We're in a bzr branch
|
||||
|
||||
log_cmd = subprocess.Popen(["bzr", "log", "--gnu"],
|
||||
stdout=subprocess.PIPE)
|
||||
changelog = log_cmd.communicate()[0]
|
||||
with open("ChangeLog", "w") as changelog_file:
|
||||
changelog_file.write(changelog)
|
||||
sdist.run(self)
|
||||
|
||||
|
||||
name = 'swauth'
|
||||
|
||||
|
||||
cmdclass = {'sdist': local_sdist}
|
||||
|
||||
|
||||
if frontend:
|
||||
cmdclass.update({
|
||||
'compile_catalog': frontend.compile_catalog,
|
||||
'extract_messages': frontend.extract_messages,
|
||||
'init_catalog': frontend.init_catalog,
|
||||
'update_catalog': frontend.update_catalog,
|
||||
})
|
||||
|
||||
|
||||
setup(
|
||||
name=name,
|
||||
version=version,
|
||||
description='Swauth',
|
||||
license='Apache License (2.0)',
|
||||
author='OpenStack, LLC.',
|
||||
author_email='swauth@brim.net',
|
||||
url='https://github.com/openstack/swauth',
|
||||
packages=find_packages(exclude=['test_swauth', 'bin']),
|
||||
test_suite='nose.collector',
|
||||
cmdclass=cmdclass,
|
||||
classifiers=[
|
||||
'Development Status :: 4 - Beta',
|
||||
'License :: OSI Approved :: Apache Software License',
|
||||
'Operating System :: POSIX :: Linux',
|
||||
'Programming Language :: Python :: 2.6',
|
||||
'Environment :: No Input/Output (Daemon)',
|
||||
],
|
||||
install_requires=[], # removed for better compat
|
||||
scripts=[
|
||||
'bin/swauth-add-account', 'bin/swauth-add-user',
|
||||
'bin/swauth-cleanup-tokens', 'bin/swauth-delete-account',
|
||||
'bin/swauth-delete-user', 'bin/swauth-list', 'bin/swauth-prep',
|
||||
'bin/swauth-set-account-service',
|
||||
],
|
||||
entry_points={
|
||||
'paste.filter_factory': [
|
||||
'swauth=swauth.middleware:filter_factory',
|
||||
],
|
||||
},
|
||||
)
|
||||
setuptools.setup(
|
||||
setup_requires=['pbr'],
|
||||
pbr=True)
|
||||
|
@ -6,7 +6,7 @@ hacking<0.11,>=0.10.0
|
||||
flake8
|
||||
mock
|
||||
nose
|
||||
#coverage>=3.6
|
||||
coverage>=3.6
|
||||
#discover
|
||||
#python-subunit>=0.0.18
|
||||
sphinx!=1.2.0,!=1.3b1,<1.3,>=1.1.2
|
||||
|
19
tox.ini
19
tox.ini
@ -7,23 +7,28 @@ skipsdist = True
|
||||
basepython = python2.7
|
||||
usedevelop = True
|
||||
install_command = pip install -U {opts} {packages}
|
||||
setenv =
|
||||
VIRTUAL_ENV={envdir}
|
||||
setenv = VIRTUAL_ENV={envdir}
|
||||
NOSE_WITH_COVERAGE=1
|
||||
NOSE_COVER_BRANCHES=1
|
||||
deps =
|
||||
-r{toxinidir}/requirements.txt
|
||||
-r{toxinidir}/test-requirements.txt
|
||||
https://launchpad.net/swift/kilo/2.3.0/+download/swift-2.3.0.tar.gz
|
||||
commands = python setup.py test
|
||||
commands = nosetests {posargs:test/unit}
|
||||
|
||||
[testenv:cover]
|
||||
setenv = VIRTUAL_ENV={envdir}
|
||||
NOSE_WITH_COVERAGE=1
|
||||
NOSE_COVER_BRANCHES=1
|
||||
NOSE_COVER_HTML=1
|
||||
NOSE_COVER_HTML_DIR={toxinidir}/cover
|
||||
|
||||
[testenv:pep8]
|
||||
commands = flake8 swauth test_swauth
|
||||
commands = flake8 swauth test
|
||||
|
||||
[testenv:venv]
|
||||
commands = {posargs}
|
||||
|
||||
#[testenv:cover]
|
||||
#commands = python setup.py test --coverage
|
||||
|
||||
[testenv:docs]
|
||||
commands = python setup.py build_sphinx
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user