Blob Blame History Raw
%global srcname entrypoints
%global sum Discover and load entry points from installed packages

%global python2_wheelname %{srcname}-%{version}-py2.py3-none-any.whl
%global python3_wheelname %python2_wheelname

Name:		python-%{srcname}
Version:	0.2.3
Release:	5%{?dist}
Summary:	%{sum}

# license clarification issue opened upstream
# https://github.com/takluyver/entrypoints/issues/10

License:	MIT

URL:		https://entrypoints.readthedocs.io/
Source0:	https://github.com/takluyver/%{srcname}/archive/%{version}/%{srcname}-%{version}.tar.gz

BuildArch:	noarch
BuildRequires:	python2-devel
BuildRequires:	python3-devel
BuildRequires:	python2-pip
BuildRequires:	python3-pip
BuildRequires:	python3-flit
BuildRequires:	python3-sphinx

%description
Entry points are a way for Python packages to advertise objects with some
common interface. The most common examples are console_scripts entry points,
which define shell commands by identifying a Python function to run.

The entrypoints module contains functions to find and load entry points.


%package -n python2-%{srcname}
Summary:	%{sum}
%{?python_provide:%python_provide python2-%{srcname}}

%description -n python2-%{srcname}
Entry points are a way for Python packages to advertise objects with some
common interface. The most common examples are console_scripts entry points,
which define shell commands by identifying a Python function to run.

The entrypoints module contains functions to find and load entry points.


%package -n python3-%{srcname}
Summary:	%{sum}
%{?python_provide:%python_provide python3-%{srcname}}

%description -n python3-%{srcname}
Entry points are a way for Python packages to advertise objects with some
common interface. The most common examples are console_scripts entry points,
which define shell commands by identifying a Python function to run.

The entrypoints module contains functions to find and load entry points.

%package -n python-%{srcname}-doc
Summary:	Documentation for python-entrypoints

%description -n python-%{srcname}-doc
Documentation files for python-entrypoints

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


%build
XDG_CACHE_HOME=$PWD/.cache FLIT_NO_NETWORK=1 flit wheel

pushd doc
make html PYTHON="%{__python3}" SPHINXBUILD=sphinx-build-%{python3_version}
rm _build/html/.buildinfo
popd


%install
%py3_install_wheel %{python3_wheelname}
%py2_install_wheel %{python2_wheelname}


%files -n python2-%{srcname}
%doc doc/_build/html
%license LICENSE
%{python2_sitelib}/*

%files -n python3-%{srcname}
%doc doc/_build/html
%license LICENSE
%{python3_sitelib}/__pycache__/*
%{python3_sitelib}/*.py
%{python3_sitelib}/%{srcname}-%{version}.dist-info

%files -n python-%{srcname}-doc
%doc doc/_build/html
%license LICENSE

%changelog
* Fri Feb 09 2018 Fedora Release Engineering <releng@fedoraproject.org> - 0.2.3-5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild

* Tue Jan 16 2018 Iryna Shcherbina <ishcherb@redhat.com> - 0.2.3-4
- Update Python 2 dependency declarations to new packaging standards
  (See https://fedoraproject.org/wiki/FinalizingFedoraSwitchtoPython3)

* Wed Jan 03 2018 Elliott Sales de Andrade <quantum.analyst@gmail.com> - 0.2.3-3
- Restore dist-info information (#1530098).

* Thu Jul 27 2017 Fedora Release Engineering <releng@fedoraproject.org> - 0.2.3-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild

* Tue Jun 13 2017 Mukundan Ragavan <nonamedotc@fedoraproject.org> - 0.2.3-1
- Update to 0.2.3

* Sat Feb 11 2017 Fedora Release Engineering <releng@fedoraproject.org> - 0.2.2-7
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild

* Tue Jan 31 2017 Michal Cyprian <mcyprian@redhat.com> - 0.2.2-6
- Use python install wheel macros

* Mon Dec 19 2016 Miro HronĨok <mhroncok@redhat.com> - 0.2.2-5
- Rebuild for Python 3.6

* Sun Nov 06 2016 Mukundan Ragavan <nonamedotc@fedoraproject.org> - 0.2.2-4
- Do not own pycache dir

* Mon Oct 03 2016 Mukundan Ragavan <nonamedotc@fedoraproject.org> - 0.2.2-3
- Consolidate two doc subpackages into one

* Sun Oct 02 2016 Mukundan Ragavan <nonamedotc@fedoraproject.org> - 0.2.2-2
- Add -doc subpackages
- Fix source url
- Add license clarification issue URL for reference

* Sat Jul 2 2016 Elliott Sales de Andrade <quantum.analyst@gmail.com> 0.2.2-1
- Initial RPM release