summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKen Dreyer <ktdreyer@ktdreyer.com>2015-12-12 00:56:25 -0700
committerKen Dreyer <ktdreyer@ktdreyer.com>2015-12-12 01:05:12 -0700
commit2eaca3e39415ba13b5305fe489f5d159977e7eb1 (patch)
treee1392b741ace83d4c9c9cf1465b9e51e3632837a
downloadpython-beanbag-master.tar.gz
python-beanbag-master.tar.xz
python-beanbag-master.zip
initial pkg import (beanbag 1.9.2)HEADmaster
-rw-r--r--.gitignore1
-rw-r--r--python-beanbag.spec85
-rw-r--r--sources1
3 files changed, 87 insertions, 0 deletions
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 0000000..c48c003
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1 @@
+/beanbag-1.9.2.tar.gz
diff --git a/python-beanbag.spec b/python-beanbag.spec
new file mode 100644
index 0000000..2b4683d
--- /dev/null
+++ b/python-beanbag.spec
@@ -0,0 +1,85 @@
+%if 0%{?fedora}
+%global with_python3 1
+%endif
+
+%define srcname beanbag
+
+Name: python-beanbag
+Version: 1.9.2
+Release: 1%{?dist}
+Summary: A helper module for accessing REST APIs
+License: MIT
+URL: https://github.com/ajtowns/beanbag
+Source0: http://pypi.python.org/packages/source/b/%{srcname}/%{srcname}-%{version}.tar.gz
+BuildArch: noarch
+BuildRequires: pytest
+BuildRequires: python2-devel
+BuildRequires: python-requests
+%if 0%{?with_python3}
+BuildRequires: python3-devel
+BuildRequires: python3-requests
+BuildRequires: python3-pytest
+%endif # with_python3
+
+%description
+BeanBag is a simple module that lets you access REST APIs in an easy way.
+
+%package -n python2-%{srcname}
+Summary: %{summary}
+Requires: python-requests
+%{?python_provide:%python_provide python2-%{srcname}}
+
+%description -n python2-%{srcname}
+BeanBag is a simple module that lets you access REST APIs in an easy way.
+
+%if 0%{?with_python3}
+%package -n python3-beanbag
+Summary: %{summary}
+Requires: python3
+Requires: python3-requests
+
+%description -n python3-beanbag
+BeanBag is a simple module that lets you access REST APIs in an easy way.
+%endif # with_python3
+
+%prep
+%autosetup -n %{srcname}-%{version}
+
+%build
+%{py2_build}
+
+%if 0%{?with_python3}
+%{py3_build}
+%endif # with_python3
+
+%install
+%py2_install
+
+%if 0%{?with_python3}
+%py3_install
+%endif # with_python3
+
+%check
+export PYTHONPATH=$(pwd)
+
+py.test-%{python2_version} -v tests
+
+%if 0%{?with_python3}
+py.test-%{python3_version} -v tests
+%endif # with_python3
+
+%files -n python2-%{srcname}
+%doc README.rst
+%license LICENSE
+%{python2_sitelib}/*
+
+%if 0%{?with_python3}
+%files -n python3-%{srcname}
+%doc README.rst
+%license LICENSE
+%{python3_sitelib}/*
+%endif # with_python3
+
+%changelog
+* Sat Dec 12 2015 Ken Dreyer <ktdreyer@ktdreyer.com> - 1.9.2-1
+- Initial package
diff --git a/sources b/sources
new file mode 100644
index 0000000..e9a624b
--- /dev/null
+++ b/sources
@@ -0,0 +1 @@
+47bfccbc3224d1595ae787f994f99720 beanbag-1.9.2.tar.gz