| |
@@ -1,13 +1,10 @@
|
| |
%global srcname ConfigArgParse
|
| |
- %if 0%{?fedora}
|
| |
- %bcond_without python3
|
| |
- %else
|
| |
- %bcond_with python3
|
| |
- %endif
|
| |
+
|
| |
+ %global py3_prefix python%{python3_pkgversion}
|
| |
|
| |
Name: python-configargparse
|
| |
Version: 0.11.0
|
| |
- Release: 1%{?dist}
|
| |
+ Release: 2%{?dist}
|
| |
Summary: A Python module with support for argparse, config files, and env variables
|
| |
|
| |
License: MIT
|
| |
@@ -16,12 +13,13 @@
|
| |
Buildarch: noarch
|
| |
|
| |
BuildRequires: python2-devel
|
| |
+ BuildRequires: python2-pytest
|
| |
BuildRequires: python-setuptools
|
| |
|
| |
- %if %{with python3}
|
| |
- BuildRequires: python3-devel
|
| |
- BuildRequires: python3-setuptools
|
| |
- %endif
|
| |
+ BuildRequires: %{py3_prefix}-devel
|
| |
+ BuildRequires: %{py3_prefix}-pytest
|
| |
+ BuildRequires: %{py3_prefix}-setuptools
|
| |
+
|
| |
|
| |
%description
|
| |
Applications with more than a handful of user-settable options are best
|
| |
@@ -46,12 +44,12 @@
|
| |
support for config files and environment variables, so this module extends
|
| |
argparse to add these features.
|
| |
|
| |
- %if %{with python3}
|
| |
- %package -n python3-configargparse
|
| |
+
|
| |
+ %package -n %{py3_prefix}-configargparse
|
| |
Summary: %{summary}
|
| |
%{?python_provide:%python_provide python3-configargparse}
|
| |
|
| |
- %description -n python3-configargparse
|
| |
+ %description -n %{py3_prefix}-configargparse
|
| |
Applications with more than a handful of user-settable options are best
|
| |
configured through a combination of command line args, config files, hard
|
| |
coded defaults, and in some cases, environment variables.
|
| |
@@ -59,22 +57,25 @@
|
| |
Python’s command line parsing modules such as argparse have very limited
|
| |
support for config files and environment variables, so this module extends
|
| |
argparse to add these features.
|
| |
- %endif
|
| |
+
|
| |
|
| |
%prep
|
| |
%autosetup -n %{srcname}-%{version}
|
| |
|
| |
%build
|
| |
%py2_build
|
| |
- %if %{with python3}
|
| |
%py3_build
|
| |
- %endif
|
| |
+
|
| |
|
| |
%install
|
| |
%py2_install
|
| |
- %if %{with python3}
|
| |
%py3_install
|
| |
- %endif
|
| |
+
|
| |
+
|
| |
+ %check
|
| |
+ py.test
|
| |
+ py.test-3
|
| |
+
|
| |
|
| |
%files -n python2-configargparse
|
| |
%doc README.rst
|
| |
@@ -82,16 +83,20 @@
|
| |
%{python2_sitelib}/configargparse.py*
|
| |
%{python2_sitelib}/%{srcname}*.egg-info
|
| |
|
| |
- %if %{with python3}
|
| |
- %files -n python3-configargparse
|
| |
+
|
| |
+ %files -n %{py3_prefix}-configargparse
|
| |
%doc README.rst
|
| |
%license LICENSE
|
| |
%{python3_sitelib}/configargparse.py*
|
| |
%{python3_sitelib}/%{srcname}*.egg-info
|
| |
%{python3_sitelib}/__pycache__/configargparse*
|
| |
- %endif
|
| |
+
|
| |
|
| |
%changelog
|
| |
+ * Wed May 06 2020 Felix Schwarz <fschwarz@fedoraproject.org> - 0.11.0-2
|
| |
+ - add Python 3 subpackage for EPEL 7 (rhbz #1813677)
|
| |
+ - run tests in %%check
|
| |
+
|
| |
* Tue Nov 15 2016 Fabian Affolter <mail@fabian-affolter.ch> - 0.11.0-1
|
| |
- Update to new upstream version 0.11.0 (rhbz#1382975)
|
| |
|
| |
This is another step to use Python 3 with certbot (see rhbz #1813677).
I did not merge branches because Fedora does not have the Python 2 subpackage anymore and I don't see a need to upgrade the EPEL 7 package version.
Unless there is some objection I'll merge this in a few days.