# what it's called on pypi %global srcname Rx # what it's imported as %global libname rx # name of egg info directory %global eggname %{srcname} # package name fragment %global pkgname %{libname} %global _description \ Rx is a library for composing asynchronous and event-based programs using\ observable collections and LINQ-style query operators in Python. %bcond_without tests Name: python-%{pkgname} Version: 1.6.1 Release: 1%{?dist} Summary: Reactive Extensions (Rx) for Python License: ASL 2.0 URL: https://github.com/ReactiveX/RxPY # PyPI tarball doesn't have tests Source0: %{url}/archive/%{version}/%{srcname}-%{version}.tar.gz BuildArch: noarch %description %{_description} %package -n python3-%{pkgname} Summary: %{summary} BuildRequires: python3-devel BuildRequires: python3-setuptools %{?with_tests:BuildRequires: python3-nose} %{?python_provide:%python_provide python3-%{pkgname}} %description -n python3-%{pkgname} %{_description} %prep %autosetup -n RxPY-%{version} rm -rf %{eggname}.egg-info %if 0%{?fedora} >= 29 # https://github.com/ReactiveX/RxPY/issues/260 # some tests fail with Python 3.7 rm tests/test_observable/test_dowhile.py rm tests/test_observable/test_while.py %endif %build %py3_build %install %py3_install %if %{with tests} %check PYTHONPATH=%{buildroot}%{python3_sitelib} %{__python3} setup.py test %endif %files -n python3-%{pkgname} %license license.txt %doc README.md %{python3_sitelib}/%{libname} %{python3_sitelib}/%{eggname}-%{version}-py%{python3_version}.egg-info %changelog * Mon Oct 15 2018 Carl George - 1.6.1-1 - Initial package