-
Notifications
You must be signed in to change notification settings - Fork 1
/
python-vagrantpy.spec
91 lines (72 loc) · 2.24 KB
/
python-vagrantpy.spec
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
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
# Enable the automatic Python dependency generator
%{?python_enable_dependency_generator}
# Tests do not work without vagrant + virtualbox in the environment
%bcond_with tests
%global pypi_name vagrantpy
Name: python-%{pypi_name}
Version: 0.6.0
Release: 0%{?dist}
Summary: Python bindings for interacting with Vagrant virtual machines
%if %{_vendor} == "debbuild"
Packager: David McCheyne <davidmccheyne@gmail.com>
Group: python
%endif
License: MIT
URL: https://github.com/vagrantpy/vagrantpy
Source0: https://files.pythonhosted.org/packages/source/v/%{pypi_name}/%{pypi_name}-%{version}.tar.gz
BuildArch: noarch
%if %{_vendor} == "debbuild"
BuildRequires: python3-dev
BuildRequires: python3-setuptools
BuildRequires: python3-deb-macros
%else
BuildRequires: python3-devel
BuildRequires: python3dist(setuptools)
%endif
%if %{with tests}
BuildRequires: python3dist(nose)
BuildRequires: python3dist(rednose)
BuildRequires: vagrant
BuildRequires: virtualbox
%endif
%description
VagrantPy is a python module that provides a _thin_ wrapper
around the vagrant command line executable, allowing programmatic control of
Vagrant virtual machines (boxes).
%package -n python3-%{pypi_name}
Summary: %{summary}
%{?python_provide:%python_provide python3-%{pypi_name}}
%if %{_vendor} == "debbuild"
Requires(preun): python3-minimal
Requires(post): python3-minimal
%endif
%description -n python3-%{pypi_name}
VagrantPy is a python module that provides a _thin_ wrapper
around the vagrant command line executable, allowing programmatic control of
Vagrant virtual machines (boxes).
%prep
%autosetup -n %{pypi_name}-%{version}
# Remove bundled egg-info
rm -rf %{pypi_name}.egg-info
%build
%py3_build
%install
%py3_install
%if %{with tests}
%check
nosetests --immediate --stop -vv --rednose
%endif
%files -n python3-%{pypi_name}
%license LICENSE.txt
%doc README.md
%{python3_sitelib}/vagrant
%{python3_sitelib}/vagrantpy-%{version}-*
%if %{_vendor} == "debbuild"
%preun -n python3-%{pypi_name}
%{py3_bytecompile_preun python3-%{pypi_name}}
%post -n python3-%{pypi_name}
%{py3_bytecompile_post python3-%{pypi_name}}
%endif
%changelog
* Wed Jan 15 2020 Neal Gompa <ngompa13@gmail.com>
- Initial packaging