You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
99 lines
2.3 KiB
99 lines
2.3 KiB
%global pkgname rsa
|
|
|
|
Name: python-rsa
|
|
Version: 3.1.1
|
|
Release: 4%{?dist}
|
|
Summary: Pure-Python RSA implementation
|
|
|
|
License: ASL 2.0
|
|
URL: http://stuvel.eu/rsa
|
|
Source0: https://pypi.python.org/packages/source/r/rsa/%{pkgname}-%{version}.tar.gz
|
|
|
|
BuildArch: noarch
|
|
BuildRequires: python2-devel
|
|
BuildRequires: python-setuptools
|
|
BuildRequires: python-pyasn1
|
|
BuildRequires: python-unittest2
|
|
%if 0%{?with_python3}
|
|
BuildRequires: python3-devel
|
|
BuildRequires: python3-setuptools
|
|
BuildRequires: python3-pyasn1
|
|
BuildRequires: python3-nose
|
|
%endif # if with_python3
|
|
|
|
%description
|
|
Pure-Python RSA implementation
|
|
|
|
%if 0%{?with_python3}
|
|
%package -n python3-rsa
|
|
Summary: Pure-Python RSA implementation
|
|
Group: Development/Library
|
|
|
|
%description -n python3-rsa
|
|
Pure-Python RSA implementation
|
|
%endif # with_python3
|
|
|
|
%prep
|
|
%setup -q -n %{pkgname}-%{version}
|
|
rm -rf %{pkgname}-*.egg-info
|
|
|
|
%if 0%{?with_python3}
|
|
rm -rf %{py3dir}
|
|
cp -a . %{py3dir}
|
|
find %{py3dir} -name '*.py' | xargs sed -i '1s|^#!python|#!%{__python3}|'
|
|
%endif # with_python3
|
|
|
|
find -name '*.py' | xargs sed -i '1s|^#!python|#!%{__python}|'
|
|
|
|
%build
|
|
%{__python} setup.py build
|
|
|
|
%if 0%{?with_python3}
|
|
pushd %{py3dir}
|
|
%{__python3} setup.py build
|
|
popd
|
|
%endif # with_python3
|
|
|
|
%install
|
|
%if 0%{?with_python3}
|
|
pushd %{py3dir}
|
|
%{__python3} setup.py install --skip-build --root %{buildroot}
|
|
popd
|
|
%endif # with_python3
|
|
|
|
%{__python} setup.py install -O1 --skip-build --root %{buildroot}
|
|
|
|
%check
|
|
%{__python} run_tests.py
|
|
|
|
%if 0%{?with_python3}
|
|
pushd %{py3dir}
|
|
%{__python3} setup.py test
|
|
popd
|
|
%endif # with_python3
|
|
|
|
%files
|
|
%doc LICENSE
|
|
%{_bindir}/*
|
|
%{python_sitelib}/rsa
|
|
%{python_sitelib}/rsa-*.egg-info
|
|
|
|
%if 0%{?with_python3}
|
|
%files -n python3-rsa
|
|
%defattr(-,root,root,-)
|
|
%doc LICENSE
|
|
%{python3_sitelib}/rsa
|
|
%{python3_sitelib}/rsa-*.egg-info
|
|
%endif # with_python3
|
|
|
|
%changelog
|
|
* Mon Aug 05 2013 Yohan Graterol <yohangraterol92@gmail.com> - 3.1.1-4
|
|
- Add support to Python3
|
|
* Sun Aug 04 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 3.1.1-3
|
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild
|
|
|
|
* Sun May 26 2013 Yohan Graterol <yohangraterol92@gmail.com> - 3.1.1-2
|
|
- Change license name, remove MANIFEST.in
|
|
* Sun May 19 2013 Yohan Graterol <yohangraterol92@gmail.com> - 3.1.1-1
|
|
- Initial packaging
|