forked from pool/python-acitoolkit
Accepting request 686813 from home:jayvdb:branches:devel:languages:python
- Remove runtime dependencies from the library - Add NOTICE to %license - Create sub-packages -doc, -doc-applications and -doc-samples OBS-URL: https://build.opensuse.org/request/show/686813 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-acitoolkit?expand=0&rev=8
This commit is contained in:
committed by
Git OBS Bridge
parent
584c63cd7c
commit
460b851ac8
@@ -1,3 +1,10 @@
|
||||
-------------------------------------------------------------------
|
||||
Tue Mar 19 15:41:31 UTC 2019 - John Vandenberg <jayvdb@gmail.com>
|
||||
|
||||
- Remove runtime dependencies from the library
|
||||
- Add NOTICE to %license
|
||||
- Create sub-packages -doc, -doc-applications and -doc-samples
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Thu Nov 1 09:09:18 UTC 2018 - Jan Engelhardt <jengelh@inai.de>
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
#
|
||||
# spec file for package python-acitoolkit
|
||||
#
|
||||
# Copyright (c) 2018 SUSE LINUX GmbH, Nuernberg, Germany.
|
||||
# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany.
|
||||
#
|
||||
# All modifications and additions to the file contributed by third parties
|
||||
# remain the property of their copyright owners, unless otherwise agreed
|
||||
@@ -16,7 +16,6 @@
|
||||
#
|
||||
|
||||
|
||||
%global sname acitoolkit
|
||||
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
|
||||
Name: python-acitoolkit
|
||||
Version: 0.4
|
||||
@@ -26,14 +25,7 @@ License: Apache-2.0
|
||||
Group: Development/Languages/Python
|
||||
URL: http://github.com/datacenter/acitoolkit
|
||||
Source: https://github.com/datacenter/acitoolkit/archive/v%{version}.tar.gz
|
||||
BuildRequires: %{python_module Flask-Admin}
|
||||
BuildRequires: %{python_module Flask-Bootstrap}
|
||||
BuildRequires: %{python_module Flask-HTTPAuth}
|
||||
BuildRequires: %{python_module Flask-SQLAlchemy}
|
||||
BuildRequires: %{python_module Flask-WTF}
|
||||
BuildRequires: %{python_module Flask}
|
||||
BuildRequires: %{python_module GitPython}
|
||||
BuildRequires: %{python_module PyMySQL}
|
||||
Patch0: remove-app-dependency.patch
|
||||
BuildRequires: %{python_module graphviz}
|
||||
BuildRequires: %{python_module jsonschema}
|
||||
BuildRequires: %{python_module mock}
|
||||
@@ -42,16 +34,9 @@ BuildRequires: %{python_module requests}
|
||||
BuildRequires: %{python_module setuptools}
|
||||
BuildRequires: %{python_module tabulate}
|
||||
BuildRequires: %{python_module websocket-client > 0.33.0}
|
||||
BuildRequires: dos2unix
|
||||
BuildRequires: fdupes
|
||||
BuildRequires: python-rpm-macros
|
||||
Requires: python-Flask
|
||||
Requires: python-Flask-Admin
|
||||
Requires: python-Flask-Bootstrap
|
||||
Requires: python-Flask-HTTPAuth
|
||||
Requires: python-Flask-SQLAlchemy
|
||||
Requires: python-Flask-WTF
|
||||
Requires: python-GitPython
|
||||
Requires: python-PyMySQL
|
||||
Requires: python-graphviz
|
||||
Requires: python-jsonschema
|
||||
Requires: python-requests
|
||||
@@ -64,9 +49,60 @@ BuildArch: noarch
|
||||
Python Library for configuring the Cisco Application Policy
|
||||
Infrastructure Controller.
|
||||
|
||||
%package -n %{name}-doc
|
||||
Summary: Documentation for the Python acitoolkit library
|
||||
Group: Documentation/Other
|
||||
Provides: %{python_module acitoolkit-doc = %{version}}
|
||||
|
||||
%description -n %{name}-doc
|
||||
Documentation for %name.
|
||||
|
||||
%package -n %{name}-doc-applications
|
||||
Summary: Applications for the Python acitoolkit library
|
||||
Group: Development/Languages/Python
|
||||
Provides: %{python_module acitoolkit-doc-applications = %{version}}
|
||||
Requires: %{name}-doc
|
||||
Requires: python-Flask
|
||||
Requires: python-Flask-Admin
|
||||
Requires: python-Flask-Bootstrap
|
||||
Requires: python-Flask-Cors
|
||||
Requires: python-Flask-HTTPAuth
|
||||
Requires: python-Flask-SQLAlchemy
|
||||
Requires: python-Flask-WTF
|
||||
Requires: python-GitPython
|
||||
Requires: python-deepdiff
|
||||
Requires: python-py-radix
|
||||
|
||||
%description -n %{name}-doc-applications
|
||||
Python applications using acitoolkit for programming ACI.
|
||||
|
||||
%package -n %{name}-doc-samples
|
||||
Summary: Sample code for the Python acitoolkit library
|
||||
Group: Development/Languages/Python
|
||||
Provides: %{python_module acitoolkit-doc-samples = %{version}}
|
||||
Requires: %{name}-doc
|
||||
Requires: python-PyMySQL
|
||||
|
||||
%description -n %{name}-doc-samples
|
||||
Python samples for using acitoolkit for programming ACI.
|
||||
|
||||
%prep
|
||||
%setup -q -n acitoolkit-%{version}
|
||||
chmod -x LICENSE
|
||||
# Remove dependencies of applications/ and samples/ from the library
|
||||
%patch0 -p1
|
||||
|
||||
chmod -x LICENSE NOTICE
|
||||
|
||||
sed -i '1{/^#!.*env python/d}' acitoolkit/*.py samples/*.py samples/switch-commands/*.py
|
||||
|
||||
rm applications/cableplan/.coverage applications/eventfeeds/.gitignore
|
||||
|
||||
dos2unix \
|
||||
samples/aci-add-static-binding-leaves.py \
|
||||
applications/configpush/json_schema.json \
|
||||
applications/search/static/*.css applications/search/static/*.js \
|
||||
applications/connection_search/static/*.js \
|
||||
applications/reports/static/*.css applications/reports/static/*.js
|
||||
|
||||
%build
|
||||
%python_build
|
||||
@@ -75,12 +111,32 @@ chmod -x LICENSE
|
||||
%python_install
|
||||
%python_expand %fdupes %{buildroot}%{$python_sitelib}
|
||||
|
||||
# Install docs, samples and applications into a common doc area
|
||||
install -d %{buildroot}%_defaultdocdir/%{name}
|
||||
cp -rp docs/source/*.rst docs/source/*.png docs/source/stats/ samples/ applications/ %{buildroot}%_defaultdocdir/%{name}/
|
||||
find %{buildroot}%_defaultdocdir/%{name}/ -type f -exec chmod a-x \{\} \;
|
||||
|
||||
%fdupes %{buildroot}%_defaultdocdir/%{name}/
|
||||
|
||||
%check
|
||||
%python_expand PYTHONPATH=%{buildroot}%{$python_sitelib} $python tests/acitoolkit_test.py offline
|
||||
|
||||
%files -n %{name}-doc
|
||||
%license LICENSE NOTICE
|
||||
%dir %_defaultdocdir/%{name}
|
||||
%_defaultdocdir/%{name}/*.rst
|
||||
%_defaultdocdir/%{name}/*.png
|
||||
%_defaultdocdir/%{name}/stats/
|
||||
|
||||
%files -n %{name}-doc-samples
|
||||
%_defaultdocdir/%{name}/samples/
|
||||
|
||||
%files -n %{name}-doc-applications
|
||||
%_defaultdocdir/%{name}/applications/
|
||||
|
||||
%files %{python_files}
|
||||
%doc README.md
|
||||
%license LICENSE
|
||||
%license LICENSE NOTICE
|
||||
%{python_sitelib}/acitoolkit
|
||||
%{python_sitelib}/acitoolkit-*.egg-info
|
||||
|
||||
|
||||
25
remove-app-dependency.patch
Normal file
25
remove-app-dependency.patch
Normal file
@@ -0,0 +1,25 @@
|
||||
--- acitoolkit-0.4/setup.py.orig 2019-03-19 12:54:59.889072645 +0700
|
||||
+++ acitoolkit-0.4/setup.py 2019-03-19 12:56:35.661890919 +0700
|
||||
@@ -21,21 +21,10 @@
|
||||
license=about["__license__"],
|
||||
install_requires=["requests",
|
||||
"websocket-client>0.33.0",
|
||||
- "gitpython",
|
||||
- "flask-httpauth",
|
||||
- "flask-sqlalchemy",
|
||||
- "flask-admin",
|
||||
- "flask-bootstrap",
|
||||
- "flask-wtf",
|
||||
- "flask-cors",
|
||||
- "flask",
|
||||
- "pymysql",
|
||||
"tabulate",
|
||||
- "py-radix",
|
||||
"jsonschema",
|
||||
"graphviz",
|
||||
- "ipaddress",
|
||||
- "deepdiff"],
|
||||
+ ],
|
||||
tests_requires=["mock"],
|
||||
description="This library allows basic Cisco ACI APIC configuration.",
|
||||
)
|
||||
Reference in New Issue
Block a user