14
0
forked from pool/python-pytoml
Files
python-pytoml/python-pytoml.spec

70 lines
2.2 KiB
RPMSpec
Raw Normal View History

#
# spec file for package python-pytoml
#
# Copyright (c) 2018 SUSE LINUX GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
# Please submit bugfixes or comments via http://bugs.opensuse.org/
#
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
Name: python-pytoml
Version: 0.1.14
Release: 0
Summary: TOML-0.4.0 parser/writer for Python
License: MIT
Group: Development/Libraries/Python
URL: https://github.com/avakar/pytoml
Source0: https://files.pythonhosted.org/packages/source/p/pytoml/pytoml-%{version}.tar.gz
# toml-test for tests from author's fork with specific commit
Source1: https://github.com/avakar/toml-test/archive/fa9501a1.tar.gz
# Next release should contain it in std tgz
Source2: https://raw.githubusercontent.com/avakar/pytoml/master/LICENSE
BuildRequires: %{python_module base}
BuildRequires: %{python_module setuptools}
BuildRequires: fdupes
BuildRequires: python-rpm-macros
Requires: python
BuildArch: noarch
%python_subpackages
%description
A specs-conforming and strict parser and writer for TOML files.
The library currently supports version 0.4.0 of the specs and
runs with Python 2.6+ and 3.3+.
%prep
%setup -q -n pytoml-%{version}
cp -a %{SOURCE2} LICENSE
tar -C test -xzf%{SOURCE1}
cd test
mv toml-test-fa9501a192b7c46b82059caddaef978e3de883dc toml-test
%build
%python_build
%install
%python_install
%fdupes %{buildroot}%{_prefix}
%check
%python_expand export PYTHONPATH=%{buildroot}%{python_sitelib}; python test/test.py
%files %{python_files}
%defattr(-,root,root)
%license LICENSE
%{python_sitelib}/pytoml/
%{python_sitelib}/pytoml-%{version}-py%{py_ver}.egg-info/
%changelog