%{?python_enable_dependency_generator} %global srcname magic_wormhole %global pypi_name magic-wormhole %global common_description %{expand: Get things from one computer to another, safely. This package provides a library and a command-line tool named wormhole, which makes it possible to get arbitrary-sized files and directories (or short pieces of text) from one computer to another. The two endpoints are identified by using identical "wormhole codes": in general, the sending machine generates and displays the code, which must then be typed into the receiving machine. The codes are short and human-pronounceable, using a phonetically-distinct wordlist. The receiving side offers tab-completion on the codewords, so usually only a few characters must be typed. Wormhole codes are single-use and do not need to be memorized.} Name: python-%{pypi_name} Summary: Securely transfer data between computers Version: 0.17.0 Release: %autorelease License: MIT URL: https://github.com/warner/magic-wormhole Source0: %{pypi_source} Patch1: magic-wormhole-0.17-sh-completion.patch BuildArch: noarch BuildRequires: python3-devel BuildRequires: python3dist(setuptools) # requirements for building the docs BuildRequires: python3dist(recommonmark) BuildRequires: python3dist(sphinx) # requirements for running the tests BuildRequires: python3dist(tox) BuildRequires: python3dist(tox-current-env) BuildRequires: python3dist(click) BuildRequires: python3dist(humanize) BuildRequires: python3dist(mock) BuildRequires: python3dist(pynacl) BuildRequires: python3dist(service-identity) BuildRequires: python3dist(tqdm) >= 4.13 BuildRequires: python3dist(pyflakes) BuildRequires: python3dist(iterable-io) BuildRequires: python3dist(zipstream-ng) # common dependencies BuildRequires: python3dist(autobahn) >= 0.14.1 BuildRequires: python3dist(cryptography) BuildRequires: python3dist(magic-wormhole-mailbox-server) BuildRequires: python3dist(magic-wormhole-transit-relay) BuildRequires: python3dist(spake2) >= 0.9 BuildRequires: python3dist(twisted) >= 17.5 BuildRequires: python3dist(txtorcon) >= 18.0.2 %description %{common_description} %package -n magic-wormhole Summary: %{summary} Requires: python3-%{pypi_name} %description -n magic-wormhole %{common_description} This package contains the wormhole program. %package -n python3-%{pypi_name} Summary: %{summary} %{?python_provide:%python_provide python3-%{pypi_name}} %description -n python3-%{pypi_name} %{common_description} %package -n python-%{pypi_name}-doc Summary: Documentation for %{name} %description -n python-%{pypi_name}-doc %{common_description} This package contains the documentation. %prep %autosetup -n %{srcname}-%{version} -p1 # Remove bundled egg-info rm -rf %{pypi_name}.egg-info %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 %{buildroot}%{_datadir}/bash-completion/completions/wormhole install -d %{buildroot}%{_datadir}/{fish,zsh}/vendor_completions.d/ install -p -m 0644 wormhole_complete.bash %{buildroot}%{_datadir}/bash-completion/completions/wormhole install -p -m 0644 wormhole_complete.fish %{buildroot}%{_datadir}/fish/vendor_completions.d/wormhole.fish install -p -m 0644 wormhole_complete.zsh %{buildroot}%{_datadir}/zsh/vendor_completions.d/wormhole %check %tox %files -n magic-wormhole %license LICENSE %doc README.md %{_bindir}/wormhole # TODO: make subpackages for completions? %dir %{_datadir}/bash-completion/completions %{_datadir}/bash-completion/completions/wormhole %dir %{_datadir}/fish/vendor_completions.d/ %{_datadir}/fish/vendor_completions.d/wormhole.fish %dir %{_datadir}/zsh/vendor_completions.d/ %{_datadir}/zsh/vendor_completions.d/wormhole %files -n python3-%{pypi_name} %license LICENSE %doc README.md %{python3_sitelib}/wormhole/ %{python3_sitelib}/magic_wormhole-%{version}-py%{python3_version}.egg-info %files -n python-%{pypi_name}-doc %doc html %license LICENSE %changelog %autochangelog