diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..7afb908 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +SOURCES/cryptography-0.8.2.tar.gz diff --git a/.python-cryptography.metadata b/.python-cryptography.metadata new file mode 100644 index 0000000..2321696 --- /dev/null +++ b/.python-cryptography.metadata @@ -0,0 +1 @@ +b04c2172d34caa40143f620afe414563f5c98c9a SOURCES/cryptography-0.8.2.tar.gz diff --git a/README.md b/README.md deleted file mode 100644 index 98f42b4..0000000 --- a/README.md +++ /dev/null @@ -1,4 +0,0 @@ -The master branch has no content - -Look at the c7 branch if you are working with CentOS-7, or the c4/c5/c6 branch for CentOS-4, 5 or 6 -If you find this file in a distro specific branch, it means that no content has been checked in yet diff --git a/SPECS/python-cryptography.spec b/SPECS/python-cryptography.spec new file mode 100644 index 0000000..5ce86c2 --- /dev/null +++ b/SPECS/python-cryptography.spec @@ -0,0 +1,152 @@ +%if 0%{?fedora} > 20 +%global with_python3 1 +%else +%{!?__python2: %global __python2 /usr/bin/python2} +%{!?python2_sitearch: %global python2_sitearch %(%{__python2} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib(1))")} +%endif + +Name: python-cryptography +Version: 0.8.2 +Release: 1%{?dist} +Summary: PyCA's cryptography library + +Group: Development/Libraries +License: ASL 2.0 or BSD +URL: https://cryptography.io/en/latest/ +Source0: https://pypi.python.org/packages/source/c/cryptography/cryptography-%{version}.tar.gz + +BuildRequires: openssl-devel +BuildRequires: python-enum34 + +BuildRequires: python2-devel +BuildRequires: python-setuptools +BuildRequires: python-cffi >= 0.8 +BuildRequires: python-six +BuildRequires: python-cryptography-vectors = %{version} +BuildRequires: python-pyasn1 +BuildRequires: python-iso8601 +BuildRequires: python-pretend +BuildRequires: pytest + +%if 0%{?with_python3} +BuildRequires: python3-devel +BuildRequires: python3-setuptools +BuildRequires: python3-cffi >= 0.8 +BuildRequires: python3-six +BuildRequires: python3-cryptography-vectors = %{version} +BuildRequires: python3-pyasn1 +BuildRequires: python3-iso8601 +BuildRequires: python3-pretend +BuildRequires: python3-pytest +%endif + +Requires: openssl +Requires: python-enum34 +Requires: python-cffi >= 0.8 +Requires: python-six >= 1.6.1 +Requires: python-pyasn1 + +%description +cryptography is a package designed to expose cryptographic primitives and +recipes to Python developers. + +%if 0%{?with_python3} +%package -n python3-cryptography +Group: Development/Libraries +Summary: PyCA's cryptography library + +Requires: openssl +Requires: python3-cffi >= 0.8 +Requires: python3-six >= 1.6.1 +Requires: python3-pyasn1 + +%description -n python3-cryptography +cryptography is a package designed to expose cryptographic primitives and +recipes to Python developers. +%endif + +%prep +%setup -q -n cryptography-%{version} + +%if 0%{?with_python3} +rm -rf %{py3dir} +cp -a . %{py3dir} +find %{py3dir} -name '*.py' | xargs sed -i '1s|^#!/usr/bin/python|#!%{__python3}|' +%endif + +%build +%{__python2} setup.py build + +%if 0%{?with_python3} +pushd %{py3dir} +%{__python3} setup.py build +popd +%endif + + +%install +# Actually other *.c and *.h are appropriate +# see https://github.com/pyca/cryptography/issues/1463 +find . -name .keep -print -delete + +%{__python2} setup.py install --skip-build --prefix=%{_prefix} --root %{buildroot} + +%if 0%{?with_python3} +pushd %{py3dir} +%{__python3} setup.py install --skip-build --prefix=%{_prefix} --root %{buildroot} +popd +%endif + + +%check +%{__python} setup.py test + +%if 0%{?with_python3} +pushd %{py3dir} +%{__python3} setup.py test +popd +%endif + + +%files +%doc LICENSE LICENSE.APACHE LICENSE.BSD README.rst docs +%{python_sitearch}/* + + +%if 0%{?with_python3} +%files -n python3-cryptography +%doc LICENSE LICENSE.APACHE LICENSE.BSD README.rst docs +%{python3_sitearch}/* +%endif + + +%changelog +* Fri Apr 17 2015 Nathaniel McCallum - 0.8.2-1 +- New upstream release +- Add python3-pyasn1 Requires (#1211073) + +* Tue Apr 14 2015 Matej Cepl - 0.8-2 +- Add python-pyasn1 Requires (#1211073) + +* Fri Mar 13 2015 Nathaniel McCallum - 0.8-1 +- New upstream release +- Remove upstreamed patch + +* Wed Mar 04 2015 Nathaniel McCallum - 0.7.2-2 +- Add python3-cryptography-vectors build requires +- Add python-enum34 requires + +* Tue Feb 03 2015 Nathaniel McCallum - 0.7.2-1 +- New upstream release. BSD is now an optional license. +- Fix test running on python3 +- Add upstream patch to fix test paths + +* Fri Nov 07 2014 Matej Cepl - 0.6.1-2 +- Fix requires, for reasons why other development files were not + eliminated see https://github.com/pyca/cryptography/issues/1463. + +* Wed Nov 05 2014 Matej Cepl - 0.6.1-1 +- New upstream release. + +* Sun Jun 29 2014 Terry Chia 0.4-1 +- initial version