Blob Blame History Raw
%global pypi_name pox

%global _description %{expand:
pox provides a collection of utilities for navigating and manipulating
filesystems. This module is designed to facilitate some of the low level
operating system interactions that are useful when exploring a filesystem on a
remote host, where queries such as "what is the root of the filesystem?", "what
is the user's name?", and "what login shell is preferred?" become essential in
allowing a remote user to function as if they were logged in locally. While pox
is in the same vein of both the os and shutil builtin modules, the majority of
its functionality is unique and compliments these two modules.

pox provides python equivalents of several unix shell commands such as which
and find. These commands allow automated discovery of what has been installed
on an operating system, and where the essential tools are located. This
capability is useful not only for exploring remote hosts, but also locally as a
helper utility for automated build and installation.

Several high-level operations on files and filesystems are also provided.
Examples of which are: finding the location of an installed python package,
determining if and where the source code resides on the filesystem, and
determining what version the installed package is.

pox also provides utilities to enable the abstraction of commands sent to a
remote filesystem. In conjunction with a registry of environment variables and
installed utilites, pox enables the user to interact with a remote filesystem
as if they were logged in locally.

pox is part of pathos, a python framework for heterogeneous computing. pox is
in active development, so any user feedback, bug reports, comments, or
suggestions are highly appreciated. A list of issues is located at, with a legacy list maintained at

Major Features

pox provides utilities for discovering the user's environment:

- return the user's name, current shell, and path to user's home directory
- strip duplicate entries from the user's $PATH
- lookup and expand environment variables from ${VAR} to value

pox also provides utilities for filesystem exploration and manipulation:

- discover the path to a file, exectuable, directory, or symbolic link
- discover the path to an installed package
- parse operating system commands for remote shell invocation
- convert text files to platform-specific formatting}

Name:           python-%{pypi_name}
Version:        0.3.0
Release:        1%{?dist}
Summary:        Utilities for filesystem exploration and automated builds

License:        BSD
URL:  {pypi_name}
Source0:        %{pypi_source %{pypi_name} %{version} zip}

BuildArch:      noarch

%description %_description

%package -n python3-%{pypi_name}
Summary:        %{summary}
BuildRequires:  python3-devel
BuildRequires:  python3-setuptools
BuildRequires:  python3-pytest

%description -n python3-%{pypi_name} %_description

%package doc
Summary:        Documentation for %{name}
BuildRequires:  make
BuildRequires:  python3-sphinx

%description doc
This package provides documentation for %{name}.

%autosetup -n %{pypi_name}-%{version}
rm -rf %{pypi_name}.egg-info

find . -type f -name "*.py" -exec sed -i '/^#![  ]*\/usr\/bin\/env.*$/ d' {} 2>/dev/null ';'


PYTHONPATH=.. make -C docs SPHINXBUILD=sphinx-build-3 html
rm -rf docs/build/{.doctrees,.buildinfo} -vf


# can't find the shell in mock somehow
%{pytest} -k "not test_shutils"

%files -n python3-%{pypi_name}
%license LICENSE

%files doc
%license LICENSE
%doc docs/build

* Wed Jul 07 2021 Ankur Sinha <ankursinha AT fedoraproject DOT org> - 0.3.0-1
- Initial build