73 lines
2.2 KiB
RPMSpec
73 lines
2.2 KiB
RPMSpec
Name: python-simplegeneric
|
|
Version: 0.8.1
|
|
Release: 11
|
|
Summary: A package with simple generic functions
|
|
License: Python or ZPLv2.1
|
|
URL: http://cheeseshop.python.org/pypi/simplegeneric
|
|
Source0: https://pypi.python.org/packages/source/s/simplegeneric/simplegeneric-0.8.1.zip
|
|
BuildArch: noarch
|
|
BuildRequires: python2-devel python2-setuptools python3-devel python3-setuptools
|
|
|
|
%description
|
|
The package lets you define simple single-dispatch generic functions, akin to Python's built-in
|
|
generic functions like len(), iter() and so on.
|
|
|
|
%package -n python2-simplegeneric
|
|
Summary: A python2 package with simple generic functions
|
|
License: Python or ZPLv2.1
|
|
%{?python_provide:%python_provide python2-simplegeneric}
|
|
|
|
%description -n python2-simplegeneric
|
|
The package lets you define simple single-dispatch generic functions, akin to Python's built-in
|
|
generic functions like len(), iter() and so on.
|
|
|
|
%package -n python3-simplegeneric
|
|
Summary: A python3 package with simple generic functions
|
|
License: Python or ZPLv2.1
|
|
%{?python_provide:%python_provide python3-simplegeneric}
|
|
|
|
%description -n python3-simplegeneric
|
|
The package lets you define simple single-dispatch generic functions, akin to Python's built-in
|
|
generic functions like len(), iter() and so on.
|
|
|
|
%prep
|
|
%autosetup -n simplegeneric-%{version}
|
|
rm -rf %{py3dir}; cp -a . %{py3dir}
|
|
cd %{py3dir}
|
|
2to3 --write --nobackups .
|
|
sed -i "s/file(/open(/g" setup.py
|
|
cd -
|
|
find %{py3dir} -name '*.py' | xargs sed -i '1s|^#!python|#!%{__python3}|'
|
|
find -name '*.py' | xargs sed -i '1s|^#!python|#!%{__python}|'
|
|
|
|
%build
|
|
%py2_build
|
|
cd %{py3dir}
|
|
%py3_build
|
|
cd -
|
|
|
|
%install
|
|
%py2_install
|
|
cd %{py3dir}
|
|
%py3_install
|
|
cd -
|
|
|
|
%check
|
|
cd %{py3dir}
|
|
PYTHONPATH=$(pwd) %{__python3} setup.py test
|
|
cd -
|
|
PYTHONPATH=$(pwd) %{__python} setup.py test
|
|
|
|
%files -n python2-simplegeneric
|
|
%doc README.txt
|
|
%{python_sitelib}/{simplegeneric.py*,simplegeneric-%{version}-py?.?.egg-info}
|
|
|
|
%files -n python3-simplegeneric
|
|
%doc README.txt
|
|
%{python3_sitelib}/__pycache__/simplegeneric.cpython*
|
|
%{python3_sitelib}/{simplegeneric.py*,simplegeneric-%{version}-py?.?.egg-info}
|
|
|
|
%changelog
|
|
* Fri Mar 6 2020 yinzhenling <yingzhenling2@huawei.com> - 0.8.1-11
|
|
- Initial package
|