5ef18e8
Name: fmf
5910de0
Version: 0.10
ee03733
Release: 1%{?dist}
5ef18e8
5ef18e8
Summary: Flexible Metadata Format
5ef18e8
License: GPLv2+
5ef18e8
BuildArch: noarch
5ef18e8
5ef18e8
URL: https://github.com/psss/fmf
ee03733
Source0: https://github.com/psss/fmf/releases/download/%{version}/fmf-%{version}.tar.gz
5ef18e8
5ef18e8
# Depending on the distro, we set some defaults.
5ef18e8
# Note that the bcond macros are named for the CLI option they create.
5ef18e8
# "%%bcond_without" means "ENABLE by default and create a --without option"
5ef18e8
ee03733
# Fedora or RHEL 8+
ee03733
%if 0%{?fedora} || 0%{?rhel} > 7
5ef18e8
%bcond_with oldreqs
5910de0
%bcond_with englocale
5ef18e8
%else
ee03733
# The automatic runtime dependency generator doesn't exist yet
5ef18e8
%bcond_without oldreqs
ee03733
# The C.UTF-8 locale doesn't exist, Python defaults to C (ASCII)
5910de0
%bcond_without englocale
5ef18e8
%endif
5ef18e8
ee03733
# Main tmt package requires the Python module
faf981e
Requires: python%{python3_pkgversion}-%{name} == %{version}-%{release}
5ef18e8
5ef18e8
%description
5ef18e8
The fmf Python module and command line tool implement a flexible
5ef18e8
format for defining metadata in plain text files which can be
5ef18e8
stored close to the source code. Thanks to hierarchical structure
5ef18e8
with support for inheritance and elasticity it provides an
5ef18e8
efficient way to organize data into well-sized text documents.
5ef18e8
This package contains the command line tool.
5ef18e8
5ef18e8
%?python_enable_dependency_generator
5ef18e8
5ef18e8
5ef18e8
%package -n     python%{python3_pkgversion}-%{name}
5ef18e8
Summary:        %{summary}
5ef18e8
BuildRequires: python%{python3_pkgversion}-devel
5ef18e8
BuildRequires: python%{python3_pkgversion}-setuptools
5ef18e8
BuildRequires: python%{python3_pkgversion}-pytest
5ef18e8
BuildRequires: python%{python3_pkgversion}-PyYAML
5ef18e8
%{?python_provide:%python_provide python%{python3_pkgversion}-%{name}}
5ef18e8
%if %{with oldreqs}
5ef18e8
Requires:       python%{python3_pkgversion}-PyYAML
5ef18e8
%endif
5ef18e8
5ef18e8
%description -n python%{python3_pkgversion}-%{name}
5ef18e8
The fmf Python module and command line tool implement a flexible
5ef18e8
format for defining metadata in plain text files which can be
5ef18e8
stored close to the source code. Thanks to hierarchical structure
5ef18e8
with support for inheritance and elasticity it provides an
5ef18e8
efficient way to organize data into well-sized text documents.
5ef18e8
This package contains the Python 3 module.
5ef18e8
5ef18e8
5ef18e8
%prep
ee03733
%autosetup
5ef18e8
5ef18e8
5ef18e8
%build
ee03733
%if %{with englocale}
ee03733
export LANG=en_US.utf-8
ac375e4
%endif
5ef18e8
5ef18e8
%py3_build
5ef18e8
5ef18e8
5ef18e8
%install
ee03733
%if %{with englocale}
5ef18e8
export LANG=en_US.utf-8
ac375e4
%endif
5ef18e8
5ef18e8
%py3_install
5ef18e8
5ef18e8
mkdir -p %{buildroot}%{_mandir}/man1
5ef18e8
install -pm 644 fmf.1* %{buildroot}%{_mandir}/man1
5ef18e8
5ef18e8
5ef18e8
%check
ee03733
%if %{with englocale}
5ef18e8
export LANG=en_US.utf-8
5ef18e8
%endif
5ef18e8
5ef18e8
%{__python3} -m pytest -vv
5ef18e8
5ef18e8
5ef18e8
%{!?_licensedir:%global license %%doc}
5ef18e8
5ef18e8
%files
5ef18e8
%{_mandir}/man1/*
5ef18e8
%{_bindir}/%{name}
5ef18e8
%doc README.rst examples
5ef18e8
%license LICENSE
5ef18e8
5ef18e8
%files -n python%{python3_pkgversion}-%{name}
5ef18e8
%{python3_sitelib}/%{name}/
5ef18e8
%{python3_sitelib}/%{name}-*.egg-info
5ef18e8
%license LICENSE
5ef18e8
5ef18e8
5ef18e8
%changelog
5910de0
* Wed Oct 30 2019 Petr Šplíchal <psplicha@redhat.com> - 0.10-1
5910de0
- Mock is not needed for docs, fix missing new line
5910de0
- Provide a public static method Tree.init()
5910de0
5910de0
* Wed Oct 09 2019 Petr Šplíchal <psplicha@redhat.com> - 0.9-1
5910de0
- Support custom conjunction like 'or' in listed()
5910de0
- Update smoke testset to the latest L2 spec
5910de0
- Fix build conditional default for englocale
5910de0
- Use raw strings for regular expression patterns
5910de0
ee03733
* Mon Sep 30 2019 Petr Šplíchal <psplicha@redhat.com> - 0.8-1
ee03733
- Update spec to build Python 3 packages only
ee03733
- Move unit tests into a separate directory
ee03733
- Move testsets, include a super simple smoke test
ee03733
- Initial set of stories and tests
ee03733
- Enable beakerlib smoke test in the testing farm
ee03733
- Add a simple beakerlib test for command line help
ee03733
- Clean up the docs build folder directly
ee03733
- Enable packit
d0045c4
f908d50
* Fri Jul 26 2019 Petr Šplíchal <psplicha@redhat.com> - 0.7-1
f908d50
- Support both old and new yaml loader
f908d50
- Add advanced python filtering [fix #55]
f908d50
- Drop explicit locale setting during build and install
9777ed7
- Drop Python 2 subpackage on Fedora 30+ (#1647798)
f908d50
- Better handle yaml errors [fix #50]
f908d50
- Support reducing attributes using the "-" suffix
f908d50
- Prevent extra new lines in the show() output
f908d50
- Adjust FullLoader to load all strings as unicode
f908d50
- Suppress yaml warnings by specifying the loader
f908d50
- Support Tree.find() for non-leaf nodes as well
ac375e4
faf981e
* Mon Oct 08 2018 Petr Šplíchal <psplicha@redhat.com> 0.6-1
faf981e
- Ignore directories with no metadata defined
faf981e
- Give a nice error when .fmf file exists [fix #37]
faf981e
- Ignore metadata subtrees [fix #43]
faf981e
- Support for direct deep dictionary value retrieval
faf981e
- Separate exception for missing tree root [fix #42]
faf981e
- Move data merging into a separate method [fix #41]
faf981e
- Ensure that data or parent are provided for Tree
faf981e
- Test coverage for yaml syntax and finding root
faf981e
- Do not walk through the whole directory hierarchy
faf981e
- Example typo, handle yaml parse errors [fix #38]
faf981e
- Require the same version of the rpm package
4d79e13
83f72eb
* Tue Jun 12 2018 Petr Šplíchal <psplicha@redhat.com> 0.5-1
83f72eb
- Add support for subcommands [fix #32]
83f72eb
- Define metadata tree root [fix #26]
83f72eb
- Enable regular expressions in --filter [fix #35]
83f72eb
- Support merging dictionary values as well
83f72eb
- Build Python 3 package for pip as well
83f72eb
- Add more detailed logging for easier debugging
83f72eb
- Correctly handle deep inheritance [fix #31]
83f72eb
- Load all strings from YAML files as Unicode
83f72eb
- Prevent data modification in filter [fix #30]
83f72eb
- Fix inheritance of scattered files [fix #25]
83f72eb
5ef18e8
* Wed May 09 2018 Petr Šplíchal <psplicha@redhat.com> 0.4-1
5ef18e8
- Do not gzip the man page, fix the source link [BZ#1575645]
5ef18e8
5ef18e8
* Wed Apr 25 2018 Petr Šplíchal <psplicha@redhat.com> 0.3-1
5ef18e8
- Remove the unreliable syntactic sugar [fix #2]
5ef18e8
- Add a simple example of a BeakerLib test
5ef18e8
- Improve the output, fix the encoding issue [#21]
5ef18e8
- Add sources as value for string formatting
5ef18e8
- Show source files in debug mode [fix #15]
5ef18e8
- Allow deeper one-line hierarchy [fix #17]
5ef18e8
- Update the list of supported Python versions
5ef18e8
- Use name 'root' for directory where Tree is rooted
5ef18e8
- Fix the full path custom format example
5ef18e8
- Move documentation to the fmf rpm package
5ef18e8
- Remove entry_points, custom format merged into fmf
5ef18e8
- Add a few custom format examples
5ef18e8
- Update docs with the custom format support
5ef18e8
- Run both Python 2 and Python 3 tests locally
5ef18e8
- Make eval() work with with Python 3 as well
5ef18e8
- Integrate custom formatting into base & cli
5ef18e8
- The first draft of output formatting
5ef18e8
- Enable python3 tests, python3 executable in Fedora
5ef18e8
- Python 3 compatibility changes
5ef18e8
- Show nothing if there are no metadata [fix #12]
5ef18e8
- Clean up before preparing the source files
5ef18e8
- Make setup methods compatible with older pytest
5ef18e8
5ef18e8
* Mon Apr 09 2018 Petr Šplíchal <psplicha@redhat.com> 0.2-1
5ef18e8
- Build a separate fmf package for the executable
5ef18e8
- Add docs example for setting up storage
5ef18e8
- Improve command line test coverage
5ef18e8
- Smoke tests for logging and coloring
5ef18e8
- Tests for pluralize, listed and split
5ef18e8
- Include a simple example of python code
5ef18e8
- Separate base tests, forgotten asserts, cleanup
5ef18e8
- Several adjustments for the attributes adding
5ef18e8
- Adding ability to add value to parent attribute
5ef18e8
- Fix Tree.get() to correctly return data
5ef18e8
- Make the spec do python2 & python3 and EPEL & Fedora
5ef18e8
- Ignore hidden files and directories when searching
5ef18e8
- Add test coverage for the filter function
5ef18e8
- Extend the list of examples, fix hierarchy typos
5ef18e8
- Enable Travis Continuous Integration
5ef18e8
5ef18e8
* Mon Jan 22 2018 Petr Šplíchal <psplicha@redhat.com> 0.1-1
5ef18e8
- Initial packaging.