%{!?python_sitearch: %define python_sitearch %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib(1)")} Name: pycrypto Version: 2.0.1 Release: 1.20081213git510428c%{?dist} Summary: The Python Cryptography Toolkit Group: Development/Languages License: PyCrypto License URL: http://www.dlitz.net/software/pycrypto/ # The source for this package was pulled from upstream's vcs. Use the # following commands to generate the tarball: # git clone git://git.pycrypto.org:9419/crypto/pycrypto-2.x.git pycrypto # rm pycrypto/.git -rf # tar -cjf pycrypto-2.0.1+gitXXXX.tar.bz2 pycrypto Source0: %{name}-2.0.1+git510428c.tar.bz2 BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildRequires: gmp-devel BuildRequires: python-devel BuildRequires: python-setuptools-devel %description This is a collection of both secure hash functions (such as MD5 and SHA), and various encryption algorithms (AES, DES, IDEA, RSA, ElGamal, etc.). The package is structured to make adding new modules easy. %prep %setup -q -n %{name} chmod -x src/*.c # Remove extra shebang lines from installed libraries sed -i '1,1d' Util/RFC1751.py sed -i '1,1d' setup.py %build CFLAGS="$RPM_OPT_FLAGS" %{__python} -c 'import setuptools; execfile("setup.py")' build %install rm -rf $RPM_BUILD_ROOT %{__python} -c 'import setuptools; execfile("setup.py")' install --skip-build --root $RPM_BUILD_ROOT %clean rm -rf $RPM_BUILD_ROOT %files %defattr(-,root,root,-) %doc README LICENSE %{python_sitearch}/*egg-info %{python_sitearch}/Crypto %changelog * Fri Dec 13 2008 Conrad Meyer - 2.0.1-1.20081213git510428c - Initial package.