add python-graphviz software and spec file
This commit is contained in:
parent
beb4e9ca58
commit
bf3bbcd750
BIN
graphviz-0.8.3.zip
Normal file
BIN
graphviz-0.8.3.zip
Normal file
Binary file not shown.
109
python-graphviz.spec
Normal file
109
python-graphviz.spec
Normal file
@ -0,0 +1,109 @@
|
|||||||
|
%global common_description %{expand:
|
||||||
|
This package makes it easier to create and render a graph description in
|
||||||
|
the DOT language which from the Python Graphviz graph drawing software.
|
||||||
|
|
||||||
|
You can create and assemble a graph object by adding nodes and edges with
|
||||||
|
the package. Also the graph can be saved to a file by retrieving its DOT
|
||||||
|
source code string, then you can render the graph with the Graphviz graph
|
||||||
|
drawing software.}
|
||||||
|
|
||||||
|
Name: python-graphviz
|
||||||
|
Version: 0.8.3
|
||||||
|
Release: 4
|
||||||
|
# Set Epoch to avoid being obsoleted by graphviz-python
|
||||||
|
Epoch: 1
|
||||||
|
Summary: Simple Python interface for Graphviz
|
||||||
|
|
||||||
|
License: MIT
|
||||||
|
URL: https://github.com/xflr6/graphviz
|
||||||
|
Source0: https://files.pythonhosted.org/packages/source/g/graphviz/graphviz-0.8.3.zip
|
||||||
|
BuildArch: noarch
|
||||||
|
|
||||||
|
%description
|
||||||
|
%{common_description}
|
||||||
|
|
||||||
|
|
||||||
|
%package -n python2-graphviz
|
||||||
|
Summary: %{summary}
|
||||||
|
%{?python_provide:%python_provide python2-graphviz}
|
||||||
|
|
||||||
|
BuildRequires: python2-devel python2dist(flake8) python2dist(mock) >= 2 python2dist(pep8-naming)
|
||||||
|
BuildRequires: python2dist(pytest) >= 3.3 python2dist(pytest-cov) python2dist(pytest-mock)
|
||||||
|
BuildRequires: python2dist(setuptools) python2dist(twine) python2dist(wheel)
|
||||||
|
Requires: graphviz
|
||||||
|
|
||||||
|
%description -n python2-graphviz
|
||||||
|
%{common_description}
|
||||||
|
|
||||||
|
|
||||||
|
%package -n python3-graphviz
|
||||||
|
Summary: %{summary}
|
||||||
|
%{?python_provide:%python_provide python3-graphviz}
|
||||||
|
|
||||||
|
BuildRequires: python3-devel python3dist(flake8) python3dist(mock) >= 2 python3dist(pep8-naming)
|
||||||
|
BuildRequires: python3dist(pytest) >= 3.3 python3dist(pytest-cov) python3dist(pytest-mock)
|
||||||
|
BuildRequires: python3dist(setuptools) python3dist(twine) python3dist(sphinx)
|
||||||
|
Requires: graphviz
|
||||||
|
|
||||||
|
%description -n python3-graphviz
|
||||||
|
%{common_description}
|
||||||
|
|
||||||
|
|
||||||
|
%package -n python-graphviz-doc
|
||||||
|
Summary: Documentation for %{name}
|
||||||
|
%description -n python-graphviz-doc
|
||||||
|
%{common_description}
|
||||||
|
|
||||||
|
This is the documentation package.
|
||||||
|
|
||||||
|
%prep
|
||||||
|
%autosetup -n graphviz-%{version}
|
||||||
|
# Remove bundled egg-info
|
||||||
|
rm -rf graphviz.egg-info
|
||||||
|
|
||||||
|
sed -i 's/\r//' docs/*.rst
|
||||||
|
sed -i 's/\r//' README.rst
|
||||||
|
|
||||||
|
|
||||||
|
%build
|
||||||
|
%py2_build
|
||||||
|
%py3_build
|
||||||
|
|
||||||
|
# generate html docs
|
||||||
|
PYTHONPATH=${PWD} sphinx-build-3 docs html
|
||||||
|
# remove the sphinx-build leftovers
|
||||||
|
rm -rf html/.{doctrees,buildinfo}
|
||||||
|
|
||||||
|
|
||||||
|
%install
|
||||||
|
%py2_install
|
||||||
|
%py3_install
|
||||||
|
|
||||||
|
|
||||||
|
%check
|
||||||
|
%{__python2} setup.py test
|
||||||
|
%{__python3} setup.py test
|
||||||
|
|
||||||
|
|
||||||
|
%files -n python2-graphviz
|
||||||
|
%license LICENSE.txt
|
||||||
|
%doc README.rst
|
||||||
|
%{python2_sitelib}/graphviz
|
||||||
|
%{python2_sitelib}/graphviz-%{version}-py?.?.egg-info
|
||||||
|
|
||||||
|
|
||||||
|
%files -n python3-graphviz
|
||||||
|
%license LICENSE.txt
|
||||||
|
%doc README.rst
|
||||||
|
%{python3_sitelib}/graphviz
|
||||||
|
%{python3_sitelib}/graphviz-%{version}-py?.?.egg-info
|
||||||
|
|
||||||
|
|
||||||
|
%files -n python-graphviz-doc
|
||||||
|
%doc html
|
||||||
|
%license LICENSE.txt
|
||||||
|
|
||||||
|
|
||||||
|
%changelog
|
||||||
|
* Fri Mar 13 2020 yinzhenling <yinzhenling2@huawei.com> - 1:0.8.3-4
|
||||||
|
- Initial package.
|
||||||
Loading…
x
Reference in New Issue
Block a user