diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..3286e7a --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +/fasjson-client-0.1.0.tar.gz diff --git a/python-fasjson-client.spec b/python-fasjson-client.spec new file mode 100644 index 0000000..453b083 --- /dev/null +++ b/python-fasjson-client.spec @@ -0,0 +1,82 @@ +%global pypi_name fasjson-client + +%if ! 0%{?rhel} || 0%{?rhel} >= 9 +%bcond_without tests +%else +%bcond_with tests +%endif + +Name: python-%{pypi_name} +Version: 0.1.0 +Release: 1%{?dist} +Summary: An OpenAPI client for FASJSON + +License: LGPLv3+ +URL: https://github.com/fedora-infra/fasjson-client +Source0: %{pypi_source} +BuildArch: noarch + +BuildRequires: python3-devel +BuildRequires: python3dist(setuptools) +# runtime +BuildRequires: (python3dist(bravado) >= 10.6 with python3dist(bravado) < 12) +BuildRequires: (python3dist(click) >= 6.7 with python3dist(click) < 8) +BuildRequires: (python3dist(cryptography) >= 2.3.3 with python3dist(cryptography) < 4) +BuildRequires: (python3dist(gssapi) >= 1.5.1 with python3dist(gssapi) < 2) +BuildRequires: (python3dist(requests) >= 2.20.0 with python3dist(requests) < 3) +BuildRequires: (python3dist(requests-gssapi) >= 1.2.1 with python3dist(requests-gssapi) < 2) +BuildRequires: (python3dist(toml) >= 0.10.1 with python3dist(toml) < 0.11) +# unit tests +%if %{with tests} +BuildRequires: (python3dist(coverage) >= 5.0.3 with python3dist(coverage) < 6) +BuildRequires: (python3dist(pytest) >= 4.6.11 with python3dist(pytest) < 7) +BuildRequires: (python3dist(pytest-cov) >= 2.8.1 with python3dist(pytest-cov) < 3) +BuildRequires: (python3dist(pytest-mock) >= 1.10.4 with python3dist(pytest-mock) < 4) +BuildRequires: (python3dist(requests-mock) >= 1.7 with python3dist(requests-mock) < 2) +%endif + + +%description +A python client library for the FASJSON API. + +%package -n python3-%{pypi_name} +Summary: %{summary} +Provides: %{pypi_name} = %{version}-%{release} +%{?python_provide:%python_provide python3-%{pypi_name}} + +%description -n python3-%{pypi_name} +A python client library for the FASJSON API. + + +%prep +%autosetup -n %{pypi_name}-%{version} + +%build +%py3_build + +%install +%py3_install + +%if %{with tests} +%check +%{__python3} -m pytest -v +%endif + +%files -n python3-%{pypi_name} +%license LICENSE +%doc README.md +%{_bindir}/fasjson-client +%{python3_sitelib}/fasjson_client +%{python3_sitelib}/fasjson_client-%{version}-py%{python3_version}.egg-info + + +%changelog +* Mon Nov 23 2020 Nils Philippsen - 0.1.0-1 +- version 0.1.0 +- don't run tests on EPEL8 (too many missing deps) + +* Fri Nov 20 2020 Nils Philippsen +- relax some dependency versions and run tests + +* Tue Sep 08 2020 Aurelien Bompard - 0.0.3-1 +- Initial package. diff --git a/sources b/sources new file mode 100644 index 0000000..b501cdb --- /dev/null +++ b/sources @@ -0,0 +1 @@ +SHA512 (fasjson-client-0.1.0.tar.gz) = e92dc27fc5062a1dc3b2a3f1b3aeacdad4ee56924764819a2b9f99bfaf08d383bb1c15100d2747a42dd5f4bc81804f4b08322ee4bf3058f4bb0b3fe10d91d168