8a85e6f
Name:           xonsh
8416dee
Version:        0.9.17
fadb3d2
Release:        3%{?dist}
8a85e6f
Summary:        A general purpose, Python-ish shell
8a85e6f
ac43246
# xonsh is BSD-2-Clause.
ac43246
# xonsh/winutils.py and xonsh/xoreutils/_which.py contain MIT code.
ac43246
License:        BSD and MIT
ac43246
URL:            https://xon.sh
f80d303
Source0:        %pypi_source
8a85e6f
BuildArch:      noarch
8a85e6f
2aa00d4
BuildRequires:  python%{python3_pkgversion}-devel
2aa00d4
BuildRequires:  python%{python3_pkgversion}-setuptools
ac43246
BuildRequires:  %{py3_dist ply}
ac43246
BuildRequires:  %{py3_dist prompt-toolkit}
ac43246
BuildRequires:  %{py3_dist pygments}
ac43246
BuildRequires:  %{py3_dist pytest}
ac43246
BuildRequires:  git
ac43246
BuildRequires:  man-db
f80d303
Requires:       python3 >= 3.4
ac43246
Requires:       %{py3_dist ply}
ac43246
Requires:       %{py3_dist prompt-toolkit}
ac43246
Requires:       %{py3_dist setproctitle}
ac43246
Requires:       %{py3_dist pygments}
ac43246
Requires:       %{py3_dist distro}
8a85e6f
8a85e6f
8a85e6f
%description
ac43246
xonsh is a Python-powered, cross-platform, Unix-gazing shell language and
ac43246
command prompt. The language is a superset of Python 3.4+ with additional shell
ac43246
primitives. xonsh (pronounced *conch*) is meant for the daily use of experts
ac43246
and novices alike.
8a85e6f
8a85e6f
%prep
ac43246
%autosetup -n %{name}-%{version}
8a85e6f
8a85e6f
%build
f80d303
# Remove shebang.
8a85e6f
sed --in-place "s:#!\s*/usr.*::" xonsh/xoreutils/_which.py
8a85e6f
ac43246
%py3_build
8a85e6f
8a85e6f
%install
ac43246
%py3_install
ac43246
ac43246
# py3_build produces erroneous shebangs. Fix them.
ac43246
# https://bugzilla.redhat.com/show_bug.cgi?id=1335203
ac43246
pathfix.py -i "%{__python3} %{py3_shbang_opts}u" -p -n %{buildroot}%{_bindir}/xonsh
ac43246
pathfix.py -i "%{__python3} %{py3_shbang_opts}u" -p -n %{buildroot}%{_bindir}/xonsh-cat
ac43246
ac43246
%check
ac43246
# The tests only succeed if:
ac43246
#
ac43246
# - They are run from within a xonsh shell.
ac43246
# - They are run with the `py.test-3` executable instead of `python3 -m pytest`.
ac43246
#
ac43246
# The run-tests.xsh script does those things for us.
ac43246
658c5ca
if [ "%{python3_version_nodots}" -ge "38" ]; then
658c5ca
  sed --in-place "s:ignores = \[\]:ignores = \['--ignore', 'tests/test_parser.py'\]:" run-tests.xsh
658c5ca
fi
658c5ca
ac43246
sed --in-place "s:pytest:py.test-3:" run-tests.xsh
ac43246
PYTHONDONTWRITEBYTECODE=1 PYTHONPATH=%{buildroot}%{python3_sitelib} PATH="%{buildroot}%{_bindir}:$PATH" %{buildroot}%{_bindir}/xonsh run-tests.xsh
8a85e6f
a8d209f
%post
a8d209f
if [ "$1" -ge 1 ]; then
a8d209f
  if [ ! -f %{_sysconfdir}/shells ] ; then
a8d209f
    touch %{_sysconfdir}/shells
a8d209f
  fi
a8d209f
  for binpath in %{_bindir} /bin; do
a8d209f
    if ! grep -q "^${binpath}/xonsh$" %{_sysconfdir}/shells; then
a8d209f
       (cat %{_sysconfdir}/shells; echo "$binpath/xonsh") > %{_sysconfdir}/shells.new
a8d209f
       mv %{_sysconfdir}/shells{.new,}
a8d209f
    fi
a8d209f
  done
a8d209f
fi
a8d209f
a8d209f
%postun
a8d209f
if [ "$1" = 0 ] && [ -f %{_sysconfdir}/shells ] ; then
a8d209f
  sed -e '\!^%{_bindir}/xonsh$!d' -e '\!^/bin/xonsh$!d' < %{_sysconfdir}/shells > %{_sysconfdir}/shells.new
a8d209f
  mv %{_sysconfdir}/shells{.new,}
a8d209f
fi
a8d209f
8a85e6f
%files
8a85e6f
%doc README.rst
ac43246
%license license
8a85e6f
%{_bindir}/xonsh
8a85e6f
%{_bindir}/xon.sh
ac43246
%{_bindir}/xonsh-cat
ac43246
%{python3_sitelib}/xonsh/
ac43246
%{python3_sitelib}/xontrib/
16d1882
%{python3_sitelib}/xonsh-%{version}*-py%{python3_version}.egg-info/
8a85e6f
8a85e6f
%changelog
fadb3d2
* Wed Jul 29 2020 Fedora Release Engineering <releng@fedoraproject.org> - 0.9.17-3
fadb3d2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
fadb3d2
51e167a
* Tue May 26 2020 Miro Hrončok <mhroncok@redhat.com> - 0.9.17-2
51e167a
- Rebuilt for Python 3.9
51e167a
8416dee
* Fri Apr 10 2020 Carmen Bianca Bakker <carmenbianca@fedoraproject.org> - 0.9.17-1
8416dee
- new version
8416dee
9909382
* Tue Apr 07 2020 Carmen Bianca Bakker <carmenbianca@fedoraproject.org> - 0.9.16-1
9909382
- new version
9909382
fa1b8f1
* Fri Jan 31 2020 Fedora Release Engineering <releng@fedoraproject.org> - 0.9.13-2
fa1b8f1
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
fa1b8f1
31334b3
* Fri Nov 22 2019 Carmen Bianca Bakker <carmenbianca@fedoraproject.org> - 0.9.13-1
31334b3
- New upstream version.
31334b3
- Python 3.8 should no longer crash.
31334b3
56e51bb
* Thu Sep 05 2019 Carmen Bianca Bakker <carmenbianca@fedoraproject.org> - 0.9.11-3
56e51bb
- Re-enable tests.
56e51bb
2aa00d4
* Tue Sep 03 2019 Carmen Bianca Bakker <carmenbianca@fedoraproject.org> - 0.9.11-2
2aa00d4
- Temporarily disable tests for Python 3.8
2aa00d4
763bc7a
* Thu Aug 29 2019 Carmen Bianca Bakker <carmenbianca@fedoraproject.org> - 0.9.11-1
763bc7a
- new version
763bc7a
11da170
* Mon Aug 19 2019 Miro Hrončok <mhroncok@redhat.com> - 0.9.10-3
11da170
- Rebuilt for Python 3.8
11da170
90339ab
* Mon Aug 19 2019 Miro Hrončok <mhroncok@redhat.com> - 0.9.10-2
90339ab
- Rebuilt for Python 3.8
90339ab
5b72cd2
* Tue Aug 13 2019 Mairi Dulaney <jdulaney@fedoraproject.org> - 0.9.10-1
5b72cd2
- Upgrade to latest release
5b72cd2
c53dc92
* Sat Jul 27 2019 Fedora Release Engineering <releng@fedoraproject.org> - 0.9.6-2
c53dc92
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
c53dc92
e73bbab
* Fri Jun 21 2019 Carmen Bianca Bakker <carmenbianca@fedoraproject.org> - 0.9.6-1
e73bbab
- new version
e73bbab
0430cf7
* Sat May 18 2019 Carmen Bianca Bakker <carmenbianca@fedoraproject.org> - 0.9.3-1
0430cf7
- New upstream version
0430cf7
f80d303
* Fri May 10 2019 Carmen Bianca Bakker <carmenbianca@fedoraproject.org> - 0.9.0-1
f80d303
- New upstream version
f80d303
- Python 3.4 support deprecated
f80d303
- Tentative Python 3.8 support added
f80d303
a8d209f
* Tue Apr 23 2019 Carmen Bianca Bakker <carmenbianca@fedoraproject.org> - 0.8.12-2
3b40c56
- Automatically add/remove xonsh to /etc/shells.
a8d209f
ac43246
* Tue Apr 02 2019 Carmen Bianca Bakker <carmenbianca@fedoraproject.org> - 0.8.12-1
ac43246
- New upstream release 0.8.12
ac43246
8a85e6f
* Sat Jul 14 2018 Fedora Release Engineering <releng@fedoraproject.org> - 0.6.9-2
8a85e6f
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
8a85e6f
ac43246
* Sat Jul 07 2018 John Dulaney <jdulaney@fedoraproject.org> - 0.6.9-1
8a85e6f
- New upstream release
8a85e6f
8a85e6f
* Tue Jun 19 2018 Miro Hrončok <mhroncok@redhat.com> - 0.6.5-2
8a85e6f
- Rebuilt for Python 3.7
8a85e6f
8a85e6f
* Thu May 31 2018 John Dulaney <jdulaney@fedoraproject.org> - 0.6.5-1
8a85e6f
- New upstream release
8a85e6f
8a85e6f
* Sat Apr 14 2018 John Dulaney <jdulaney@fedoraproject.org> - 0.6.1-1
8a85e6f
- New upstream release
8a85e6f
8a85e6f
* Fri Feb 09 2018 Fedora Release Engineering <releng@fedoraproject.org> - 0.5.12-3
8a85e6f
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
8a85e6f
8a85e6f
* Thu Jul 27 2017 Fedora Release Engineering <releng@fedoraproject.org> - 0.5.12-2
8a85e6f
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild
8a85e6f
8a85e6f
* Thu Jun 22 2017 John Dulaney <jdulaney@fedoraproject.org> - 0.5.12-1
8a85e6f
- New upstream release 0.5.12
8a85e6f
8a85e6f
* Mon May 29 2017 John Dulaney <jdulaney@fedoraproject.org> - 0.5.10-1
8a85e6f
- New upstream release 0.5.10
8a85e6f
8a85e6f
* Tue Apr 04 2017 John Dulaney <jdulaney@fedoraproject.org> - 0.5.9-1
8a85e6f
- New upstream release 0.5.9
8a85e6f
8a85e6f
* Sat Mar 11 2017 John Dulaney <jdulaney@fedoraproject.org> - 0.5.8-1
8a85e6f
- New upstream release 0.5.8
8a85e6f
8a85e6f
* Fri Mar 03 2017 John Dulaney <jdulaney@fedoraproject.org> - 0.5.7-1
8a85e6f
- New upstream release 0.5.7
8a85e6f
8a85e6f
* Fri Feb 24 2017 John Dulaney <jdulaney@fedoraproject.org> - 0.5.6-1
8a85e6f
- New upstream release 0.5.6
8a85e6f
8a85e6f
* Sun Feb 12 2017 John Dulaney <jdulaney@fedoraproject.org> - 0.5.4-1
8a85e6f
- New upstream release 0.5.4
8a85e6f
8a85e6f
* Sat Feb 11 2017 Fedora Release Engineering <releng@fedoraproject.org> - 0.5.2-2
8a85e6f
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild
8a85e6f
8a85e6f
* Sat Jan 07 2017 John Dulaney <jdulaney@fedoraproject.org> - 0.5.2-1
8a85e6f
- New upstream release 0.5.2
8a85e6f
8a85e6f
* Sat Dec 24 2016 John Dulaney <jdulaney@fedoraproject.org> - 0.5.1
8a85e6f
- New upstream release 0.5.1
8a85e6f
8a85e6f
* Mon Dec 19 2016 Miro Hrončok <mhroncok@redhat.com> - 0.4.7-2
8a85e6f
- Rebuild for Python 3.6
8a85e6f
8a85e6f
* Mon Oct 03 2016 John Dulaney <jdulaney@fedoraproject.org> - 0.4.7-1
8a85e6f
- New upstream release 0.4.7
8a85e6f
8a85e6f
* Sun Sep 04 2016 John Dulaney <jdulaney@fedoraproject.org> - 0.4.6-1
8a85e6f
- New upstream release 0.4.6
8a85e6f
8a85e6f
* Sun Aug 28 2016 John Dulaney <jdulaney@fedoraproject.org> - 0.4.5-2
8a85e6f
- Require python3-pygments and python3-setproctitle
8a85e6f
8a85e6f
* Sun Aug 28 2016 John Dulaney <jdulaney@fedoraproject.org> - 0.4.5-1
8a85e6f
- New upstream release 0.4.5
8a85e6f
8a85e6f
* Fri Aug  5 2016 Luke Macken <lmacken@redhat.com> - 0.4.4-2
8a85e6f
- Require python3-prompt_toolkit to improve usability
8a85e6f
8a85e6f
* Thu Jul 21 2016 John Dulaney <jdulaney@fedoraproject.org> - 0.4.4-1
8a85e6f
- New upstream release 0.4.4
8a85e6f
8a85e6f
* Tue Jul 19 2016 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.4.3-2
8a85e6f
- https://fedoraproject.org/wiki/Changes/Automatic_Provides_for_Python_RPM_Packages
8a85e6f
8a85e6f
* Wed Jul 13 2016 John Dulaney <jdulaney@fedoraproject.org> - 0.4.3-1
8a85e6f
- New upstream release 0.4.3
8a85e6f
8a85e6f
* Mon Jun 20 2016 Luke Macken <lmacken@redhat.com> - 0.3.4-1
8a85e6f
- New upstream release 0.3.4
8a85e6f
8a85e6f
* Mon Jun 06 2016 Luke Macken <lmacken@redhat.com> - 0.3.3-1
8a85e6f
- Latest upstream release
8a85e6f
- Update the URL
8a85e6f
8a85e6f
* Fri Jun 03 2016 Luke Macken <lmacken@redhat.com> - 0.3.2-1
8a85e6f
- Latest upstream release
8a85e6f
- Update the Summary
8a85e6f
8a85e6f
* Mon Mar 16 2015 Robert Kuska <rkuska@redhat.com> - 0.1.2-1
8a85e6f
- Initial package.