Blob Blame History Raw
%global srcname metaextract

%global descr Metaextract is a tool to collect metadata about a Python \
module. For example you may have a sdist tarball from the Python Package Index \
and you want to know it's dependencies. metaextract can collect theses \
dependencies. The tool was first developed in py2pack but is now it's own \
module to be useful for others, too.

Name:           python-%{srcname}
Version:        1.0.6
Release:        1%{?dist}
Summary:        Metaextract is a tool to collect metadata for Python modules

License:        ASL 2.0
URL:            https://github.com/toabctl/metaextract
Source0:        %{URL}/archive/%{version}/%{name}-%{version}.tar.gz

BuildArch:      noarch

%description
%descr

%package -n     python3-%{srcname}
Summary:        %{summary}
BuildRequires:  python3-devel
BuildRequires: %{py3_dist flake8}
BuildRequires: %{py3_dist mock}
BuildRequires: %{py3_dist pytest-runner}

%{?python_provide:%python_provide python3-%{srcname}}

%description -n python3-%{srcname}
%descr

%package        doc
Summary:        Documentation for %name
BuildRequires:  %{py3_dist sphinx}

%description    doc
Documentation for %name


%prep
%autosetup -n %{srcname}-%{version}

%build
%py3_build
python3 setup.py build_sphinx

rm doc/build/html/objects.inv

%install
%py3_install

%check
export PYTHONPATH=$(pwd):$PYTHONPATH
python3 -m pytest metaextract

%files -n python3-%{srcname}
%doc README.rst
%license LICENSE
%{python3_sitelib}/%{srcname}-*.egg-info/
%{python3_sitelib}/%{srcname}/
%{_bindir}/metaextract

%files doc
%license LICENSE
%doc doc/build/html/*

%changelog
* Sun Sep  8 2019 Dan Čermák <dan.cermak@cgc-instruments.com> - 1.0.6-1
- Bump version to 1.0.6

* Wed Mar  6 2019 Dan Čermák <dan.cermak@cgc-instruments.com> - 1.0.5-1
- Initial package version