Blame python-parso.spec

1c3b019
# what it's called on pypi
08263f6
%global srcname parso
1c3b019
# what it's imported as
ec1b9c5
%global libname %{srcname}
1c3b019
# name of egg info directory
1c3b019
%global eggname %{srcname}
1c3b019
# package name fragment
1c3b019
%global pkgname %{srcname}
08263f6
b39834a
%global common_description %{expand:
b39834a
Parso is a Python parser that supports error recovery and round-trip parsing
b39834a
for different Python versions (in multiple Python versions). Parso is also able
b39834a
to list multiple syntax errors in your python file.  Parso has been
b39834a
battle-tested by jedi. It was pulled out of jedi to be useful for other
b39834a
projects as well.  Parso consists of a small API to parse Python and analyse
b39834a
the syntax tree.}
0a5ded6
be3e858
# Use common documentation directory
be3e858
%global _docdir_fmt %{name}
be3e858
9add43e
# test suite fixtures use yield statements, only available in pytest 3
9add43e
%if 0%{?fedora} >= 26
08263f6
%bcond_without tests
08263f6
%endif
08263f6
545dd6a
Name:           python-%{pkgname}
545dd6a
Version:        0.3.1
545dd6a
Release:        2%{?dist}
545dd6a
Summary:        Parser that supports error recovery and round-trip parsing
545dd6a
License:        MIT and Python
545dd6a
URL:            https://parso.readthedocs.io
545dd6a
Source0:        %pypi_source
545dd6a
BuildArch:      noarch
08263f6
08263f6
b39834a
%description %{common_description}
08263f6
08263f6
1c3b019
%package -n python2-%{pkgname}
545dd6a
Summary:        %{summary}
545dd6a
BuildRequires:  python2-devel
545dd6a
BuildRequires:  python2-setuptools
08263f6
%if %{with tests}
545dd6a
BuildRequires:  %{?fedora:python2-}pytest >= 3.0.0
08263f6
%endif
1c3b019
%{?python_provide:%python_provide python2-%{pkgname}}
08263f6
08263f6
b39834a
%description -n python2-%{pkgname} %{common_description}
08263f6
08263f6
1c3b019
%package -n python%{python3_pkgversion}-%{pkgname}
545dd6a
Summary:        %{summary}
545dd6a
BuildRequires:  python%{python3_pkgversion}-devel
545dd6a
BuildRequires:  python%{python3_pkgversion}-setuptools
08263f6
%if %{with tests}
545dd6a
BuildRequires:  python%{python3_pkgversion}-pytest >= 3.0.0
08263f6
%endif
1c3b019
%{?python_provide:%python_provide python%{python3_pkgversion}-%{pkgname}}
08263f6
08263f6
b39834a
%description -n python%{python3_pkgversion}-%{pkgname} %{common_description}
08263f6
08263f6
29f8635
%if %{defined python3_other_pkgversion}
29f8635
%package -n python%{python3_other_pkgversion}-%{pkgname}
545dd6a
Summary:        %{summary}
545dd6a
BuildRequires:  python%{python3_other_pkgversion}-devel
545dd6a
BuildRequires:  python%{python3_other_pkgversion}-setuptools
29f8635
%if %{with tests}
545dd6a
BuildRequires:  python%{python3_other_pkgversion}-pytest >= 3.0.0
29f8635
%endif
29f8635
29f8635
b39834a
%description -n python%{python3_other_pkgversion}-%{pkgname} %{common_description}
29f8635
%endif
29f8635
29f8635
08263f6
%prep
08263f6
%autosetup -n %{srcname}-%{version}
08263f6
08263f6
08263f6
%build
08263f6
%py2_build
08263f6
%py3_build
29f8635
%if %{defined python3_other_pkgversion}
29f8635
%py3_other_build
29f8635
%endif
08263f6
08263f6
08263f6
%install
29f8635
%if %{defined python3_other_pkgversion}
29f8635
%py3_other_install
29f8635
%endif
08263f6
%py3_install
29f8635
%py2_install
08263f6
08263f6
08263f6
%if %{with tests}
08263f6
%check
08263f6
py.test-%{python2_version} --verbose
08263f6
py.test-%{python3_version} --verbose
29f8635
%if %{defined python3_other_pkgversion}
29f8635
py.test-%{python3_other_version} --verbose
29f8635
%endif
08263f6
%endif
08263f6
08263f6
1c3b019
%files -n python2-%{pkgname}
08263f6
%license LICENSE.txt
08263f6
%doc README.rst
ec1b9c5
%{python2_sitelib}/%{libname}
1c3b019
%{python2_sitelib}/%{eggname}-%{version}-py%{python2_version}.egg-info
08263f6
08263f6
1c3b019
%files -n python%{python3_pkgversion}-%{pkgname}
08263f6
%license LICENSE.txt
08263f6
%doc README.rst
ec1b9c5
%{python3_sitelib}/%{libname}
1c3b019
%{python3_sitelib}/%{eggname}-%{version}-py%{python3_version}.egg-info
08263f6
08263f6
29f8635
%if %{defined python3_other_pkgversion}
29f8635
%files -n python%{python3_other_pkgversion}-%{pkgname}
29f8635
%license LICENSE.txt
29f8635
%doc README.rst
ec1b9c5
%{python3_other_sitelib}/%{libname}
29f8635
%{python3_other_sitelib}/%{eggname}-%{version}-py%{python3_other_version}.egg-info
29f8635
%endif
29f8635
29f8635
08263f6
%changelog
84ab2e3
* Sat Feb 02 2019 Fedora Release Engineering <releng@fedoraproject.org> - 0.3.1-2
84ab2e3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
84ab2e3
3f33cdb
* Wed Aug 08 2018 Carl George <carl@george.computer> - 0.3.1-1
3f33cdb
- Latest upstream
be3e858
- Use common documentation directory
29f8635
- Enable python36 subpackage for EPEL
3f33cdb
aedc2b7
* Sat Jul 14 2018 Fedora Release Engineering <releng@fedoraproject.org> - 0.2.1-3
aedc2b7
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
aedc2b7
8e4ced9
* Fri Jun 15 2018 Miro HronĨok <mhroncok@redhat.com> - 0.2.1-2
8e4ced9
- Rebuilt for Python 3.7
8e4ced9
7dc78c0
* Mon May 21 2018 Carl George <carl@george.computer> - 0.2.1-1
7dc78c0
- Latest upstream
7dc78c0
14c7871
* Mon Apr 16 2018 Carl George <carl@george.computer> - 0.2.0-1
14c7871
- Latest upstream
14c7871
44d34dc
* Fri Feb 09 2018 Fedora Release Engineering <releng@fedoraproject.org> - 0.1.1-3
44d34dc
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
44d34dc
08263f6
* Sat Dec 30 2017 Carl George <carl@george.computer> - 0.1.1-2
08263f6
- Be more explicit with the files in site-packages
08263f6
08263f6
* Tue Dec 26 2017 Carl George <carl@george.computer> - 0.1.1-1
08263f6
- Initial package