From 7c27f2c838273c608bfe69f98567739132fbecde Mon Sep 17 00:00:00 2001 From: Daniel Steiner Date: Sun, 3 Feb 2019 12:47:28 +0100 Subject: [PATCH] All dependencies resovled for powerline_shell packages --- centos/SPECS/powerline_shell.spec | 62 ++++++++++++++++++++++++++++++ centos/SPECS/python2-argparse.spec | 59 ++++++++++++++++++++++++++++ fedora/SPECS/powerline_shell.spec | 7 +++- fedora/SPECS/python3-argparse.spec | 2 +- 4 files changed, 128 insertions(+), 2 deletions(-) create mode 100644 centos/SPECS/powerline_shell.spec create mode 100644 centos/SPECS/python2-argparse.spec diff --git a/centos/SPECS/powerline_shell.spec b/centos/SPECS/powerline_shell.spec new file mode 100644 index 0000000..dbb9dd3 --- /dev/null +++ b/centos/SPECS/powerline_shell.spec @@ -0,0 +1,62 @@ +Name: powerline_shell +Version: 0.7.0 +Release: 3%{?dist} +Summary: A beautiful and useful prompt generator for Bash, ZSH, Fish, and tcsh + +License: MIT +URL: https://dev.daniel-steiner.org/dani/powerline-shell-enhanced#segment-configuration +Source0: powerline_shell.tar.gz + +%define debug_package %{nil} + +BuildRequires: python powerline +BuildRequires: GitPython +BuildRequires: python-setuptools +Requires: python powerline bash +Requires: GitPython +Requires: python2-argparse +Requires: python-setuptools + +%description +A beautiful and useful prompt generator for Bash, ZSH, Fish, and tcsh: + +* Shows some important details about the git/svn/hg/fossil branch (see below) +* Changes color if the last command exited with a failure code +* If you’re too deep into a directory tree, shortens the displayed path with an ellipsis +* Shows the current Python virtualenv environment +* It’s easy to customize and extend. See below for details. + +The generated prompts are designed to resemble powerline, but otherwise this project has no relation to powerline. + +%prep +%setup -q -n %{name} + +%build +python setup.py build + +%install +python setup.py install --no-compile --skip-build --prefix=%{_prefix} --root=%{buildroot} + +%clean +[ "%{buildroot}" != "/" ] && [ -d "%{buildroot}" ] && rm -rf %{buildroot} +[ "%{_builddir}" != "/" ] && [ -d "%{_builddir}" ] && rm -rf %{_builddir}/* + +%files +%doc CHANGELOG.md README.md LICENSE +%{_bindir}/powerline-shell +%{python_sitelib}/%{name}/*.py* +%{python_sitelib}/%{name}/segments/*.py* +%{python_sitelib}/%{name}/themes/*.py* +%{python_sitelib}/%{name}*.egg-info/* + + +%changelog +* Sun Feb 3 2019 Daniel Steiner +- Dependency added for python-setuptools rpm. + +* Sun Feb 3 2019 Daniel Steiner +- Dependency added for pythonX-argparse rpm. + +* Sat Feb 2 2019 Daniel Steiner +- First build. + diff --git a/centos/SPECS/python2-argparse.spec b/centos/SPECS/python2-argparse.spec new file mode 100644 index 0000000..001c682 --- /dev/null +++ b/centos/SPECS/python2-argparse.spec @@ -0,0 +1,59 @@ +%{!?python_sitelib: %global python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")} + +%global oname argparse + +Summary: Optparse inspired command line parser for Python +Name: python2-argparse +Version: 1.4.0 +Release: 1%{?dist} +License: Python +Group: Development/Languages +URL: http://code.google.com/p/argparse/ +Source0: http://argparse.googlecode.com/files/argparse-%{version}.tar.gz +BuildRequires: python2-setuptools +BuildRequires: dos2unix +BuildArch: noarch + +%description + +The argparse module is an optparse-inspired command line parser that +improves on optparse by: + * handling both optional and positional arguments + * supporting parsers that dispatch to sub-parsers + * producing more informative usage messages + * supporting actions that consume any number of command-line args + * allowing types and actions to be specified with simple callables + instead of hacking class attributes like STORE_ACTIONS or CHECK_METHODS + +as well as including a number of other more minor improvements on the +optparse API. + +%prep +%setup -q -n %{oname}-%{version} +dos2unix -k README.txt NEWS.txt +%{__rm} -rf doc/source + +%build +%{__python} setup.py build + +%install +%{__rm} -rf %{buildroot} +%{__python} setup.py install --skip-build --root %{buildroot} + +%check +pushd test +PYTHONPATH=../ %{__python} test_%{oname}.py + +%clean +[ "%{buildroot}" != "/" ] && [ -d "%{buildroot}" ] && rm -rf %{buildroot} +[ "%{_builddir}" != "/" ] && [ -d "%{_builddir}" ] && rm -rf %{_builddir}/* + +%files +%defattr(-, root, root, -) +%doc README.txt LICENSE.txt NEWS.txt doc/* +%{python_sitelib}/* + +%changelog +* Sun Feb 3 2019 Daniel Steiner +- First build, it's required by powerline_shell package. + diff --git a/fedora/SPECS/powerline_shell.spec b/fedora/SPECS/powerline_shell.spec index 3b2c88d..73aa0a7 100644 --- a/fedora/SPECS/powerline_shell.spec +++ b/fedora/SPECS/powerline_shell.spec @@ -1,6 +1,6 @@ Name: powerline_shell Version: 0.7.0 -Release: 2%{?dist} +Release: 3%{?dist} Summary: A beautiful and useful prompt generator for Bash, ZSH, Fish, and tcsh License: MIT @@ -12,9 +12,11 @@ Source0: powerline_shell.tar.gz BuildRequires: python%{pyvers} powerline BuildRequires: python%{pyvers}-GitPython +BuildRequires: python%{pyvers}-setuptools Requires: python%{pyvers} powerline bash Requires: python%{pyvers}-GitPython Requires: python%{pyvers}-argparse +Requires: python%{pyvers}-setuptools %description A beautiful and useful prompt generator for Bash, ZSH, Fish, and tcsh: @@ -55,6 +57,9 @@ The generated prompts are designed to resemble powerline, but otherwise this pro %changelog +* Sun Feb 3 2019 Daniel Steiner +- Dependency added for pythonX-setuptools rpm. + * Sun Feb 3 2019 Daniel Steiner - Dependency added for pythonX-argparse rpm. diff --git a/fedora/SPECS/python3-argparse.spec b/fedora/SPECS/python3-argparse.spec index 086c38e..8c9fcae 100644 --- a/fedora/SPECS/python3-argparse.spec +++ b/fedora/SPECS/python3-argparse.spec @@ -3,7 +3,7 @@ %global oname argparse Summary: Optparse inspired command line parser for Python -Name: python-argparse +Name: python3-argparse Version: 1.4.0 Release: 1%{?dist} License: Python