forked from pool/python-cliff
Accepting request 544429 from devel:languages:python
- update to version 2.9.1 - doc: minor cleanup - trivial: Fix comments in sphinxext module - add actual column names to error msg - handle more varied top_level.txt files in distributions - Allow command hooks to make changes - Move comments up in [extras] section of setup.cfg - Update doc on Sphinx integration process - show the distribution providing the command in help output - Update and replace http with https for doc links - Make openstackdocstheme an optional doc dependency - Docs update for more-hooks - sphinxext: Correct issues with usage formatting - Fix regexp for detecting long options - Updates for stestr - Updated from global requirements - Drop 0001-Make-openstackdocstheme-an-optional-doc-dependency.patch . Applied upstream - Add _service and switch to openstack/rpm-packging spec template OBS-URL: https://build.opensuse.org/request/show/544429 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-cliff?expand=0&rev=30
This commit is contained in:
@@ -1,109 +0,0 @@
|
||||
From 5c37935139892a96fe11a563dda9fdcce31edba4 Mon Sep 17 00:00:00 2001
|
||||
From: Thomas Bechtold <tbechtold@suse.com>
|
||||
Date: Mon, 7 Aug 2017 09:28:04 +0200
|
||||
Subject: [PATCH] Make openstackdocstheme an optional doc dependency
|
||||
|
||||
cliff is a library that is used outside of OpenStack, too. Having
|
||||
a build requirement that needs something OpenStack specific makes
|
||||
life in cases (eg. for downstream packagers) more difficult.
|
||||
So let's make openstackdocstheme an optional requirement.
|
||||
|
||||
Change-Id: I0f94a431be083b8b4baec850b1885ba07b5bf5c2
|
||||
---
|
||||
doc/source/conf.py | 19 +++++++++++++++----
|
||||
setup.cfg | 7 +++++++
|
||||
test-requirements.txt | 1 -
|
||||
tox.ini | 1 +
|
||||
4 files changed, 23 insertions(+), 5 deletions(-)
|
||||
|
||||
Index: cliff-2.8.0/doc/source/conf.py
|
||||
===================================================================
|
||||
--- cliff-2.8.0.orig/doc/source/conf.py
|
||||
+++ cliff-2.8.0/doc/source/conf.py
|
||||
@@ -15,7 +15,15 @@
|
||||
import datetime
|
||||
import subprocess
|
||||
|
||||
-import openstackdocstheme
|
||||
+# make openstackdocstheme an optional dependency. cliff is a low level lib
|
||||
+# that is used outside of OpenStack. Not having something OpenStack specific
|
||||
+# as build requirement is a good thing.
|
||||
+try:
|
||||
+ import openstackdocstheme
|
||||
+except ImportError:
|
||||
+ has_openstackdocstheme = False
|
||||
+else:
|
||||
+ has_openstackdocstheme = True
|
||||
|
||||
# If extensions (or modules to document with autodoc) are in another directory,
|
||||
# add these directories to sys.path here. If the directory is relative to the
|
||||
@@ -32,8 +40,9 @@ import openstackdocstheme
|
||||
# ones.
|
||||
extensions = [
|
||||
'sphinx.ext.autodoc',
|
||||
- 'openstackdocstheme',
|
||||
]
|
||||
+if has_openstackdocstheme:
|
||||
+ extensions.append('openstackdocstheme')
|
||||
|
||||
# openstackdocstheme options
|
||||
repository_name = 'openstack/cliff'
|
||||
@@ -109,7 +118,8 @@ pygments_style = 'sphinx'
|
||||
# The theme to use for HTML and HTML Help pages. See the documentation for
|
||||
# a list of builtin themes.
|
||||
# html_theme = 'default'
|
||||
-html_theme = 'openstackdocs'
|
||||
+if has_openstackdocstheme:
|
||||
+ html_theme = 'openstackdocs'
|
||||
|
||||
# Theme options are theme-specific and customize the look and feel of a theme
|
||||
# further. For a list of options available for each theme, see the
|
||||
@@ -118,7 +128,8 @@ html_theme = 'openstackdocs'
|
||||
|
||||
# Add any paths that contain custom themes here, relative to this directory.
|
||||
# html_theme_path = []
|
||||
-html_theme_path = [openstackdocstheme.get_html_theme_path()]
|
||||
+if has_openstackdocstheme:
|
||||
+ html_theme_path = [openstackdocstheme.get_html_theme_path()]
|
||||
|
||||
# The name for this set of Sphinx documents. If None, it defaults to
|
||||
# "<project> v<release> documentation".
|
||||
Index: cliff-2.8.0/setup.cfg
|
||||
===================================================================
|
||||
--- cliff-2.8.0.orig/setup.cfg
|
||||
+++ cliff-2.8.0/setup.cfg
|
||||
@@ -16,6 +16,13 @@ classifier =
|
||||
Intended Audience :: Developers
|
||||
Environment :: Console
|
||||
|
||||
+[extras]
|
||||
+docs =
|
||||
+ # make openstackdocstheme an optional dependency. cliff is a low level lib
|
||||
+ # that is used outside of OpenStack. Not having something OpenStack specific
|
||||
+ # as build requirement is a good thing.
|
||||
+ openstackdocstheme>=1.16.0 # Apache-2.0
|
||||
+
|
||||
[global]
|
||||
setup-hooks =
|
||||
pbr.hooks.setup_hook
|
||||
Index: cliff-2.8.0/test-requirements.txt
|
||||
===================================================================
|
||||
--- cliff-2.8.0.orig/test-requirements.txt
|
||||
+++ cliff-2.8.0/test-requirements.txt
|
||||
@@ -12,4 +12,3 @@ coverage!=4.4,>=4.0 # Apache-2.0
|
||||
|
||||
# this is required for the docs build jobs
|
||||
sphinx>=1.6.2 # BSD
|
||||
-openstackdocstheme>=1.11.0 # Apache-2.0
|
||||
Index: cliff-2.8.0/tox.ini
|
||||
===================================================================
|
||||
--- cliff-2.8.0.orig/tox.ini
|
||||
+++ cliff-2.8.0/tox.ini
|
||||
@@ -15,6 +15,7 @@ commands =
|
||||
python setup.py test --coverage --coverage-package-name=cliff --slowest --testr-args='{posargs}'
|
||||
coverage report --show-missing
|
||||
deps = -r{toxinidir}/test-requirements.txt
|
||||
+ .[docs]
|
||||
|
||||
[testenv:pep8]
|
||||
deps = flake8
|
||||
12
_service
Normal file
12
_service
Normal file
@@ -0,0 +1,12 @@
|
||||
<services>
|
||||
<service mode="disabled" name="renderspec">
|
||||
<param name="input-template">https://raw.githubusercontent.com/openstack/rpm-packaging/master/openstack/cliff/cliff.spec.j2</param>
|
||||
<param name="output-name">python-cliff.spec</param>
|
||||
<param name="requirements">https://raw.githubusercontent.com/openstack/rpm-packaging/master/global-requirements.txt</param>
|
||||
<param name="changelog-email">cloud-devel@suse.de</param>
|
||||
<param name="changelog-provider">gh,openstack,cliff</param>
|
||||
</service>
|
||||
<service mode="disabled" name="download_files">
|
||||
</service>
|
||||
<service name="format_spec_file" mode="disabled"/>
|
||||
</services>
|
||||
@@ -1,3 +0,0 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:a4fd35b3d98f5f806b6f38c97559ad671376f7d54d1e29015dbd6d805a13ff46
|
||||
size 71815
|
||||
3
cliff-2.9.1.tar.gz
Normal file
3
cliff-2.9.1.tar.gz
Normal file
@@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:ab50fbb4717c74e32915123f4150805b463e81de1d58e43996fd813b26c5b447
|
||||
size 73174
|
||||
@@ -1,3 +1,26 @@
|
||||
-------------------------------------------------------------------
|
||||
Wed Nov 22 09:40:38 UTC 2017 - cloud-devel@suse.de
|
||||
|
||||
- update to version 2.9.1
|
||||
- doc: minor cleanup
|
||||
- trivial: Fix comments in sphinxext module
|
||||
- add actual column names to error msg
|
||||
- handle more varied top_level.txt files in distributions
|
||||
- Allow command hooks to make changes
|
||||
- Move comments up in [extras] section of setup.cfg
|
||||
- Update doc on Sphinx integration process
|
||||
- show the distribution providing the command in help output
|
||||
- Update and replace http with https for doc links
|
||||
- Make openstackdocstheme an optional doc dependency
|
||||
- Docs update for more-hooks
|
||||
- sphinxext: Correct issues with usage formatting
|
||||
- Fix regexp for detecting long options
|
||||
- Updates for stestr
|
||||
- Updated from global requirements
|
||||
- Drop 0001-Make-openstackdocstheme-an-optional-doc-dependency.patch .
|
||||
Applied upstream
|
||||
- Add _service and switch to openstack/rpm-packging spec template
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Mon Aug 7 07:15:16 UTC 2017 - tbechtold@suse.com
|
||||
|
||||
|
||||
@@ -17,52 +17,62 @@
|
||||
|
||||
|
||||
Name: python-cliff
|
||||
Version: 2.8.0
|
||||
Version: 2.9.1
|
||||
Release: 0
|
||||
Url: https://github.com/dreamhost/cliff
|
||||
Summary: Command Line Interface Formulation Framework
|
||||
License: Apache-2.0
|
||||
Group: Development/Languages/Python
|
||||
Source: https://files.pythonhosted.org/packages/source/c/cliff/cliff-%{version}.tar.gz
|
||||
# PATCH-FEATURE-UPSTREAM 0001-Make-openstackdocstheme-an-optional-doc-dependency.patch -- https://review.openstack.org/491378
|
||||
Patch1: 0001-Make-openstackdocstheme-an-optional-doc-dependency.patch
|
||||
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
||||
BuildRequires: python-argparse
|
||||
Url: https://launchpad.net/python-cliff
|
||||
Source0: https://files.pythonhosted.org/packages/source/c/cliff/cliff-2.9.1.tar.gz
|
||||
BuildRequires: openstack-macros
|
||||
BuildRequires: python-devel
|
||||
BuildRequires: python-setuptools
|
||||
# Test requirements:
|
||||
BuildRequires: python-PrettyTable
|
||||
BuildRequires: python-Sphinx
|
||||
BuildRequires: python-cmd2
|
||||
BuildRequires: python-coverage >= 3.6
|
||||
BuildRequires: python-httplib2 >= 0.7.5
|
||||
BuildRequires: python-mock >= 2.0
|
||||
BuildRequires: python-nose
|
||||
BuildRequires: python-oslosphinx
|
||||
BuildRequires: python-pbr
|
||||
BuildRequires: python-pyparsing >= 2.1.0
|
||||
BuildRequires: python-six
|
||||
BuildRequires: python-stevedore
|
||||
Requires: python-PrettyTable >= 0.7
|
||||
Requires: python-PyYAML >= 3.10.0
|
||||
Requires: python-cmd2 >= 0.6.7
|
||||
Requires: python-pyparsing >= 2.1.0
|
||||
Requires: python-six >= 1.9.0
|
||||
Requires: python-stevedore >= 1.20.0
|
||||
Requires: python-unicodecsv >= 0.8.0
|
||||
BuildRequires: python2-PrettyTable
|
||||
BuildRequires: python2-PyYAML
|
||||
BuildRequires: python2-cmd2
|
||||
BuildRequires: python2-mock
|
||||
BuildRequires: python2-pbr
|
||||
BuildRequires: python2-python-subunit
|
||||
BuildRequires: python2-setuptools
|
||||
BuildRequires: python2-stevedore
|
||||
BuildRequires: python2-testrepository
|
||||
BuildRequires: python2-testscenarios
|
||||
BuildRequires: python2-testtools
|
||||
BuildRequires: python2-unicodecsv
|
||||
BuildRequires: python3-PrettyTable
|
||||
BuildRequires: python3-PyYAML
|
||||
BuildRequires: python3-cmd2
|
||||
BuildRequires: python3-devel
|
||||
BuildRequires: python3-mock
|
||||
BuildRequires: python3-pbr
|
||||
BuildRequires: python3-python-subunit
|
||||
BuildRequires: python3-setuptools
|
||||
BuildRequires: python3-stevedore
|
||||
BuildRequires: python3-testrepository
|
||||
BuildRequires: python3-testscenarios
|
||||
BuildRequires: python3-testtools
|
||||
BuildRequires: python3-unicodecsv
|
||||
Requires: python-PrettyTable
|
||||
Requires: python-PyYAML
|
||||
Requires: python-cmd2
|
||||
Requires: python-pyparsing
|
||||
Requires: python-six
|
||||
Requires: python-stevedore
|
||||
Requires: python-unicodecsv
|
||||
BuildArch: noarch
|
||||
%python_subpackages
|
||||
|
||||
%description
|
||||
cliff is a framework for building command line programs. It uses
|
||||
setuptools entry points to provide subcommands, output formatters, and
|
||||
other extensions.
|
||||
|
||||
%package doc
|
||||
Summary: Command Line Interface Formulation Framework - Documentation
|
||||
%package -n python-cliff-doc
|
||||
Summary: %{summary} - Documentation
|
||||
Group: Documentation/HTML
|
||||
Requires: %{name} = %{version}
|
||||
BuildRequires: python2-Sphinx
|
||||
Provides: %{python_module cliff-doc = %{version}}
|
||||
|
||||
%description doc
|
||||
%description -n python-cliff-doc
|
||||
cliff is a framework for building command line programs. It uses
|
||||
setuptools entry points to provide subcommands, output formatters, and
|
||||
other extensions.
|
||||
@@ -70,28 +80,31 @@ other extensions.
|
||||
This package contains documentation files for %{name}.
|
||||
|
||||
%prep
|
||||
%setup -q -n cliff-%{version}
|
||||
%patch1 -p1
|
||||
%autosetup -p1 -n cliff-2.9.1
|
||||
sed -i 's/^warning-is-error.*/warning-is-error = 0/g' setup.cfg
|
||||
%py_req_cleanup
|
||||
|
||||
%build
|
||||
python setup.py build
|
||||
python setup.py build_sphinx
|
||||
%python_build
|
||||
%{__python2} setup.py build_sphinx
|
||||
rm -rf doc/build/html/.{doctrees,buildinfo}
|
||||
|
||||
%install
|
||||
python setup.py install --prefix=%{_prefix} --root=%{buildroot}
|
||||
%python_install
|
||||
|
||||
%check
|
||||
echo > test-requirements.txt
|
||||
echo > requirements.txt
|
||||
python setup.py test
|
||||
%{python_expand rm -rf .testrepository
|
||||
$python setup.py test
|
||||
}
|
||||
|
||||
%files
|
||||
%defattr(-,root,root,-)
|
||||
%doc LICENSE README.rst
|
||||
%{python_sitelib}/*
|
||||
%files %{python_files}
|
||||
%license LICENSE
|
||||
%doc ChangeLog README.rst
|
||||
%{python_sitelib}/cliff
|
||||
%{python_sitelib}/*.egg-info
|
||||
|
||||
%files doc
|
||||
%defattr(-,root,root,-)
|
||||
%doc doc/build/html demoapp
|
||||
%files -n python-cliff-doc
|
||||
%license LICENSE
|
||||
%doc doc/build/html
|
||||
|
||||
%changelog
|
||||
|
||||
Reference in New Issue
Block a user