]> git.pld-linux.org Git - packages/python-siphashc3.git/commitdiff
new, version 3 master auto/th/python-siphashc3-3-1
authorElan Ruusamäe <glen@delfi.ee>
Fri, 21 Apr 2017 13:52:56 +0000 (16:52 +0300)
committerElan Ruusamäe <glen@delfi.ee>
Fri, 21 Apr 2017 13:52:56 +0000 (16:52 +0300)
python-siphashc3.spec [new file with mode: 0644]

diff --git a/python-siphashc3.spec b/python-siphashc3.spec
new file mode 100644 (file)
index 0000000..84e847a
--- /dev/null
@@ -0,0 +1,95 @@
+#
+# Conditional build:
+%bcond_with    tests   # do not perform "make test"
+%bcond_without python2 # CPython 2.x module
+%bcond_without python3 # CPython 3.x module
+
+# NOTES:
+# - 'module' should match the Python import path (first component?)
+# - 'egg_name' should equal to Python egg name
+# - 'pypi_name' must match the Python Package Index name
+%define                module          siphashc
+%define                egg_name        siphashc3
+%define                pypi_name       siphashc3
+Summary:       Python module for siphash
+Name:          python-%{pypi_name}
+Version:       3
+Release:       1
+License:       MIT
+Group:         Libraries/Python
+Source0:       https://files.pythonhosted.org/packages/source/s/%{pypi_name}/%{pypi_name}-%{version}.tar.gz
+# Source0-md5: b86856858e1f24a7288248f2f45e7c40
+URL:           http://github.com/carlopires/siphashc3
+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
+BuildRoot:     %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
+
+%description
+Python module for siphash, based on floodberry's version.
+
+%package -n python3-%{pypi_name}
+Summary:       Python module for siphash
+Group:         Libraries/Python
+Requires:      python3-modules
+
+%description -n python3-%{pypi_name}
+Python module for siphash, based on floodberry's version.
+
+%prep
+%setup -q -n %{pypi_name}-%{version}
+
+# Remove bundled egg-info
+rm -r %{pypi_name}.egg-info
+
+%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
+
+%clean
+rm -rf $RPM_BUILD_ROOT
+
+%if %{with python2}
+%files
+%defattr(644,root,root,755)
+%attr(755,root,root) %{py_sitedir}/%{module}.so
+%{py_sitedir}/%{egg_name}-%{version}-py*.egg-info
+%endif
+
+%if %{with python3}
+%files -n python3-%{pypi_name}
+%defattr(644,root,root,755)
+%attr(755,root,root) %{py3_sitedir}/%{module}.*.so
+%{py3_sitedir}/%{egg_name}-%{version}-py*.egg-info
+%endif
This page took 0.116534 seconds and 5 git commands to generate.