83 lines
2.6 KiB
RPMSpec
83 lines
2.6 KiB
RPMSpec
|
|
Name: python-hyperlink
|
||
|
|
Version: 18.0.0
|
||
|
|
Release: 6
|
||
|
|
Summary: A pure-Python implementation of immutable URLs
|
||
|
|
License: MIT and BSD and OFL
|
||
|
|
URL: https://github.com/python-hyper/hyperlink
|
||
|
|
Source0: https://files.pythonhosted.org/packages/source/h/hyperlink/hyperlink-%{version}.tar.gz
|
||
|
|
BuildArch: noarch
|
||
|
|
BuildRequires: python2-devel python2dist(idna) >= 2.5 python2dist(setuptools) python2dist(unittest2)
|
||
|
|
BuildRequires: python3dist(sphinx) fontawesome-fonts js-underscore js-jquery
|
||
|
|
%{?python_enable_dependency_generator}
|
||
|
|
|
||
|
|
%description
|
||
|
|
Hyperlink is a featureful, pure-Python implementation of the URL, with an emphasis on correctness.
|
||
|
|
|
||
|
|
%package -n python2-hyperlink
|
||
|
|
Summary: A pure-Python implementation of immutable URLs
|
||
|
|
%python_provide python2-hyperlink
|
||
|
|
|
||
|
|
%description -n python2-hyperlink
|
||
|
|
Hyperlink is a featureful, pure-Python implementation of the URL, with an emphasis on correctness.
|
||
|
|
|
||
|
|
%package -n python3-hyperlink
|
||
|
|
Summary: A pure-Python implementation of immutable URLs
|
||
|
|
%python_provide python3-hyperlink
|
||
|
|
|
||
|
|
%description -n python3-hyperlink
|
||
|
|
Hyperlink is a featureful, pure-Python implementation of the URL, with an emphasis on correctness.
|
||
|
|
|
||
|
|
%package help
|
||
|
|
Summary: This package contains help documents
|
||
|
|
Requires: fontawesome-fonts js-underscore js-jquery
|
||
|
|
Provides: python-hyperlink-doc = %{version}-%{release}
|
||
|
|
Obsoletes: python-hyperlink-doc < %{version}-%{release}
|
||
|
|
|
||
|
|
%description help
|
||
|
|
Files for help with python-hyperlink.
|
||
|
|
|
||
|
|
%prep
|
||
|
|
%autosetup -n hyperlink-%{version} -p1
|
||
|
|
rm -rf hyperlink.egg-info
|
||
|
|
|
||
|
|
%build
|
||
|
|
%py2_build
|
||
|
|
%py3_build
|
||
|
|
PYTHONPATH=${PWD} sphinx-build-3 docs html
|
||
|
|
rm -rf html/.{doctrees,buildinfo} html/_static/underscore*.js html/_static/jquery*.js
|
||
|
|
cd html/_static/fonts/
|
||
|
|
for file in fontawesome*; do
|
||
|
|
rm -f $file
|
||
|
|
ln -s /usr/share/fonts/fontawesome/$file $file
|
||
|
|
done
|
||
|
|
cd -
|
||
|
|
ln -s /usr/share/javascript/underscore/underscore-min.js html/_static/underscore.js
|
||
|
|
ln -s /usr/share/javascript/underscore/underscore.js html/_static/underscore-1.3.1.js
|
||
|
|
ln -s /usr/share/javascript/jquery/3.2.1/jquery.min.js html/_static/jquery.js
|
||
|
|
ln -s /usr/share/javascript/jquery/3.2.1/jquery.js html/_static/jquery-3.2.1.js
|
||
|
|
|
||
|
|
%install
|
||
|
|
%py2_install
|
||
|
|
%py3_install
|
||
|
|
|
||
|
|
%check
|
||
|
|
%{__python2} -m unittest
|
||
|
|
%{__python3} -m unittest
|
||
|
|
|
||
|
|
%files -n python2-hyperlink
|
||
|
|
%doc LICENSE
|
||
|
|
%{python2_sitelib}/hyperlink
|
||
|
|
%{python2_sitelib}/hyperlink-%{version}-py?.?.egg-info
|
||
|
|
|
||
|
|
%files -n python3-hyperlink
|
||
|
|
%doc LICENSE
|
||
|
|
%{python3_sitelib}/hyperlink
|
||
|
|
%{python3_sitelib}/hyperlink-%{version}-py?.?.egg-info
|
||
|
|
|
||
|
|
%files help
|
||
|
|
%doc README.md html
|
||
|
|
|
||
|
|
%changelog
|
||
|
|
* Thu Feb 20 2020 gulining<gulining1@huawei.com> - 18.0.0-6
|
||
|
|
- Package init
|