Update to use setuptools_scm for release version generation

To support openstack-infra we store the release version in git
tags and use setuptools_scm to extract that tag in the setup
file when generating sdist and wheel files.

This patch includes the use of the new xstatic-release tool
which handles the majority of management of metadata to support
the infra release process.

Change-Id: I14e0b5986d3433afd796ea44e66dfafd5003e732
This commit is contained in:
Richard Jones 2015-12-03 16:29:08 +11:00
parent d799a1c60e
commit eebdf56d4f
6 changed files with 33 additions and 29 deletions

3
.gitignore vendored
View File

@ -5,5 +5,6 @@
*.egg-info
.venv
.tox
build
dist
.eggs
MANIFEST

View File

@ -1,8 +1,6 @@
include README.txt
recursive-include xstatic/pkg/angular_bootstrap *
recursive-include xstatic *
global-exclude *.pyc
global-exclude *.pyo
global-exclude *.orig
global-exclude *.rej

View File

@ -11,3 +11,8 @@ the XStatic base package, if you like.
You can find more info about the xstatic packaging way in the package `XStatic`.
Maintenance
-----------
To release this package you must use the xstatic-release tool.

20
setup.cfg Normal file
View File

@ -0,0 +1,20 @@
[metadata]
name = XStatic-Angular-Bootstrap
summary = Angular-Bootstrap 0.11.0 (XStatic packaging standard)
description-file = README.rst
maintainer = Maxime Vidori
maintainer-email = maxime.vidori@enovance.com
home-page = http://angular-ui.github.io/bootstrap/
keywords = angular_bootstrap xstatic
license = (same as Angular-Bootstrap)
zip_safe = False
namespace_packages =
xstatic
xstatic.pkg
[files]
packages =
xstatic
[bdist_wheel]
universal = True

View File

@ -1,27 +1,7 @@
from xstatic.pkg import angular_bootstrap as xs
# The README.txt file should be written in reST so that PyPI can use
# it to generate your project's PyPI page.
long_description = open('README.txt').read()
from setuptools import setup, find_packages
setup(
name=xs.PACKAGE_NAME,
version=xs.PACKAGE_VERSION,
description=xs.DESCRIPTION,
long_description=long_description,
classifiers=xs.CLASSIFIERS,
keywords=xs.KEYWORDS,
maintainer=xs.MAINTAINER,
maintainer_email=xs.MAINTAINER_EMAIL,
license=xs.LICENSE,
url=xs.HOMEPAGE,
platforms=xs.PLATFORMS,
packages=find_packages(),
namespace_packages=['xstatic', 'xstatic.pkg', ],
include_package_data=True,
zip_safe=False,
install_requires=[], # nothing! :)
# if you like, you MAY use the 'XStatic' package.
name='XStatic-Angular-Bootstrap',
use_scm_version=True,
setup_requires=['setuptools_scm', 'wheel'],
packages=find_packages()
)

View File

@ -13,7 +13,7 @@ NAME = __name__.split('.')[-1] # package name (e.g. 'foo' or 'foo_bar')
VERSION = '0.11.0' # version of the packaged files, please use the upstream
# version number
BUILD = '3' # our package build number, so we can release new builds
BUILD = '4' # our package build number, so we can release new builds
# with fixes for xstatic stuff.
PACKAGE_VERSION = VERSION + '.' + BUILD # version used for PyPi