diff --git a/python-extras.spec b/python-extras.spec index 0b122b7..01bb944 100644 --- a/python-extras.spec +++ b/python-extras.spec @@ -1,6 +1,7 @@ %if 0%{?fedora} || 0%{?rhel} >= 7 %global with_python3 1 %endif +%global pypi_name extras Name: python-extras Version: 0.0.3 @@ -9,7 +10,7 @@ Summary: Useful extra bits for Python License: MIT URL: https://github.com/testing-cabal/extras -Source0: https://pypi.python.org/packages/source/e/extras/extras-%{version}.tar.gz +Source0: %{pypi_source} BuildArch: noarch BuildRequires: python-devel @@ -51,11 +52,11 @@ find -name '*.py' | xargs sed -i '1s|^#!python|#!%{__python}|' %build -%{__python} setup.py build +%py2_build %if 0%{?with_python3} pushd %{py3dir} -%{__python3} setup.py build +%py3_build popd %endif # with_python3 @@ -67,21 +68,23 @@ popd # to be the default for now). %if 0%{?with_python3} pushd %{py3dir} -%{__python3} setup.py install -O1 --skip-build --root $RPM_BUILD_ROOT +%py3_install popd %endif # with_python3 -%{__python} setup.py install -O1 --skip-build --root $RPM_BUILD_ROOT +%py2_install %files -%doc LICENSE NEWS README.rst +%license LICENSE +%doc NEWS README.rst # For noarch packages: sitelib %{python_sitelib}/* %if 0%{?with_python3} %files -n python%{python3_pkgversion}-extras -%doc LICENSE NEWS README.rst +%license LICENSE +%doc NEWS README.rst %{python3_sitelib}/* %endif # with_python3