%global pypi windtalker # Upstream use diferent names and releases for pypi and github # 2016-05-07 is the 0.0.4 release in pypi. %global upstr windtalker-project %global upsrel 2016-05-17 %global summ Super easy-to-use encryption and decryption tool Name: python-%{pypi} Version: 0.0.4 Release: 2%{?dist} Summary: %{summ} License: MIT URL: http://pythonhosted.org/pg8000/ Source0: https://github.com/MacHu-GWU/%{upstr}/archive/%{upsrel}.tar.gz BuildArch: noarch %description Encrypt/decrypt binary data, text, files or even a entire directory in single line of code. It support both symmetry and asymmetry encryption algorithm. %package -n python2-%{pypi} Summary: %{summ} BuildRequires: python2-devel BuildRequires: python-cryptography BuildRequires: python2-rsa Requires: python-cryptography Requires: python2-rsa %{?python_provide:%python_provide python2-%{pypi}} %description -n python2-%{pypi} With python2-%{pypi} you can Encrypt/decrypt binary data, text, files or even a entire directory in single line of code. It support both symmetry and asymmetry encryption algorithm. %if 0%{?fedora} %package -n python%{python3_pkgversion}-%{pypi} Summary: %{summ} BuildRequires: python%{python3_pkgversion}-devel BuildRequires: python%{python3_pkgversion}-cryptography BuildRequires: python%{python3_pkgversion}-rsa Requires: python%{python3_pkgversion}-cryptography Requires: python%{python3_pkgversion}-rsa %{?python_provide:%python_provide python%{python3_pkgversion}-%{pypi}} %description -n python%{python3_pkgversion}-%{pypi} With python3-%{pypi} you can Encrypt/decrypt binary data, text, files or even a entire directory in single line of code. It support both symmetry and asymmetry encryption algorithm. #%%package doc #Summary: HTML documentation for %%{name} #BuildRequires: python-sphinx #%%description doc #HTML documentation for %%{name}-%%{release} %endif %prep %autosetup -n %{upstr}-%{upsrel} rm -rf *.pyc -v find windtalker/*.py -exec sed -i '1d' {} \; %build %py2_build %{?fedora:%py3_build} %install %py2_install %{?fedora:%py3_install} %if 0%{?fedora} #PYTHONPATH=.:$PYTHONPATH sphinx-build -b html -d build/doctrees source build/html #rm -rf %%{buildroot}/build/html/.buildinfo rm -rf %{_buildrootdir}/%{python3_sitelib}/%{pyip}/__pycache__/__init__.cpython-35.pyc %endif rm -rf %{_buildrootdir}/%{python2_sitelib}/%{pyip}/__pycache__/__init__.cpython-35.pyc %check #%%{__python2} -m pytest #%%{__python3} -m pytest %files -n python2-%{pypi} %license LICENSE.txt %doc README.rst %{python2_sitelib}/* %exclude %{python2_sitelib}/%{pypi}/__pycache__ %if 0%{?fedora} %files -n python%{python3_pkgversion}-%{pypi} %license LICENSE.txt %doc README.rst %{python3_sitelib}/* %exclude %{python3_sitelib}/%{pypi}/__init__.pyc #%%files doc #%%license LICENSE.txt #%%doc build/html/* %endif %changelog * Tue Aug 02 2016 William Moreno - 0.0.4-2 - Disable doc build. * Sun Jul 31 2016 William Moreno - 0.0.4-1 - Initial Packaging - Last upstream release 0.0.4