[python-pyzabbix] Initial import (#1193334).

piotrp piotrp at fedoraproject.org
Wed Feb 18 19:41:23 UTC 2015


commit 7707974e6624529821b5b12859be863790acb2bb
Author: Piotr Popieluch <piotr1212 at gmail.com>
Date:   Wed Feb 18 20:40:49 2015 +0100

    Initial import (#1193334).

 .gitignore           |    1 +
 python-pyzabbix.spec |  116 ++++++++++++++++++++++++++++++++++++++++++++++++++
 sources              |    1 +
 3 files changed, 118 insertions(+), 0 deletions(-)
---
diff --git a/.gitignore b/.gitignore
index e69de29..f00f6c6 100644
--- a/.gitignore
+++ b/.gitignore
@@ -0,0 +1 @@
+/pyzabbix-7b62b40d38bd0eb65ec1711961d44620d2880599.tar.gz
diff --git a/python-pyzabbix.spec b/python-pyzabbix.spec
new file mode 100644
index 0000000..7ecfdbf
--- /dev/null
+++ b/python-pyzabbix.spec
@@ -0,0 +1,116 @@
+# needed for epel6
+%if 0%{?rhel} && 0%{?rhel} <= 6
+%{!?__python2: %global __python2 /usr/bin/python2}
+%{!?python2_sitelib: %global python2_sitelib %(%{__python2} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib())")}
+%{!?python2_sitearch: %global python2_sitearch %(%{__python2} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib(1))")}
+%endif
+
+# enable python3 on fedora
+%if 0%{?fedora}
+%bcond_without python3
+%else
+%bcond_with python3
+%endif
+
+%global srcname pyzabbix
+%global commit 7b62b40d38bd0eb65ec1711961d44620d2880599
+
+Name:           python-pyzabbix
+Version:        0.7.2
+Release:        1%{?dist}
+Summary:        PyZabbix is a Python module for working with the Zabbix API
+
+# license is in README.markdown
+License:        LGPLv2+
+URL:            https://github.com/lukecyca/pyzabbix
+Source0:        https://github.com/lukecyca/pyzabbix/archive/%{commit}/%{srcname}-%{commit}.tar.gz#/%{srcname}-%{commit}.tar.gz
+BuildArch:      noarch
+
+Requires:       python-requests
+BuildRequires:  python-devel
+BuildRequires:  python-httpretty
+BuildRequires:  python-nose
+BuildRequires:  python-requests
+%if %{with python3}
+Requires:       python3-requests
+BuildRequires:  python3-devel
+BuildRequires:  python3-httpretty
+BuildRequires:  python3-requests
+%if 0%{?fedora} >= 22
+BuildRequires:  python3-nose
+%endif
+%endif
+
+
+%description
+%{summary}.
+
+
+%if %{with python3}
+%package -n python3-pyzabbix
+Summary:        PyZabbix is a Python module for working with the Zabbix API
+License:        LGPLv2
+
+
+%description -n python3-pyzabbix
+%{summary}.
+%endif
+
+
+%prep
+%setup -q -n %{srcname}-%{commit}
+
+rm -rf *.egg-info
+
+%if %{with python3}
+rm -rf %{py3dir}
+cp -a . %{py3dir}
+%endif
+
+
+%build
+%{__python2} setup.py build
+
+%if %{with python3}
+pushd %{py3dir}
+%{__python3} setup.py build
+popd
+%endif
+
+
+%install
+%if %{with python3}
+pushd %{py3dir}
+%{__python3} setup.py install -O1 --skip-build --root %{buildroot}
+popd
+%endif
+
+%{__python2} setup.py install -O1 --skip-build --root %{buildroot}
+
+
+%check
+%{__python2} setup.py nosetests
+
+%if %{with python3}
+%if 0%{?fedora} >= 22
+%{__python3} setup.py nosetests
+%endif
+%endif
+
+
+%files
+%doc README.markdown examples/
+%{python2_sitelib}/%{srcname}
+%{python2_sitelib}/%{srcname}-%{version}-py2.?.egg-info
+
+%if %{with python3}
+%files -n python3-pyzabbix
+%doc README.markdown examples/
+%{python3_sitelib}/%{srcname}
+%{python3_sitelib}/%{srcname}-%{version}-py3.?.egg-info
+%endif
+
+
+%changelog
+* Thu Feb 12 2015 Piotr Popieluch <piotr1212 at gmail.com> - 0.7.2-1
+- Initial package
diff --git a/sources b/sources
index e69de29..a14919a 100644
--- a/sources
+++ b/sources
@@ -0,0 +1 @@
+4192b382d1a4e3935ccedd8e99b8dd2a  pyzabbix-7b62b40d38bd0eb65ec1711961d44620d2880599.tar.gz


More information about the scm-commits mailing list