Add setup.cfg and pbr support.
This patch fix a bug when installing a swift3 on devstack. Because devstack uses pbr/requirements.txt to sync global requirements, we need to add setup.cfg and pbr support to swift3 so it can be installed on devstack. This also allow to take advantage of the pbr facilities (version number support, etc) Change-Id: Id0179fad179efac5ba85bef7838365a4d304d196
This commit is contained in:
parent
a4a6d397dc
commit
75c1cc075d
1
requirements.txt
Normal file
1
requirements.txt
Normal file
@ -0,0 +1 @@
|
|||||||
|
swift>=1.8
|
32
setup.cfg
Normal file
32
setup.cfg
Normal file
@ -0,0 +1,32 @@
|
|||||||
|
[metadata]
|
||||||
|
name = swift3
|
||||||
|
version = 1.7.0
|
||||||
|
summary = Swift AmazonS3 API emulation Middleware
|
||||||
|
description-file =
|
||||||
|
README.md
|
||||||
|
author = OpenStack Foundation
|
||||||
|
author-email = openstack-dev@lists.openstack.org
|
||||||
|
home-page = https://github.com/stackforge/swift3
|
||||||
|
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.6
|
||||||
|
Programming Language :: Python :: 2.7
|
||||||
|
|
||||||
|
[pbr]
|
||||||
|
skip_authors = True
|
||||||
|
skip_changelog = True
|
||||||
|
|
||||||
|
[files]
|
||||||
|
packages =
|
||||||
|
swift3
|
||||||
|
|
||||||
|
[entry_points]
|
||||||
|
paste.filter_factory =
|
||||||
|
swift3 = swift3.middleware:filter_factory
|
21
setup.py
21
setup.py
@ -9,22 +9,13 @@
|
|||||||
#
|
#
|
||||||
# Unless required by applicable law or agreed to in writing, software
|
# Unless required by applicable law or agreed to in writing, software
|
||||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
||||||
|
# implied.
|
||||||
# See the License for the specific language governing permissions and
|
# See the License for the specific language governing permissions and
|
||||||
# limitations under the License.
|
# limitations under the License.
|
||||||
|
|
||||||
from setuptools import setup
|
import setuptools
|
||||||
|
|
||||||
import swift3
|
setuptools.setup(
|
||||||
|
setup_requires=['pbr'],
|
||||||
|
pbr=True)
|
||||||
setup(name='swift3',
|
|
||||||
version=swift3.version,
|
|
||||||
description='Swift AmazonS3 API emulation Middleware',
|
|
||||||
author='OpenStack Foundation',
|
|
||||||
author_email='openstack-dev@lists.openstack.org',
|
|
||||||
url='https://github.com/stackforge/swift3',
|
|
||||||
packages=['swift3'],
|
|
||||||
requires=['swift(>=1.4)'],
|
|
||||||
entry_points={'paste.filter_factory':
|
|
||||||
['swift3=swift3.middleware:filter_factory']})
|
|
||||||
|
@ -15,10 +15,17 @@
|
|||||||
"""
|
"""
|
||||||
Static Web Middleware for OpenStack Swift
|
Static Web Middleware for OpenStack Swift
|
||||||
"""
|
"""
|
||||||
|
import pbr.version
|
||||||
|
|
||||||
__all__ = ['version_info', 'version']
|
__all__ = ['version_info', 'version']
|
||||||
|
|
||||||
#: Version information ``(major, minor, revision)``.
|
# get version info using pbr.version.
|
||||||
version_info = (1, 7, 0)
|
# pbr version info is inferred from version in setup.cfg
|
||||||
|
# and vcs information.
|
||||||
|
_version_info = pbr.version.VersionInfo('swift3')
|
||||||
|
|
||||||
#: Version string ``'major.minor.revision'``.
|
#: Version string ``'major.minor.revision'``.
|
||||||
version = '.'.join(map(str, version_info))
|
version = _version_info.version_string()
|
||||||
|
|
||||||
|
#: Version information ``(major, minor, revision)``.
|
||||||
|
version_info = version.split('.')
|
||||||
|
Loading…
Reference in New Issue
Block a user