diff --git a/.gitignore b/.gitignore index 05763b5..8d42dca 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,3 @@ /python-box-3.4.2.tar.gz /python-box-3.4.5.tar.gz +/box-5.1.1.tar.gz diff --git a/python-box.spec b/python-box.spec index 301f4c9..39c1709 100644 --- a/python-box.spec +++ b/python-box.spec @@ -1,29 +1,44 @@ -Name: python-box -Version: 3.4.5 -Release: 4%{?dist} +%global pypi_name box + +Name: python-%{pypi_name} +Version: 5.1.1 +Release: 1%{?dist} Summary: Python dictionaries with advanced dot notation access License: MIT URL: https://github.com/cdgriffith/Box -Source0: %{pypi_source} +Source0: %{url}/archive/%{version}/%{pypi_name}-%{version}.tar.gz BuildArch: noarch -BuildRequires: /usr/bin/pathfix.py - %description -%{summary} +Box will automatically make otherwise inaccessible keys safe to +access as an attribute. You can always pass conversion_box=False +to Box to disable that behavior. Also, all new dict and lists +added to a Box or BoxList object are converted automatically. -%package -n python3-box +%package -n python3-%{pypi_name} Summary: %{summary} -BuildRequires: python3-devel -BuildRequires: python3-pytest-runner -%{?python_provide:%python_provide python3-box} -%description -n python3-box -%{summary} +BuildRequires: python3-devel +BuildRequires: python3dist(pytest) +BuildRequires: python3dist(pytest-runner) +BuildRequires: python3dist(pytest-cov) +BuildRequires: python3dist(msgpack) +BuildRequires: python3dist(ruamel.yaml) + +Requires: python3dist(msgpack) +Requires: python3dist(ruamel.yaml) +Requires: python3dist(toml) +%{?python_provide:%python_provide python3-%{pypi_name}} + +%description -n python3-%{pypi_name} +Box will automatically make otherwise inaccessible keys safe to +access as an attribute. You can always pass conversion_box=False +to Box to disable that behavior. Also, all new dict and lists +added to a Box or BoxList object are converted automatically. %prep -%autosetup -n python-box-%{version} +%autosetup -n Box-%{version} %build %py3_build @@ -31,22 +46,20 @@ BuildRequires: python3-pytest-runner %install %py3_install -# Make sure we don't have ambiguous python shebangs in bindir -# https://fedoraproject.org/wiki/Changes/Make_ambiguous_python_shebangs_error -pathfix.py -pni "%{__python3} %{py3_shbang_opts}" %{buildroot}%{_bindir}/box.py - -# Otherwise remove the shebang from site-packages -sed -i "\%#!/usr/bin/env python%d" %{buildroot}%{python3_sitelib}/box.py +%check +%pytest -v test -k "not test_msgpack" -%files -n python3-box +%files -n python3-%{pypi_name} %license LICENSE %doc README.rst -%{_bindir}/box.py -%{python3_sitelib}/box.py -%{python3_sitelib}/python_box-*.egg-info/ -%{python3_sitelib}/__pycache__/* +%{python3_sitelib}/%{pypi_name}/ +%{python3_sitelib}/python_box-%{version}-py%{python3_version}.egg-info/ %changelog +* Fri Sep 25 2020 Fabian Affolter - 5.1.1-1 +- Enable tests +- Update to new upstream release 5.1.1 (#1867812) + * Tue Jul 28 2020 Fedora Release Engineering - 3.4.5-4 - Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild diff --git a/sources b/sources index b44449d..f85aa8b 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (python-box-3.4.5.tar.gz) = c7442a7174a2bb40ede823830ca422d2ead8ea1de667eab946e1471eade2b8ce82e2dbc90efa0a3d2bb767236dd7368f9d955036c9afbfbf70bcefa5476580ee +SHA512 (box-5.1.1.tar.gz) = 3e2f1a1559d88915f9ec8c5852da3b203230ab678ba4f376bfbe5c8016b0d2a3032770f0e1c62760d2639520883cbb9fc1dd9caca806fe82be39863cb92703ef