diff --git a/python-stem.spec b/python-stem.spec index ec3ec8f39f33aba3a7fad2ac4eb6d9e3044c740b..51d34f4b476df6c255c6b92d7cc5bc845e23bce2 100644 --- a/python-stem.spec +++ b/python-stem.spec @@ -1,19 +1,13 @@ -%global pypi_name stem -%global pypi_version 1.8.0 +%global _empty_manifest_terminate_build 0 +Name: python-stem +Version: 1.8.1 +Release: 1 +Summary: Python controller library for Tor +License: LGPL-3.0 +URL: https://stem.torproject.org/ +Source0: https://files.pythonhosted.org/packages/b2/66/c5515de764bffae1347e671819711268da5c02bfab8406223526822fe5f6/stem-1.8.1.tar.gz +BuildArch: noarch -Name: python-%{pypi_name} -Version: %{pypi_version} -Release: 1 -Summary: Python controller library for Tor - -License: LGPL-3.0 -URL: https://stem.torproject.org/ -Source0: https://github.com/torproject/stem/archive/refs/tags/%{pypi_version}.tar.gz#/%{pypi_name}-%{pypi_version}.tar.gz -BuildArch: noarch - -BuildRequires: python3-devel -BuildRequires: python3dist(setuptools) -BuildRequires: python3dist(sphinx) %description Stem is a Python controller library for Tor. With it you can use Tor's control @@ -21,58 +15,75 @@ protocol to script against the Tor process, or build things such as Nyx. Documentation and tutorials available at stem.torproject.org. +%package -n python3-stem +Summary: Python controller library for Tor +Provides: python-stem = %{version}-%{release} +BuildRequires: python3-devel +BuildRequires: python3dist(setuptools) +BuildRequires: python3dist(sphinx) -%package -n python3-%{pypi_name} -Summary: %{summary} -%{?python_provide:%python_provide python3-%{pypi_name}} - -%description -n python3-%{pypi_name} +%description -n python3-stem Stem is a Python controller library for Tor. With it you can use Tor's control protocol to script against the Tor process, or build things such as Nyx. Documentation and tutorials available at stem.torproject.org. +%package help +Summary: Development documents and examples for stem +Provides: python3-stem-doc -%package -n python-%{pypi_name}-doc -Summary: %{pypi_name} documentation - -%description -n python-%{pypi_name}-doc -Documentation for %{pypi_name} +%description help +Stem is a Python controller library for Tor. With it you can use Tor's control +protocol to script against the Tor process, or build things such as Nyx. +Documentation and tutorials available at stem.torproject.org. %prep -%autosetup -n %{pypi_name}-%{pypi_version} - +%autosetup -n stem-%{version} %build %py3_build -# generate html docs -PYTHONPATH=${PWD} sphinx-build-3 docs html -# remove the sphinx-build leftovers -rm -rf html/.{doctrees,buildinfo} - %install %py3_install - +install -d -m755 %{buildroot}/%{_pkgdocdir} +if [ -d doc ]; then cp -arf doc %{buildroot}/%{_pkgdocdir}; fi +if [ -d docs ]; then cp -arf docs %{buildroot}/%{_pkgdocdir}; fi +if [ -d example ]; then cp -arf example %{buildroot}/%{_pkgdocdir}; fi +if [ -d examples ]; then cp -arf examples %{buildroot}/%{_pkgdocdir}; fi +pushd %{buildroot} +if [ -d usr/lib ]; then + find usr/lib -type f -printf "/%h/%f\n" >> filelist.lst +fi +if [ -d usr/lib64 ]; then + find usr/lib64 -type f -printf "/%h/%f\n" >> filelist.lst +fi +if [ -d usr/bin ]; then + find usr/bin -type f -printf "/%h/%f\n" >> filelist.lst +fi +if [ -d usr/sbin ]; then + find usr/sbin -type f -printf "/%h/%f\n" >> filelist.lst +fi +touch doclist.lst +if [ -d usr/share/man ]; then + find usr/share/man -type f -printf "/%h/%f.gz\n" >> doclist.lst +fi +popd +mv %{buildroot}/filelist.lst . +mv %{buildroot}/doclist.lst . %check %{__python3} setup.py test +%files -n python3-stem -f filelist.lst +%dir %{python3_sitelib}/* -%files -n python3-%{pypi_name} -%license LICENSE -%doc README.md -%{_bindir}/tor-prompt -%{python3_sitelib}/%{pypi_name} -%{python3_sitelib}/%{pypi_name}-%{pypi_version}-py%{python3_version}.egg-info - - -%files -n python-%{pypi_name}-doc -%doc html -%license LICENSE - +%files help -f doclist.lst +%{_docdir}/* %changelog +* Fri Nov 18 2022 jiangxinyu - 1.8.1-1 +- Update package to version 1.8.1 + * Wed Sep 29 2021 herengui - 1.8.0-1 -- Initial package. \ No newline at end of file +- Initial package. diff --git a/stem-1.8.0.tar.gz b/stem-1.8.0.tar.gz deleted file mode 100644 index a569296cf65ac1bada2a353463de0ee8a4b90bb2..0000000000000000000000000000000000000000 Binary files a/stem-1.8.0.tar.gz and /dev/null differ diff --git a/stem-1.8.1.tar.gz b/stem-1.8.1.tar.gz new file mode 100644 index 0000000000000000000000000000000000000000..c1c52aa2039b70a54ba0225f82444aa25af85edc Binary files /dev/null and b/stem-1.8.1.tar.gz differ