Blame SPECS/python-pytoml.spec

aeed8a
%global project_owner avakar
aeed8a
%global github_name pytoml
aeed8a
%global commit 7dea353c8f02c8d02df1acd72121413823b574cc
aeed8a
%global shortcommit %(c=%{commit}; echo ${c:0:7})
aeed8a
%global sum Parser for TOML
aeed8a
%global desc A parser for TOML-0.4.0
aeed8a
aeed8a
%if 0%{?rhel} > 7 || 0%{?fedora} > 28
aeed8a
# Disable python2 build by default
aeed8a
%bcond_with python2
aeed8a
%else
aeed8a
%bcond_without python2
aeed8a
%endif
aeed8a
aeed8a
# The support for TOML 4 in python-toml is not complete. I (Julien Enselme)
aeed8a
# tried to improve it (I contributed for inline object # support) but the
aeed8a
# upstream maintainer is slow to respond and still hasn't published a
aeed8a
# new version with this support. Furthermore, I find the code hard to read and
aeed8a
# modify. From what I looked at pytoml, it is better written, has a better
aeed8a
# support of toml including edge cases.
aeed8a
aeed8a
# I'd recommend python-pytoml but for some usage, python-toml will do the
aeed8a
# trick just fine (I find it a little easier to use). That's why I'll keep
aeed8a
# maintaining it for the foreseeable future.
aeed8a
aeed8a
Name:           python-%{github_name}
aeed8a
Version:        0.1.14
aeed8a
Release:        5.git%{shortcommit}%{?dist}
aeed8a
Summary:        %{sum}
aeed8a
aeed8a
License:        MIT
aeed8a
# Take source from github since the license file is not provided in pypi release.
aeed8a
URL:            https://github.com/%{project_owner}/%{github_name}
aeed8a
Source0:        https://github.com/%{project_owner}/%{github_name}/archive/%{commit}/%{github_name}-%{commit}.tar.gz
aeed8a
BuildArch:      noarch
aeed8a
aeed8a
%description
aeed8a
%{desc}
aeed8a
aeed8a
aeed8a
%if %{with python2}
aeed8a
%package -n     python2-%{github_name}
aeed8a
BuildArch:      noarch
aeed8a
BuildRequires:  python2-devel
aeed8a
BuildRequires:  python2-setuptools
aeed8a
Summary:        %{sum}
aeed8a
%{?python_provide:%python_provide python2-%{github_name}}
aeed8a
aeed8a
%description -n python2-%{github_name}
aeed8a
%{desc}
aeed8a
%endif # with python2
aeed8a
aeed8a
aeed8a
%package -n     python%{python3_pkgversion}-%{github_name}
aeed8a
Summary:        %{sum}
aeed8a
BuildArch:      noarch
aeed8a
BuildRequires:  python%{python3_pkgversion}-devel
aeed8a
BuildRequires:  python%{python3_pkgversion}-setuptools
aeed8a
%{?python_provide:%python_provide python%{python3_pkgversion}-%{github_name}}
aeed8a
aeed8a
%if %{without python2}
aeed8a
Obsoletes:      python-%{github_name} < %{version}-%{release}
aeed8a
Obsoletes:      python2-%{github_name} < %{version}-%{release}
aeed8a
%endif # without python2
aeed8a
aeed8a
aeed8a
%description -n python%{python3_pkgversion}-%{github_name}
aeed8a
%{desc}
aeed8a
aeed8a
aeed8a
%prep
aeed8a
%setup -qn %{github_name}-%{commit}
aeed8a
aeed8a
aeed8a
%build
aeed8a
%if %{with python2}
aeed8a
%py2_build
aeed8a
%endif # with python2
aeed8a
aeed8a
%py3_build
aeed8a
aeed8a
aeed8a
%install
aeed8a
%py3_install
aeed8a
aeed8a
%if %{with python2}
aeed8a
%py2_install
aeed8a
%endif # with python2
aeed8a
aeed8a
aeed8a
# We cannot run check for now: the README ask to use git submodules, but we
aeed8a
# can't just use git submodules because it requires network access and pull code
aeed8a
# that is not from the package. The good way to do this would be to package the
aeed8a
# go program that include the tests file. It was done for python-toml that rely
aeed8a
# on golang-github-BurntSushi-toml-test. The problem is pytoml cannot pass this
aeed8a
# suite since it is outdated. The maintainer of pytoml uses his own fork of
aeed8a
# golang-github-BurntSushi-toml-test which has no release. So until improvement
aeed8a
# on that side, it's better not to run check within %%check and trust the
aeed8a
# upstream maintainer won't release broken stuff.
aeed8a
aeed8a
aeed8a
%if %{with python2}
aeed8a
%files -n python2-%{github_name}
aeed8a
%doc README.md
aeed8a
%license LICENSE
aeed8a
%{python2_sitelib}/%{github_name}-%{version}*-py%{python2_version}.egg-info/
aeed8a
%{python2_sitelib}/%{github_name}/
aeed8a
%endif # with python2
aeed8a
aeed8a
aeed8a
%files -n python%{python3_pkgversion}-%{github_name}
aeed8a
%doc README.md
aeed8a
%license LICENSE
aeed8a
%{python3_sitelib}/%{github_name}-%{version}*-py%{python3_version}.egg-info/
aeed8a
%{python3_sitelib}/%{github_name}/
aeed8a
aeed8a
aeed8a
%changelog
aeed8a
* Fri Mar 16 2018 Tomas Orsava <torsava@redhat.com> - 0.1.14-5.git7dea353
aeed8a
- Conditionalize the Python 2 subpackage
aeed8a
- Don't build the Python 2 subpackage on EL > 7 and Fedora > 28
aeed8a
aeed8a
* Fri Feb 09 2018 Fedora Release Engineering <releng@fedoraproject.org> - 0.1.14-4.git7dea353
aeed8a
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
aeed8a
aeed8a
* Sat Jan 27 2018 Iryna Shcherbina <ishcherb@redhat.com> - 0.1.14-3.git7dea353
aeed8a
- Update Python 2 dependency declarations to new packaging standards
aeed8a
  (See https://fedoraproject.org/wiki/FinalizingFedoraSwitchtoPython3)
aeed8a
aeed8a
* Thu Jul 27 2017 Fedora Release Engineering <releng@fedoraproject.org> - 0.1.14-2.git7dea353
aeed8a
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild
aeed8a
aeed8a
* Sat Jul 01 2017 Julien Enselme <jujens@jujens.eu> - 0.1.14-1.git7dea353
aeed8a
- Update to 0.1.14
aeed8a
aeed8a
* Mon May 22 2017 Julien Enselme <jujens@jujens.eu> - 0.1.13-1.git270397b
aeed8a
- Update ot 0.1.13
aeed8a
aeed8a
* Thu Apr 13 2017 Julien Enselme <jujens@jujens.eu> - 0.1.12-1.gite4ec5fb
aeed8a
- Update to 0.1.12
aeed8a
aeed8a
* Tue Mar 21 2017 Julien Enselme <jujens@jujens.eu> - 0.1.11-4.git01d900f
aeed8a
- Use %%{python3_pkgversion} to build for epel
aeed8a
- Add a BR to setuptools
aeed8a
aeed8a
* Sat Feb 11 2017 Fedora Release Engineering <releng@fedoraproject.org> - 0.1.11-3.git01d900f
aeed8a
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild
aeed8a
aeed8a
* Mon Dec 19 2016 Miro HronĨok <mhroncok@redhat.com> - 0.1.11-2.git01d900f
aeed8a
- Rebuild for Python 3.6
aeed8a
aeed8a
* Mon Aug 22 2016 Julien Enselme <jujens@jujens.eu> - 0.1.11-1.git01d900f
aeed8a
- Update to 0.1.11
aeed8a
aeed8a
* Tue Jul 19 2016 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.1.10-3.gitd883c7c
aeed8a
- https://fedoraproject.org/wiki/Changes/Automatic_Provides_for_Python_RPM_Packages
aeed8a
aeed8a
* Mon Jul 11 2016 Julien Enselme <jujens@jujens.eu> - 0.1.10-2.gitd883c7c
aeed8a
- Add comments to explain why python-toml and python-pytoml exist, why the
aeed8a
  source is taken from github and why the tests are not run for now.
aeed8a
aeed8a
* Thu Jul 07 2016 Julien Enselme <jujens@jujens.eu> - 0.1.10-1.gitd883c7c
aeed8a
- Inital package