[packages/python-yubico] - initial

arekm arekm at pld-linux.org
Sat Jan 28 19:07:41 CET 2017


commit 3e894bd1adf6a8e56992c97dbf8d089d33457a83
Author: Arkadiusz Miśkiewicz <arekm at maven.pl>
Date:   Sat Jan 28 19:07:27 2017 +0100

    - initial

 python-yubico.spec | 124 +++++++++++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 124 insertions(+)
---
diff --git a/python-yubico.spec b/python-yubico.spec
new file mode 100644
index 0000000..044972e
--- /dev/null
+++ b/python-yubico.spec
@@ -0,0 +1,124 @@
+# Conditional build:
+%bcond_with	doc	# don't build doc
+%bcond_with	tests	# do not perform "make test"
+%bcond_without	python2 # CPython 2.x module
+%bcond_without	python3 # CPython 3.x module
+#
+%define		module		yubico
+%define		egg_name	python_yubico
+%define		pypi_name	yubico
+Summary:	Python code for talking to Yubico's YubiKeys
+Name:		python-%{pypi_name}
+Version:	1.3.2
+Release:	1
+License:	BSD
+Group:		Libraries/Python
+Source0:	https://github.com/Yubico/python-yubico/archive/%{name}-%{version}.tar.gz
+# Source0-md5:	3012d95a043b1da93486e0b555b95234
+URL:		https://github.com/Yubico/python-yubico
+BuildRequires:	rpm-pythonprov
+BuildRequires:	rpmbuild(macros) >= 1.714
+%if %{with python2}
+BuildRequires:	python-modules
+BuildRequires:	python-setuptools
+%endif
+%if %{with python3}
+BuildRequires:	python3-modules
+BuildRequires:	python3-setuptools
+%endif
+Requires:	python-modules
+BuildArch:	noarch
+BuildRoot:	%{tmpdir}/%{name}-%{version}-root-%(id -u -n)
+
+%description
+Python code for talking to Yubico's YubiKeys.
+
+%package -n python3-%{module}
+Summary:	Python code for talking to Yubico's YubiKeys
+Group:		Libraries/Python
+Requires:	python3-modules
+
+%description -n python3-%{module}
+Python code for talking to Yubico's YubiKeys.
+
+%package apidocs
+Summary:	%{module} API documentation
+Summary(pl.UTF-8):	Dokumentacja API %{module}
+Group:		Documentation
+
+%description apidocs
+API documentation for %{module}.
+
+%description apidocs -l pl.UTF-8
+Dokumentacja API %{module}.
+
+%prep
+%setup -q -n %{name}-%{name}-%{version}
+
+%build
+%if %{with python2}
+%py_build %{?with_tests:test}
+%endif
+
+%if %{with python3}
+%py3_build %{?with_tests:test}
+%endif
+
+%if %{with doc}
+cd docs
+%{__make} -j1 html
+rm -rf _build/html/_sources
+%endif
+
+%install
+rm -rf $RPM_BUILD_ROOT
+
+%if %{with python2}
+%py_install
+%py_postclean
+%endif
+
+%if %{with python3}
+%py3_install
+%endif
+
+# in case there are examples provided
+%if %{with python2}
+install -d $RPM_BUILD_ROOT%{_examplesdir}/python-%{module}-%{version}
+cp -a examples/* $RPM_BUILD_ROOT%{_examplesdir}/python-%{module}-%{version}
+find $RPM_BUILD_ROOT%{_examplesdir}/python-%{module}-%{version} -type f \
+	| xargs sed -i '1s|^#!.*python\b|#!%{__python}|'
+%endif
+%if %{with python3}
+install -d $RPM_BUILD_ROOT%{_examplesdir}/python3-%{module}-%{version}
+cp -a examples/* $RPM_BUILD_ROOT%{_examplesdir}/python3-%{module}-%{version}
+find $RPM_BUILD_ROOT%{_examplesdir}/python3-%{module}-%{version} -type f \
+	| xargs sed -i '1s|^#!.*python\b|#!%{__python3}|'
+%endif
+
+%clean
+rm -rf $RPM_BUILD_ROOT
+
+%if %{with python2}
+%files
+%defattr(644,root,root,755)
+%doc NEWS README
+%{py_sitescriptdir}/%{module}
+%{py_sitescriptdir}/%{egg_name}-%{version}-py*.egg-info
+%{_examplesdir}/python-%{module}-%{version}
+%endif
+
+%if %{with python3}
+%files -n python3-%{module}
+%defattr(644,root,root,755)
+%doc NEWS README
+%{py3_sitescriptdir}/%{module}
+%{py3_sitescriptdir}/%{egg_name}-%{version}-py*.egg-info
+%{_examplesdir}/python3-%{module}-%{version}
+%endif
+
+%if %{with doc}
+%files apidocs
+%defattr(644,root,root,755)
+%doc docs/_build/html/*
+%endif
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/python-yubico.git/commitdiff/3e894bd1adf6a8e56992c97dbf8d089d33457a83



More information about the pld-cvs-commit mailing list