!1 python-graphviz 软件包和修改后的spec文件

Merge pull request !1 from gu-gu-gu/master
This commit is contained in:
openeuler-ci-bot 2020-03-13 11:21:16 +08:00 committed by Gitee
commit 20f38b24b1
2 changed files with 109 additions and 0 deletions

BIN
graphviz-0.8.3.zip Normal file

Binary file not shown.

109
python-graphviz.spec Normal file
View 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.