Repository navigation
Expand file tree
/
Copy pathpython3-sh.spec
More file actions
67 lines (57 loc) · 1.66 KB
/
Copy pathpython3-sh.spec
File metadata and controls
67 lines (57 loc) · 1.66 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
#
# Conditional build:
%bcond_without tests # functional tests
%define module sh
Summary: Python subprocess replacement
Summary(pl.UTF-8): Zamiennik modułu subprocess dla Pythona
Name: python3-%{module}
Version: 2.4.0
Release: 1
License: MIT
Group: Libraries/Python
Source0: https://files.pythonhosted.org/packages/source/s/sh/%{module}-%{version}.tar.gz
# Source0-md5: 3c11c9c853bf3d326dab0167e9610187
Patch0: sh-udev.patch
Patch1: sh-tests.patch
URL: https://pypi.org/project/sh/
BuildRequires: python3-build
BuildRequires: python3-installer
BuildRequires: python3-modules >= 1:3.8.1
BuildRequires: python3-poetry-core >= 1.0.0
BuildRequires: python3-setuptools
%if %{with tests}
BuildRequires: python3-pytest >= 7.4.0
%endif
BuildRequires: rpm-pythonprov
BuildRequires: rpmbuild(macros) >= 2.044
Requires: python3-modules >= 1:3.8.1
BuildArch: noarch
BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
%description
sh is a full-fledged subprocess replacement for Python 3 and PyPy that
allows you to call any program as if it were a function.
%description -l pl.UTF-8
sh to w pełni rozwinięty zamiennik modułu subprocess dla Pythona 3 i
PyPy, pozwalający na wywołanie dowolnego programu tak, jakby był
funkcją.
%prep
%setup -q -n %{module}-%{version}
%patch -P0 -p1
%patch -P1 -p1
%build
%py3_build_pyproject
%if %{with tests}
PYTHONPATH=$(pwd)/src \
PYTEST_DISABLE_PLUGIN_AUTOLOAD=1 \
%{__python3} -m pytest tests/sh_test.py
%endif
%install
rm -rf $RPM_BUILD_ROOT
%py3_install_pyproject
%clean
rm -rf $RPM_BUILD_ROOT
%files
%defattr(644,root,root,755)
%doc CHANGELOG.md LICENSE.txt README.rst
%{py3_sitescriptdir}/sh
%{py3_sitescriptdir}/%{module}-%{version}.dist-info