Blob Blame History Raw
%global srcname plaster
%global sum Application configuration settings abstraction layer
%global desc plaster is a loader interface around multiple \
configuration file formats. It exists to define a common API for \
applications to use when they wish to load configuration. The library \
itself does not aim to handle anything except a basic API that \
applications may use to find and load configuration settings. Any \
specific constraints should be implemented in a loader which can be \
registered via an entry point.

Name: python-%{srcname}
Version: 0.5
Release: 9%{?dist}
BuildArch: noarch

License: MIT
Summary: %{sum}
Source0: %{url}/archive/%{version}/%{srcname}-%{version}.tar.gz

BuildRequires: python3-devel
BuildRequires: python3-pytest
BuildRequires: python3-setuptools
BuildRequires: python3-sphinx


%package doc
Summary: Documentation for %{name}

%description doc
Contains the documentation for %{name}.

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

Requires: python3-setuptools

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

%description -n python3-%{srcname}

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

# The plaster docs upstream only build if plaster is installed. Since we are building plaster docs
# from a source checkout, let's insert plaster into the path.
sed -i "s:import plaster:sys.path.insert(0, os.path.join(os.path.dirname(__file__), '..', 'src'))\nimport plaster:" docs/

# Related to the above, upstream plaster gets the version for the docs by using pkg_resources which
# can only work if plaster is installed. Let's just substitute the version in since we know what it
# is.
sed -i "s/version = pkg_resources.*/version = '%{version}'/" docs/

# Upstream docs use pylons_sphinx_themes, which isn't packaged for Fedora yet. Let's just convert it
# to use the standard sphinx theme for now.
sed -i "/import pylons_sphinx_themes/d" docs/
sed -i "/html_theme_path =.*/d" docs/
sed -i "/html_theme =.*/d" docs/
sed -i "/.*github_url.*/d" docs/

make %{?_smp_mflags} -C docs html
rm -rf docs/_build/html/.buildinfo



PYTHONPATH="./src" py.test-3

%files doc
%license LICENSE.txt
%doc docs/_build/html
%doc CHANGES.rst
%doc README.rst

%files -n python3-%{srcname}
%license LICENSE.txt
%doc README.rst

* Mon Sep 09 2019 Miro Hrončok <> - 0.5-9
- Subpackage python2-plaster has been removed

* Fri Aug 16 2019 Miro Hrončok <> - 0.5-8
- Rebuilt for Python 3.8

* Fri Jul 26 2019 Fedora Release Engineering <> - 0.5-7
- Rebuilt for

* Sat Feb 02 2019 Fedora Release Engineering <> - 0.5-6
- Rebuilt for

* Sat Jul 14 2018 Fedora Release Engineering <> - 0.5-5
- Rebuilt for

* Sun Jun 17 2018 Miro Hrončok <> - 0.5-4
- Rebuilt for Python 3.7

* Fri Feb 09 2018 Fedora Release Engineering <> - 0.5-3
- Rebuilt for

* Thu Jul 27 2017 Fedora Release Engineering <> - 0.5-2
- Rebuilt for

* Mon Jul 03 2017 Randy Barlow <> - 0.5-1
- Initial release.